Commit 59ef8975 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Explicitly initialise sRGB format info.

For the GL adapter this already happens implicitly in init_format_texture_info(). Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 74dc66ca
......@@ -2171,6 +2171,24 @@ static BOOL init_format_decompress_info(struct wined3d_adapter *adapter)
return TRUE;
}
static BOOL init_srgb_formats(struct wined3d_adapter *adapter)
{
struct wined3d_format *format, *srgb_format;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(format_srgb_info); ++i)
{
if (!(srgb_format = get_format_internal(adapter, format_srgb_info[i].srgb_format_id)))
return FALSE;
if (!(format = get_format_internal(adapter, format_srgb_info[i].base_format_id)))
return FALSE;
copy_format(adapter, srgb_format, format);
}
return TRUE;
}
static GLenum wined3d_gl_type_to_enum(enum wined3d_gl_resource_type type)
{
switch (type)
......@@ -3990,6 +4008,8 @@ static BOOL wined3d_adapter_init_format_info(struct wined3d_adapter *adapter, si
goto fail;
if (!init_format_decompress_info(adapter))
goto fail;
if (!init_srgb_formats(adapter))
goto fail;
return TRUE;
......
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