Henri Verbeet : wined3d: Disable sRGB decoding in draw_textured_quad().
Alexandre Julliard
julliard at winehq.org
Fri Sep 9 10:56:45 CDT 2011
Module: wine
Branch: master
Commit: e82e1c2ac5145a63592baa2c2f5009b3cc343521
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e82e1c2ac5145a63592baa2c2f5009b3cc343521
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Sep 8 23:50:35 2011 +0200
wined3d: Disable sRGB decoding in draw_textured_quad().
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;
}
}
More information about the wine-cvs
mailing list