wined3d: Take sRGB_decode into account in texture_srgb_mode.

This commit is contained in:
Stefan Dösinger 2013-10-09 12:37:58 +02:00 committed by Alexandre Julliard
parent 7025117026
commit 16f7c24296
1 changed files with 3 additions and 1 deletions

View File

@ -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) 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) switch (srgb)
{ {
case SRGB_RGB: case SRGB_RGB:
@ -667,7 +668,8 @@ static BOOL texture_srgb_mode(const struct wined3d_texture *texture, enum WINED3
return TRUE; return TRUE;
default: default:
return texture->flags & WINED3D_TEXTURE_IS_SRGB; return !gl_info->supported[EXT_TEXTURE_SRGB_DECODE]
&& texture->flags & WINED3D_TEXTURE_IS_SRGB;
} }
} }