Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/wined3d_private.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 5f6d673bfdf..8e06bf28897 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3794,6 +3794,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, d3d_info->draw_base_vertex_offset = !!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]; d3d_info->vertex_bgra = !!gl_info->supported[ARB_VERTEX_ARRAY_BGRA]; d3d_info->texture_swizzle = !!gl_info->supported[ARB_TEXTURE_SWIZZLE]; + d3d_info->srgb_read_control = !!gl_info->supported[EXT_TEXTURE_SRGB_DECODE];
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) d3d_info->multisample_draw_location = WINED3D_LOCATION_TEXTURE_RGB; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index fd68cbd3ee2..fe4510e01bf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -212,6 +212,7 @@ struct wined3d_d3d_info unsigned int draw_base_vertex_offset : 1; unsigned int vertex_bgra : 1; unsigned int texture_swizzle : 1; + unsigned int srgb_read_control : 1; enum wined3d_feature_level feature_level;
DWORD multisample_draw_location; @@ -4819,7 +4820,7 @@ static inline BOOL needs_separate_srgb_gl_texture(const struct wined3d_context * unsigned int flags = texture->resource.format_flags & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE);
- return (!context->gl_info->supported[EXT_TEXTURE_SRGB_DECODE] + return (!context->d3d_info->srgb_read_control || (flags && flags != (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE))) && context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL; }