diff options
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/command_processor.cpp | 10 | ||||
-rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_base.h | 7 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 2f92be661..2274dfa66 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -142,7 +142,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { // Send to renderer using Pica::Shader::OutputVertex; auto AddTriangle = [](const OutputVertex& v0, const OutputVertex& v1, const OutputVertex& v2) { - VideoCore::g_renderer->rasterizer->AddTriangle(v0, v1, v2); + VideoCore::g_renderer->Rasterizer()->AddTriangle(v0, v1, v2); }; g_state.immediate.primitive_assembler.SubmitVertex(output, AddTriangle); @@ -155,7 +155,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { case PICA_REG_INDEX(gpu_mode): if (regs.gpu_mode == Regs::GPUMode::Configuring && regs.vs_default_attributes_setup.index == 15) { // Draw immediate mode triangles when GPU Mode is set to GPUMode::Configuring - VideoCore::g_renderer->rasterizer->DrawTriangles(); + VideoCore::g_renderer->Rasterizer()->DrawTriangles(); } break; @@ -396,7 +396,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { using Pica::Shader::OutputVertex; auto AddTriangle = []( const OutputVertex& v0, const OutputVertex& v1, const OutputVertex& v2) { - VideoCore::g_renderer->rasterizer->AddTriangle(v0, v1, v2); + VideoCore::g_renderer->Rasterizer()->AddTriangle(v0, v1, v2); }; primitive_assembler.SubmitVertex(output, AddTriangle); @@ -407,7 +407,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { range.second, range.first); } - VideoCore::g_renderer->rasterizer->DrawTriangles(); + VideoCore::g_renderer->Rasterizer()->DrawTriangles(); #if PICA_DUMP_GEOMETRY geometry_dumper.Dump(); @@ -542,7 +542,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { break; } - VideoCore::g_renderer->rasterizer->NotifyPicaRegisterChanged(id); + VideoCore::g_renderer->Rasterizer()->NotifyPicaRegisterChanged(id); if (g_debug_context) g_debug_context->OnEvent(DebugContext::Event::PicaCommandProcessed, reinterpret_cast<void*>(&id)); diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 6e21caa78..271e81ca1 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp @@ -48,7 +48,7 @@ void DebugContext::OnEvent(Event event, void* data) { std::unique_lock<std::mutex> lock(breakpoint_mutex); // Commit the hardware renderer's framebuffer so it will show on debug widgets - VideoCore::g_renderer->rasterizer->FlushFramebuffer(); + VideoCore::g_renderer->Rasterizer()->FlushFramebuffer(); // TODO: Should stop the CPU thread here once we multithread emulation. diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 506bff815..bdfce1b60 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -54,11 +54,14 @@ public: return m_current_frame; } - void RefreshRasterizerSetting(); + VideoCore::RasterizerInterface* Rasterizer() const { + return rasterizer.get(); + } - std::unique_ptr<VideoCore::RasterizerInterface> rasterizer; + void RefreshRasterizerSetting(); protected: + std::unique_ptr<VideoCore::RasterizerInterface> rasterizer; f32 m_current_fps; ///< Current framerate, should be set by the renderer int m_current_frame; ///< Current frame, should be set by the renderer |