[PATCH v2 1/5] wined3d: Don't touch GL sRGB decode state when not supported.

Matteo Bruni wine at gitlab.winehq.org
Tue May 24 15:52:59 CDT 2022


From: Matteo Bruni <mbruni at codeweavers.com>

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/wined3d/view.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index dbd385219f0..c502fcba992 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -1306,7 +1306,8 @@ void wined3d_shader_resource_view_gl_generate_mipmap(struct wined3d_shader_resou
     if (gl_info->supported[ARB_SAMPLER_OBJECTS])
         GL_EXTCALL(glBindSampler(context_gl->active_texture, 0));
     gl_tex = wined3d_texture_gl_get_gl_texture(texture_gl, srgb);
-    if (context_gl->c.d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL)
+    if (context_gl->c.d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL
+            && gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
     {
         gl_info->gl_ops.gl.p_glTexParameteri(texture_gl->target,
                 GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT);
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/101



More information about the wine-devel mailing list