Commit 34b7e19c authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Initialise typeless_id for typeless formats early.

Allows us to use wined3d_format_is_typeless() while initialising formats. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 15e594ae
......@@ -2025,7 +2025,7 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter)
for (i = 0; i < ARRAY_SIZE(typed_formats); ++i)
{
const struct wined3d_format *typeless_format;
struct wined3d_format *typeless_format;
unsigned int component_count = 0;
DWORD flags = 0;
......@@ -2052,6 +2052,8 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter)
format->block_byte_count = typeless_format->block_byte_count;
format->typeless_id = typeless_format->id;
typeless_format->typeless_id = typeless_format->id;
for (j = 0; j < strlen(typed_formats[i].channels); ++j)
{
enum wined3d_channel_type channel_type = map_channel_type(typed_formats[i].channels[j]);
......
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