wined3d: Properly convert Vulkan sample count format information.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e796da7a5e
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
74d58e6e27
commit
84d4d9195d
|
@ -4133,6 +4133,7 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
const char *fixup;
|
const char *fixup;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
uint32_t mask;
|
||||||
VkResult vr;
|
VkResult vr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(vulkan_formats); ++i)
|
for (i = 0; i < ARRAY_SIZE(vulkan_formats); ++i)
|
||||||
|
@ -4208,7 +4209,13 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
|
||||||
ERR("Failed to get image format properties, vr %s.\n", wined3d_debug_vkresult(vr));
|
ERR("Failed to get image format properties, vr %s.\n", wined3d_debug_vkresult(vr));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
format->f.multisample_types = image_properties.sampleCounts;
|
|
||||||
|
mask = image_properties.sampleCounts & 0x3f;
|
||||||
|
while (mask)
|
||||||
|
{
|
||||||
|
i = (1u << wined3d_bit_scan(&mask)) - 1;
|
||||||
|
format->f.multisample_types |= 1u << i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue