diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/command_processor.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index fb65a3a0a..3ab4af374 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -243,6 +243,15 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 243 | ASSERT(!g_state.geometry_pipeline.NeedIndexInput()); | 243 | ASSERT(!g_state.geometry_pipeline.NeedIndexInput()); |
| 244 | g_state.geometry_pipeline.Setup(shader_engine); | 244 | g_state.geometry_pipeline.Setup(shader_engine); |
| 245 | g_state.geometry_pipeline.SubmitVertex(output); | 245 | g_state.geometry_pipeline.SubmitVertex(output); |
| 246 | |||
| 247 | // TODO: If drawing after every immediate mode triangle kills performance, | ||
| 248 | // change it to flush triangles whenever a drawing config register changes | ||
| 249 | // See: https://github.com/citra-emu/citra/pull/2866#issuecomment-327011550 | ||
| 250 | VideoCore::g_renderer->Rasterizer()->DrawTriangles(); | ||
| 251 | if (g_debug_context) { | ||
| 252 | g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch, | ||
| 253 | nullptr); | ||
| 254 | } | ||
| 246 | } | 255 | } |
| 247 | } | 256 | } |
| 248 | } | 257 | } |
| @@ -250,16 +259,7 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 250 | } | 259 | } |
| 251 | 260 | ||
| 252 | case PICA_REG_INDEX(pipeline.gpu_mode): | 261 | case PICA_REG_INDEX(pipeline.gpu_mode): |
| 253 | if (regs.pipeline.gpu_mode == PipelineRegs::GPUMode::Configuring) { | 262 | // This register likely just enables vertex processing and doesn't need any special handling |
| 254 | MICROPROFILE_SCOPE(GPU_Drawing); | ||
| 255 | |||
| 256 | // Draw immediate mode triangles when GPU Mode is set to GPUMode::Configuring | ||
| 257 | VideoCore::g_renderer->Rasterizer()->DrawTriangles(); | ||
| 258 | |||
| 259 | if (g_debug_context) { | ||
| 260 | g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch, nullptr); | ||
| 261 | } | ||
| 262 | } | ||
| 263 | break; | 263 | break; |
| 264 | 264 | ||
| 265 | case PICA_REG_INDEX_WORKAROUND(pipeline.command_buffer.trigger[0], 0x23c): | 265 | case PICA_REG_INDEX_WORKAROUND(pipeline.command_buffer.trigger[0], 0x23c): |
| @@ -398,6 +398,11 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 398 | range.second, range.first); | 398 | range.second, range.first); |
| 399 | } | 399 | } |
| 400 | 400 | ||
| 401 | VideoCore::g_renderer->Rasterizer()->DrawTriangles(); | ||
| 402 | if (g_debug_context) { | ||
| 403 | g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch, nullptr); | ||
| 404 | } | ||
| 405 | |||
| 401 | break; | 406 | break; |
| 402 | } | 407 | } |
| 403 | 408 | ||
| @@ -632,6 +637,6 @@ void ProcessCommandList(const u32* list, u32 size) { | |||
| 632 | } | 637 | } |
| 633 | } | 638 | } |
| 634 | 639 | ||
| 635 | } // namespace | 640 | } // namespace CommandProcessor |
| 636 | 641 | ||
| 637 | } // namespace | 642 | } // namespace Pica |