Matteo Bruni : wined3d: Set proper GL internal format for sRGB formats.

Alexandre Julliard julliard at winehq.org
Mon Jan 14 16:21:49 CST 2019


Module: wine
Branch: master
Commit: 41e35425a8f045b2c421999f020932ed339909fd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=41e35425a8f045b2c421999f020932ed339909fd

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Fri Jan 11 00:25:12 2019 +0100

wined3d: Set proper GL internal format for sRGB formats.

The idea was to defer that part to check_fbo_compat() for the FBO ORM
but, it turns out, there are formats like DXTn that aren't generally
FBO-attachable but still support sRGB.

Fixes 9fc3444d6ed8ad0e124a77d2faf1e2cc6639f40f (it's a partial revert,
in fact).

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/utils.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index f8da256..dd70d3f 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3053,8 +3053,7 @@ static void query_internal_format(struct wined3d_adapter *adapter,
             if (!(format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D]
                     & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE)))
                 format->srgb_internal = format->internal;
-            else if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
-                    && gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
+            else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
                 format->internal = format->srgb_internal;
         }
     }
@@ -3076,8 +3075,7 @@ static void query_internal_format(struct wined3d_adapter *adapter,
                 format->srgb_internal = format->internal;
                 format_clear_flag(&format->f, WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE);
             }
-            else if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
-                    && gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
+            else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
             {
                 format->internal = format->srgb_internal;
             }




More information about the wine-cvs mailing list