Moved vertex processor invocation into renderer

This commit is contained in:
tfarley 2015-04-18 19:26:09 -04:00
parent d9b1c0bbc4
commit 3ae7c5b23c
4 changed files with 16 additions and 3 deletions

View File

@ -4,12 +4,12 @@
#include "common/profiler.h"
#include "clipper.h"
#include "command_processor.h"
#include "pica.h"
#include "vertex_processor.h"
#include "vertex_shader.h"
#include "core/hle/service/gsp_gpu.h"
#include "core/hw/gpu.h"
#include "video_core.h"
#include "debug_utils/debug_utils.h"
@ -57,7 +57,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
DebugUtils::DumpTevStageConfig(registers.GetTevStages());
Pica::VertexProcessor::ProcessBatch(id == PICA_REG_INDEX(trigger_draw_indexed), Clipper::ProcessTriangle);
VideoCore::g_renderer->DrawBatch(id == PICA_REG_INDEX(trigger_draw_indexed));
break;
}

View File

@ -37,6 +37,9 @@ public:
/// Shutdown the renderer
virtual void ShutDown() = 0;
/// Draw a batch of triangles
virtual void DrawBatch(bool is_indexed) = 0;
// Getter/setter functions:
// ------------------------

View File

@ -11,6 +11,8 @@
#include "common/emu_window.h"
#include "common/profiler_reporting.h"
#include "video_core/clipper.h"
#include "video_core/vertex_processor.h"
#include "video_core/video_core.h"
#include "video_core/renderer_opengl/renderer_opengl.h"
#include "video_core/renderer_opengl/gl_shader_util.h"
@ -342,3 +344,8 @@ void RendererOpenGL::Init() {
/// Shutdown the renderer
void RendererOpenGL::ShutDown() {
}
/// Draw a batch of triangles
void RendererOpenGL::DrawBatch(bool is_indexed) {
Pica::VertexProcessor::ProcessBatch(is_indexed, Pica::Clipper::ProcessTriangle);
}

View File

@ -37,6 +37,9 @@ public:
/// Shutdown the renderer
void ShutDown() override;
/// Draw a batch of triangles
void DrawBatch(bool is_indexed) override;
private:
/// Structure used for storing information about the textures for each 3DS screen
struct TextureInfo {