mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 08:20:36 +00:00
vulkan: Don't try to use nonexisting formats
Handle the error that new rgba format exists.
This commit is contained in:
parent
ebc6a043c9
commit
0516dca116
@ -283,8 +283,10 @@ gsk_vulkan_image_new (GskVulkanDevice *device,
|
||||
|
||||
/* Second, try the potential RGBA format */
|
||||
vk_format = gdk_memory_format_vk_rgba_format (format, &rgba_format, &vk_components);
|
||||
if (try_srgb)
|
||||
if (try_srgb && vk_format != VK_FORMAT_UNDEFINED)
|
||||
vk_srgb_format = gdk_memory_format_vk_srgb_format (rgba_format);
|
||||
else
|
||||
vk_srgb_format = VK_FORMAT_UNDEFINED;
|
||||
if (gsk_vulkan_device_check_format (device, vk_srgb_format, &vk_components, required_flags,
|
||||
tiling, usage, width, height,
|
||||
&tiling, &flags))
|
||||
|
Loading…
Reference in New Issue
Block a user