Commit 41e35425 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

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 9fc3444d (it's a partial revert, in fact). Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 35bdd1bb
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment