aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-05 19:29:26 -0400
committerGitHub <noreply@github.com>2020-04-05 19:29:26 -0400
commit1633fbf99a147c4d97b1ce1fee2044499c70bb93 (patch)
tree0244b505717bb098f68d18a14aa851c4e8b38034 /src
parent59e75f4372deb8bbdab8dd40ff78006b7cce6a10 (diff)
parent1c5e2b60a76a473022b8cb7e7b2fcb99f72e9eab (diff)
Merge pull request #3589 from ReinUsesLisp/fix-clears
gl_rasterizer: Mark cleared textures as dirty
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 31add708f6..346feeb2f1 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
texture_cache.GuardRenderTargets(true);
View color_surface;
if (using_color_fb) {
- color_surface = texture_cache.GetColorBufferSurface(regs.clear_buffers.RT, false);
+ const std::size_t index = regs.clear_buffers.RT;
+ color_surface = texture_cache.GetColorBufferSurface(index, true);
+ texture_cache.MarkColorBufferInUse(index);
}
View depth_surface;
if (using_depth_fb || using_stencil_fb) {
- depth_surface = texture_cache.GetDepthBufferSurface(false);
+ depth_surface = texture_cache.GetDepthBufferSurface(true);
+ texture_cache.MarkDepthBufferInUse();
}
texture_cache.GuardRenderTargets(false);