summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2017-09-08 06:05:42 +0200
committerJames Rowe <jroweboy@gmail.com>2017-09-11 17:21:43 +0200
commitad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2 (patch)
tree851981b5f2ac95e770916b199737fd421258d1e5 /src
parentMerge pull request #2865 from wwylele/gs++ (diff)
downloadyuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.tar
yuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.tar.gz
yuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.tar.bz2
yuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.tar.lz
yuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.tar.xz
yuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.tar.zst
yuzu-ad0b57f4071fb7ec9da764b3905e0bb5e4c5eef2.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/command_processor.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index fb65a3a0a..fff159058 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) {
ASSERT(!g_state.geometry_pipeline.NeedIndexInput());
g_state.geometry_pipeline.Setup(shader_engine);
g_state.geometry_pipeline.SubmitVertex(output);
+
+ // TODO: If drawing after every immediate mode triangle kills performance,
+ // change it to flush triangles whenever a draing config register changes
+ // See: https://github.com/citra-emu/citra/pull/2866#issuecomment-327011550
+ VideoCore::g_renderer->Rasterizer()->DrawTriangles();
+ if (g_debug_context) {
+ g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch,
+ nullptr);
+ }
}
}
}
@@ -398,6 +407,12 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
range.second, range.first);
}
+ MICROPROFILE_SCOPE(GPU_Drawing);
+ VideoCore::g_renderer->Rasterizer()->DrawTriangles();
+ if (g_debug_context) {
+ g_debug_context->OnEvent(DebugContext::Event::FinishedPrimitiveBatch, nullptr);
+ }
+
break;
}
@@ -632,6 +647,6 @@ void ProcessCommandList(const u32* list, u32 size) {
}
}
-} // namespace
+} // namespace CommandProcessor
-} // namespace
+} // namespace Pica