summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-09-03 06:05:23 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-09-11 00:31:42 +0200
commit78574746bddb1d62d85ae90707e1f0283af2a5db (patch)
tree281fa538f3a86d1bb56b5a3887287fa2d4a8883d /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentMerge pull request #2823 from ReinUsesLisp/shr-clamp (diff)
downloadyuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.tar
yuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.tar.gz
yuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.tar.bz2
yuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.tar.lz
yuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.tar.xz
yuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.tar.zst
yuzu-78574746bddb1d62d85ae90707e1f0283af2a5db.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 4e266cdad..f7397dd64 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -485,15 +485,6 @@ 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);
- // Workaround for and issue in nvidia drivers
- // https://devtalk.nvidia.com/default/topic/776591/opengl/gl_framebuffer_srgb-functions-incorrectly/
- state.framebuffer_srgb.enabled |= color_surface->GetSurfaceParams().srgb_conversion;
- }
-
fbkey.is_single_buffer = true;
fbkey.color_attachments[0] =
GL_COLOR_ATTACHMENT0 + static_cast<GLenum>(*single_color_target);
@@ -508,17 +499,6 @@ 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);
- // Enable sRGB only for supported formats
- // Workaround for and issue in nvidia drivers
- // https://devtalk.nvidia.com/default/topic/776591/opengl/gl_framebuffer_srgb-functions-incorrectly/
- state.framebuffer_srgb.enabled |=
- color_surface->GetSurfaceParams().srgb_conversion;
- }
-
fbkey.color_attachments[index] =
GL_COLOR_ATTACHMENT0 + regs.rt_control.GetMap(index);
fbkey.colors[index] = color_surface;
@@ -906,6 +886,7 @@ bool RasterizerOpenGL::AccelerateDisplay(const Tegra::FramebufferConfig& config,
}
screen_info.display_texture = surface->GetTexture();
+ screen_info.display_srgb = surface->GetSurfaceParams().srgb_conversion;
return true;
}