summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 31add708f..346feeb2f 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -386,11 +386,14 @@ void RasterizerOpenGL::ConfigureClearFramebuffer(bool using_color_fb, bool using
386 texture_cache.GuardRenderTargets(true); 386 texture_cache.GuardRenderTargets(true);
387 View color_surface; 387 View color_surface;
388 if (using_color_fb) { 388 if (using_color_fb) {
389 color_surface = texture_cache.GetColorBufferSurface(regs.clear_buffers.RT, false); 389 const std::size_t index = regs.clear_buffers.RT;
390 color_surface = texture_cache.GetColorBufferSurface(index, true);
391 texture_cache.MarkColorBufferInUse(index);
390 } 392 }
391 View depth_surface; 393 View depth_surface;
392 if (using_depth_fb || using_stencil_fb) { 394 if (using_depth_fb || using_stencil_fb) {
393 depth_surface = texture_cache.GetDepthBufferSurface(false); 395 depth_surface = texture_cache.GetDepthBufferSurface(true);
396 texture_cache.MarkDepthBufferInUse();
394 } 397 }
395 texture_cache.GuardRenderTargets(false); 398 texture_cache.GuardRenderTargets(false);
396 399