فهرست منبع

renderer_opengl: Fix SRGB presentation frame tracking.

- Fixes SRGB in Super Smash Bros. Ultimate.
bunnei 6 سال پیش
والد
کامیت
5056d23d0d
2فایلهای تغییر یافته به همراه2 افزوده شده و 5 حذف شده
  1. 2 2
      src/video_core/renderer_opengl/renderer_opengl.cpp
  2. 0 3
      src/video_core/renderer_opengl/renderer_opengl.h

+ 2 - 2
src/video_core/renderer_opengl/renderer_opengl.cpp

@@ -353,9 +353,9 @@ void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
 
         // Recreate the frame if the size of the window has changed
         if (layout.width != frame->width || layout.height != frame->height ||
-            is_srgb != frame->is_srgb) {
+            screen_info.display_srgb != frame->is_srgb) {
             LOG_DEBUG(Render_OpenGL, "Reloading render frame");
-            is_srgb = frame->is_srgb = screen_info.display_srgb;
+            frame->is_srgb = screen_info.display_srgb;
             frame_mailbox->ReloadRenderFrame(frame, layout.width, layout.height);
         }
         state.draw.draw_framebuffer = frame->render.handle;

+ 0 - 3
src/video_core/renderer_opengl/renderer_opengl.h

@@ -111,9 +111,6 @@ private:
     Tegra::FramebufferConfig::TransformFlags framebuffer_transform_flags;
     Common::Rectangle<int> framebuffer_crop_rect;
 
-    /// Represents if the final render frame is sRGB
-    bool is_srgb{};
-
     /// Frame presentation mailbox
     std::unique_ptr<FrameMailbox> frame_mailbox;
 };