=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Take sRGB_decode into account in texture_srgb_mode.

Alexandre Julliard julliard at winehq.org
Wed Oct 9 14:22:14 CDT 2013


Module: wine
Branch: master
Commit: 16f7c24296f2fbcfa7d8a18bf0f0a00c340d3e70
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=16f7c24296f2fbcfa7d8a18bf0f0a00c340d3e70

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Oct  9 12:37:58 2013 +0200

wined3d: Take sRGB_decode into account in texture_srgb_mode.

---

 dlls/wined3d/texture.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 56d13f6..0f3c470 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -658,6 +658,7 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
 
 static BOOL texture_srgb_mode(const struct wined3d_texture *texture, enum WINED3DSRGB srgb)
 {
+    const struct wined3d_gl_info *gl_info = &texture->resource.device->adapter->gl_info;
     switch (srgb)
     {
         case SRGB_RGB:
@@ -667,7 +668,8 @@ static BOOL texture_srgb_mode(const struct wined3d_texture *texture, enum WINED3
             return TRUE;
 
         default:
-            return texture->flags & WINED3D_TEXTURE_IS_SRGB;
+            return !gl_info->supported[EXT_TEXTURE_SRGB_DECODE]
+                    && texture->flags & WINED3D_TEXTURE_IS_SRGB;
     }
 }
 




More information about the wine-cvs mailing list