Józef Kucia : wined3d: Initialise typeless_id for typeless formats early.
Module: wine Branch: master Commit: 34b7e19cdbf5504519fe6a5cfcbfaf371a56f000 URL: https://source.winehq.org/git/wine.git/?a=commit;h=34b7e19cdbf5504519fe6a5cf... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Sep 17 11:06:25 2018 +0200 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(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index eb4001d..0d87ffd 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -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]);
participants (1)
-
Alexandre Julliard