diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/draw_manager.cpp | 13 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 3 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/video_core/engines/draw_manager.cpp b/src/video_core/engines/draw_manager.cpp index 36e4ec89d..49a16266e 100644 --- a/src/video_core/engines/draw_manager.cpp +++ b/src/video_core/engines/draw_manager.cpp | |||
| @@ -52,12 +52,15 @@ void DrawManager::ProcessMethodCall(u32 method, u32 argument) { | |||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void DrawManager::Clear(u32 layer_count) { | 54 | void DrawManager::Clear(u32 layer_count) { |
| 55 | maxwell3d->rasterizer->Clear(layer_count); | 55 | if (maxwell3d->ShouldExecute()) { |
| 56 | maxwell3d->rasterizer->Clear(layer_count); | ||
| 57 | } | ||
| 56 | } | 58 | } |
| 57 | 59 | ||
| 58 | void DrawManager::DrawDeferred() { | 60 | void DrawManager::DrawDeferred() { |
| 59 | if (draw_state.draw_mode != DrawMode::Instance || draw_state.instance_count == 0) | 61 | if (draw_state.draw_mode != DrawMode::Instance || draw_state.instance_count == 0) { |
| 60 | return; | 62 | return; |
| 63 | } | ||
| 61 | DrawEnd(draw_state.instance_count + 1, true); | 64 | DrawEnd(draw_state.instance_count + 1, true); |
| 62 | draw_state.instance_count = 0; | 65 | draw_state.instance_count = 0; |
| 63 | } | 66 | } |
| @@ -112,8 +115,9 @@ void DrawManager::DrawEnd(u32 instance_count, bool force_draw) { | |||
| 112 | const auto& regs{maxwell3d->regs}; | 115 | const auto& regs{maxwell3d->regs}; |
| 113 | switch (draw_state.draw_mode) { | 116 | switch (draw_state.draw_mode) { |
| 114 | case DrawMode::Instance: | 117 | case DrawMode::Instance: |
| 115 | if (!force_draw) | 118 | if (!force_draw) { |
| 116 | break; | 119 | break; |
| 120 | } | ||
| 117 | [[fallthrough]]; | 121 | [[fallthrough]]; |
| 118 | case DrawMode::General: | 122 | case DrawMode::General: |
| 119 | draw_state.base_instance = regs.global_base_instance_index; | 123 | draw_state.base_instance = regs.global_base_instance_index; |
| @@ -185,7 +189,8 @@ void DrawManager::ProcessDraw(bool draw_indexed, u32 instance_count) { | |||
| 185 | 189 | ||
| 186 | UpdateTopology(); | 190 | UpdateTopology(); |
| 187 | 191 | ||
| 188 | if (maxwell3d->ShouldExecute()) | 192 | if (maxwell3d->ShouldExecute()) { |
| 189 | maxwell3d->rasterizer->Draw(draw_indexed, instance_count); | 193 | maxwell3d->rasterizer->Draw(draw_indexed, instance_count); |
| 194 | } | ||
| 190 | } | 195 | } |
| 191 | } // namespace Tegra::Engines | 196 | } // namespace Tegra::Engines |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 64ed6f628..a44b8c454 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -138,9 +138,6 @@ void RasterizerOpenGL::LoadDiskResources(u64 title_id, std::stop_token stop_load | |||
| 138 | 138 | ||
| 139 | void RasterizerOpenGL::Clear(u32 layer_count) { | 139 | void RasterizerOpenGL::Clear(u32 layer_count) { |
| 140 | MICROPROFILE_SCOPE(OpenGL_Clears); | 140 | MICROPROFILE_SCOPE(OpenGL_Clears); |
| 141 | if (!maxwell3d->ShouldExecute()) { | ||
| 142 | return; | ||
| 143 | } | ||
| 144 | 141 | ||
| 145 | const auto& regs = maxwell3d->regs; | 142 | const auto& regs = maxwell3d->regs; |
| 146 | bool use_color{}; | 143 | bool use_color{}; |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 8d7a5e400..c9ace956c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -216,9 +216,6 @@ void RasterizerVulkan::Draw(bool is_indexed, u32 instance_count) { | |||
| 216 | void RasterizerVulkan::Clear(u32 layer_count) { | 216 | void RasterizerVulkan::Clear(u32 layer_count) { |
| 217 | MICROPROFILE_SCOPE(Vulkan_Clearing); | 217 | MICROPROFILE_SCOPE(Vulkan_Clearing); |
| 218 | 218 | ||
| 219 | if (!maxwell3d->ShouldExecute()) { | ||
| 220 | return; | ||
| 221 | } | ||
| 222 | FlushWork(); | 219 | FlushWork(); |
| 223 | 220 | ||
| 224 | query_cache.UpdateCounters(); | 221 | query_cache.UpdateCounters(); |