radv: fix invalid conversion warnings in vk_format.h
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6013>
This commit is contained in:
parent
fcd8f69113
commit
40b65a86a4
|
@ -280,22 +280,22 @@ radv_swizzle_conv(VkComponentSwizzle component, const unsigned char chan[4], VkC
|
|||
case VK_COMPONENT_SWIZZLE_R:
|
||||
for (x = 0; x < 4; x++)
|
||||
if (chan[x] == 0)
|
||||
return x;
|
||||
return (enum vk_swizzle)x;
|
||||
return VK_SWIZZLE_0;
|
||||
case VK_COMPONENT_SWIZZLE_G:
|
||||
for (x = 0; x < 4; x++)
|
||||
if (chan[x] == 1)
|
||||
return x;
|
||||
return (enum vk_swizzle)x;
|
||||
return VK_SWIZZLE_0;
|
||||
case VK_COMPONENT_SWIZZLE_B:
|
||||
for (x = 0; x < 4; x++)
|
||||
if (chan[x] == 2)
|
||||
return x;
|
||||
return (enum vk_swizzle)x;
|
||||
return VK_SWIZZLE_0;
|
||||
case VK_COMPONENT_SWIZZLE_A:
|
||||
for (x = 0; x < 4; x++)
|
||||
if (chan[x] == 3)
|
||||
return x;
|
||||
return (enum vk_swizzle)x;
|
||||
return VK_SWIZZLE_1;
|
||||
default:
|
||||
unreachable("Illegal swizzle");
|
||||
|
|
Loading…
Reference in New Issue