diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-09-08 01:26:16 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-09-11 00:31:42 +0200 |
commit | e60d281a0172274371d6ef66ed4c422c91b8ea30 (patch) | |
tree | b7f9a842c86604fb0eedc804aaa0a96361dde644 /src/video_core | |
parent | renderer_opengl: Fix sRGB blits (diff) | |
download | yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.tar yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.tar.gz yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.tar.bz2 yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.tar.lz yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.tar.xz yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.tar.zst yuzu-e60d281a0172274371d6ef66ed4c422c91b8ea30.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index f7397dd64..4dd08bccb 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -485,6 +485,12 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers( View color_surface{ texture_cache.GetColorBufferSurface(*single_color_target, preserve_contents)}; + if (color_surface) { + // Assume that a surface will be written to if it is used as a framebuffer, even if + // the shader doesn't actually write to it. + texture_cache.MarkColorBufferInUse(*single_color_target); + } + fbkey.is_single_buffer = true; fbkey.color_attachments[0] = GL_COLOR_ATTACHMENT0 + static_cast<GLenum>(*single_color_target); @@ -499,6 +505,12 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers( for (std::size_t index = 0; index < Maxwell::NumRenderTargets; ++index) { View color_surface{texture_cache.GetColorBufferSurface(index, preserve_contents)}; + if (color_surface) { + // Assume that a surface will be written to if it is used as a framebuffer, even + // if the shader doesn't actually write to it. + texture_cache.MarkColorBufferInUse(index); + } + fbkey.color_attachments[index] = GL_COLOR_ATTACHMENT0 + regs.rt_control.GetMap(index); fbkey.colors[index] = color_surface; |