mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 21:40:19 +00:00
vulkan: Code more defensively
Check for identity swizzle too, even though we don't use it.
This commit is contained in:
parent
b0f8550b01
commit
c594de8302
@ -47,10 +47,10 @@ G_DEFINE_TYPE (GskVulkanImage, gsk_vulkan_image, GSK_TYPE_GPU_IMAGE)
|
||||
static gboolean
|
||||
gsk_component_mapping_is_framebuffer_compatible (const VkComponentMapping *components)
|
||||
{
|
||||
if (components->r != VK_COMPONENT_SWIZZLE_R ||
|
||||
components->g != VK_COMPONENT_SWIZZLE_G ||
|
||||
components->b != VK_COMPONENT_SWIZZLE_B ||
|
||||
components->a != VK_COMPONENT_SWIZZLE_A)
|
||||
if ((components->r != VK_COMPONENT_SWIZZLE_R && components->r != VK_COMPONENT_SWIZZLE_IDENTITY) ||
|
||||
(components->g != VK_COMPONENT_SWIZZLE_G && components->g != VK_COMPONENT_SWIZZLE_IDENTITY) ||
|
||||
(components->b != VK_COMPONENT_SWIZZLE_B && components->b != VK_COMPONENT_SWIZZLE_IDENTITY) ||
|
||||
(components->a != VK_COMPONENT_SWIZZLE_A && components->a != VK_COMPONENT_SWIZZLE_IDENTITY))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user