wined3d: Initialise typeless_id for typeless formats early.
Allows us to use wined3d_format_is_typeless() while initialising formats. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
15e594ae47
commit
34b7e19cdb
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue