diff options
| author | 2023-01-08 14:05:29 -0500 | |
|---|---|---|
| committer | 2023-01-08 14:05:29 -0500 | |
| commit | 948ac976d101229d49cf830a7df66690dd3640e5 (patch) | |
| tree | d62e89bbc9669e4ac148d72e7ac117231537f719 /src | |
| parent | Merge pull request #9563 from german77/crash_not_allowed (diff) | |
| parent | VideoCore: Fix OGL cache invalidation. (diff) | |
| download | yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.gz yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.xz yuzu-948ac976d101229d49cf830a7df66690dd3640e5.zip | |
Merge pull request #9583 from FernandoS27/fuck-ogl-already
VideoCore: Fix OGL cache invalidation.
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 7d48af8e1..181857d9c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -139,6 +139,7 @@ void RasterizerOpenGL::LoadDiskResources(u64 title_id, std::stop_token stop_load | |||
| 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 | 141 | ||
| 142 | gpu_memory->FlushCaching(); | ||
| 142 | const auto& regs = maxwell3d->regs; | 143 | const auto& regs = maxwell3d->regs; |
| 143 | bool use_color{}; | 144 | bool use_color{}; |
| 144 | bool use_depth{}; | 145 | bool use_depth{}; |
| @@ -207,6 +208,7 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) { | |||
| 207 | MICROPROFILE_SCOPE(OpenGL_Drawing); | 208 | MICROPROFILE_SCOPE(OpenGL_Drawing); |
| 208 | 209 | ||
| 209 | SCOPE_EXIT({ gpu.TickWork(); }); | 210 | SCOPE_EXIT({ gpu.TickWork(); }); |
| 211 | gpu_memory->FlushCaching(); | ||
| 210 | query_cache.UpdateCounters(); | 212 | query_cache.UpdateCounters(); |
| 211 | 213 | ||
| 212 | GraphicsPipeline* const pipeline{shader_cache.CurrentGraphicsPipeline()}; | 214 | GraphicsPipeline* const pipeline{shader_cache.CurrentGraphicsPipeline()}; |
| @@ -319,6 +321,7 @@ void RasterizerOpenGL::DrawIndirect() { | |||
| 319 | } | 321 | } |
| 320 | 322 | ||
| 321 | void RasterizerOpenGL::DispatchCompute() { | 323 | void RasterizerOpenGL::DispatchCompute() { |
| 324 | gpu_memory->FlushCaching(); | ||
| 322 | ComputePipeline* const pipeline{shader_cache.CurrentComputePipeline()}; | 325 | ComputePipeline* const pipeline{shader_cache.CurrentComputePipeline()}; |
| 323 | if (!pipeline) { | 326 | if (!pipeline) { |
| 324 | return; | 327 | return; |
| @@ -526,6 +529,7 @@ void RasterizerOpenGL::TickFrame() { | |||
| 526 | } | 529 | } |
| 527 | 530 | ||
| 528 | bool RasterizerOpenGL::AccelerateConditionalRendering() { | 531 | bool RasterizerOpenGL::AccelerateConditionalRendering() { |
| 532 | gpu_memory->FlushCaching(); | ||
| 529 | if (Settings::IsGPULevelHigh()) { | 533 | if (Settings::IsGPULevelHigh()) { |
| 530 | // Reimplement Host conditional rendering. | 534 | // Reimplement Host conditional rendering. |
| 531 | return false; | 535 | return false; |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index ed4a72166..b75b8eec6 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -270,6 +270,7 @@ void RasterizerVulkan::Clear(u32 layer_count) { | |||
| 270 | MICROPROFILE_SCOPE(Vulkan_Clearing); | 270 | MICROPROFILE_SCOPE(Vulkan_Clearing); |
| 271 | 271 | ||
| 272 | FlushWork(); | 272 | FlushWork(); |
| 273 | gpu_memory->FlushCaching(); | ||
| 273 | 274 | ||
| 274 | query_cache.UpdateCounters(); | 275 | query_cache.UpdateCounters(); |
| 275 | 276 | ||
| @@ -628,6 +629,7 @@ void RasterizerVulkan::TickFrame() { | |||
| 628 | } | 629 | } |
| 629 | 630 | ||
| 630 | bool RasterizerVulkan::AccelerateConditionalRendering() { | 631 | bool RasterizerVulkan::AccelerateConditionalRendering() { |
| 632 | gpu_memory->FlushCaching(); | ||
| 631 | if (Settings::IsGPULevelHigh()) { | 633 | if (Settings::IsGPULevelHigh()) { |
| 632 | // TODO(Blinkhawk): Reimplement Host conditional rendering. | 634 | // TODO(Blinkhawk): Reimplement Host conditional rendering. |
| 633 | return false; | 635 | return false; |