diff options
author | Fernando S <fsahmkow27@gmail.com> | 2023-01-08 20:05:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-08 20:05:29 +0100 |
commit | 948ac976d101229d49cf830a7df66690dd3640e5 (patch) | |
tree | d62e89bbc9669e4ac148d72e7ac117231537f719 | |
parent | Merge pull request #9563 from german77/crash_not_allowed (diff) | |
parent | VideoCore: Fix OGL cache invalidation. (diff) | |
download | yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.gz yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.bz2 yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.lz yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.xz yuzu-948ac976d101229d49cf830a7df66690dd3640e5.tar.zst yuzu-948ac976d101229d49cf830a7df66690dd3640e5.zip |
-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 void RasterizerOpenGL::Clear(u32 layer_count) { MICROPROFILE_SCOPE(OpenGL_Clears); + gpu_memory->FlushCaching(); const auto& regs = maxwell3d->regs; bool use_color{}; bool use_depth{}; @@ -207,6 +208,7 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) { MICROPROFILE_SCOPE(OpenGL_Drawing); SCOPE_EXIT({ gpu.TickWork(); }); + gpu_memory->FlushCaching(); query_cache.UpdateCounters(); GraphicsPipeline* const pipeline{shader_cache.CurrentGraphicsPipeline()}; @@ -319,6 +321,7 @@ void RasterizerOpenGL::DrawIndirect() { } void RasterizerOpenGL::DispatchCompute() { + gpu_memory->FlushCaching(); ComputePipeline* const pipeline{shader_cache.CurrentComputePipeline()}; if (!pipeline) { return; @@ -526,6 +529,7 @@ void RasterizerOpenGL::TickFrame() { } bool RasterizerOpenGL::AccelerateConditionalRendering() { + gpu_memory->FlushCaching(); if (Settings::IsGPULevelHigh()) { // Reimplement Host conditional rendering. 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) { MICROPROFILE_SCOPE(Vulkan_Clearing); FlushWork(); + gpu_memory->FlushCaching(); query_cache.UpdateCounters(); @@ -628,6 +629,7 @@ void RasterizerVulkan::TickFrame() { } bool RasterizerVulkan::AccelerateConditionalRendering() { + gpu_memory->FlushCaching(); if (Settings::IsGPULevelHigh()) { // TODO(Blinkhawk): Reimplement Host conditional rendering. return false; |