mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wined3d: Set proper GL internal format for sRGB formats.
The idea was to defer that part to check_fbo_compat() for the FBO ORM
but, it turns out, there are formats like DXTn that aren't generally
FBO-attachable but still support sRGB.
Fixes 9fc3444d6e
(it's a partial revert,
in fact).
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
35bdd1bb15
commit
41e35425a8
1 changed files with 2 additions and 4 deletions
|
@ -3053,8 +3053,7 @@ static void query_internal_format(struct wined3d_adapter *adapter,
|
|||
if (!(format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D]
|
||||
& (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE)))
|
||||
format->srgb_internal = format->internal;
|
||||
else if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
&& gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
|
||||
else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
|
||||
format->internal = format->srgb_internal;
|
||||
}
|
||||
}
|
||||
|
@ -3076,8 +3075,7 @@ static void query_internal_format(struct wined3d_adapter *adapter,
|
|||
format->srgb_internal = format->internal;
|
||||
format_clear_flag(&format->f, WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE);
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
|
||||
&& gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
|
||||
else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
|
||||
{
|
||||
format->internal = format->srgb_internal;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue