Module: wine Branch: master Commit: ce77ef4ea0d38c9fe21584bbc777249f65092a57 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ce77ef4ea0d38c9fe21584bbc7...
Author: Matteo Bruni mbruni@codeweavers.com Date: Fri Feb 24 19:37:24 2017 +0100
wined3d: Don't require a separate sRGB GL texture if the format doesn't support sRGB reads.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/wined3d_private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7950011..4ccef50 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3914,11 +3914,11 @@ static inline void context_apply_state(struct wined3d_context *context, static inline BOOL needs_separate_srgb_gl_texture(const struct wined3d_context *context, const struct wined3d_texture *texture) { - unsigned int flags = texture->resource.format_flags; + unsigned int flags = texture->resource.format_flags + & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE);
return (!context->gl_info->supported[EXT_TEXTURE_SRGB_DECODE] - || (flags & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE)) - != (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE)) + || (flags && flags != (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE))) && context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL; }