[PATCH 1/5] wined3d: Disable sRGB decoding in draw_textured_quad().
Henri Verbeet
hverbeet at codeweavers.com
Thu Sep 8 16:50:35 CDT 2011
We're always supposed to draw the RGB texture here. sRGB decoding may be
enabled if sRGB decoding was enabled to last time the surface was used as a
texture, or if it was never used as a texture at all.
---
dlls/wined3d/surface.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4cc04cb..d62e31c 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -332,6 +332,8 @@ void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3
checkGLcall("glTexParameteri");
glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP);
+ if (context->gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
+ glTexParameteri(info.bind_target, GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
checkGLcall("glTexEnvi");
@@ -361,6 +363,7 @@ void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3
texture->texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT;
texture->texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT;
texture->texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE;
+ texture->texture_rgb.states[WINED3DTEXSTA_SRGBTEXTURE] = FALSE;
}
}
--
1.7.3.4
More information about the wine-patches
mailing list