1
0
Fork 0
forked from suyu/suyu

Merge pull request #3589 from ReinUsesLisp/fix-clears

gl_rasterizer: Mark cleared textures as dirty
This commit is contained in:
Fernando Sahmkow 2020-04-05 19:29:26 -04:00 committed by GitHub
commit 1633fbf99a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -386,11 +386,14 @@ void RasterizerOpenGL::ConfigureClearFramebuffer(bool using_color_fb, bool using
texture_cache.GuardRenderTargets(true); texture_cache.GuardRenderTargets(true);
View color_surface; View color_surface;
if (using_color_fb) { 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; View depth_surface;
if (using_depth_fb || using_stencil_fb) { 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); texture_cache.GuardRenderTargets(false);