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>
This commit is contained in:
parent
adedebf47a
commit
ce77ef4ea0
|
@ -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,
|
static inline BOOL needs_separate_srgb_gl_texture(const struct wined3d_context *context,
|
||||||
const struct wined3d_texture *texture)
|
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]
|
return (!context->gl_info->supported[EXT_TEXTURE_SRGB_DECODE]
|
||||||
|| (flags & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE))
|
|| (flags && flags != (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE)))
|
||||||
!= (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE))
|
|
||||||
&& context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL;
|
&& context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue