diff options
| author | 2020-02-28 01:22:00 -0500 | |
|---|---|---|
| committer | 2020-02-28 01:22:00 -0500 | |
| commit | c7db1ef5653b783980ebea8e65b175e36cc5f870 (patch) | |
| tree | 526f2fc329f2fe955c7a3f1884f8abba213465ea | |
| parent | Merge pull request #3430 from bunnei/split-presenter (diff) | |
| parent | renderer_opengl: Fix SRGB presentation frame tracking. (diff) | |
| download | yuzu-c7db1ef5653b783980ebea8e65b175e36cc5f870.tar.gz yuzu-c7db1ef5653b783980ebea8e65b175e36cc5f870.tar.xz yuzu-c7db1ef5653b783980ebea8e65b175e36cc5f870.zip | |
Merge pull request #3470 from bunnei/fix-smash-srgb
renderer_opengl: Fix SRGB presentation frame tracking.
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.h | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 447f69d4d..a4340b502 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -353,9 +353,9 @@ void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { | |||
| 353 | 353 | ||
| 354 | // Recreate the frame if the size of the window has changed | 354 | // Recreate the frame if the size of the window has changed |
| 355 | if (layout.width != frame->width || layout.height != frame->height || | 355 | if (layout.width != frame->width || layout.height != frame->height || |
| 356 | is_srgb != frame->is_srgb) { | 356 | screen_info.display_srgb != frame->is_srgb) { |
| 357 | LOG_DEBUG(Render_OpenGL, "Reloading render frame"); | 357 | LOG_DEBUG(Render_OpenGL, "Reloading render frame"); |
| 358 | is_srgb = frame->is_srgb = screen_info.display_srgb; | 358 | frame->is_srgb = screen_info.display_srgb; |
| 359 | frame_mailbox->ReloadRenderFrame(frame, layout.width, layout.height); | 359 | frame_mailbox->ReloadRenderFrame(frame, layout.width, layout.height); |
| 360 | } | 360 | } |
| 361 | state.draw.draw_framebuffer = frame->render.handle; | 361 | state.draw.draw_framebuffer = frame->render.handle; |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index 4107e10a9..d45e69cbc 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h | |||
| @@ -111,9 +111,6 @@ private: | |||
| 111 | Tegra::FramebufferConfig::TransformFlags framebuffer_transform_flags; | 111 | Tegra::FramebufferConfig::TransformFlags framebuffer_transform_flags; |
| 112 | Common::Rectangle<int> framebuffer_crop_rect; | 112 | Common::Rectangle<int> framebuffer_crop_rect; |
| 113 | 113 | ||
| 114 | /// Represents if the final render frame is sRGB | ||
| 115 | bool is_srgb{}; | ||
| 116 | |||
| 117 | /// Frame presentation mailbox | 114 | /// Frame presentation mailbox |
| 118 | std::unique_ptr<FrameMailbox> frame_mailbox; | 115 | std::unique_ptr<FrameMailbox> frame_mailbox; |
| 119 | }; | 116 | }; |