From: Rhys Perry Date: Wed, 19 Feb 2020 11:45:59 +0000 (+0000) Subject: radv: fix invalid conversion warnings in vk_format.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40b65a86a45d5ffa604b5563d1ccaa1a897007ad;p=mesa.git radv: fix invalid conversion warnings in vk_format.h Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/vk_format.h b/src/amd/vulkan/vk_format.h index 0b62ea721fa..285de63528f 100644 --- a/src/amd/vulkan/vk_format.h +++ b/src/amd/vulkan/vk_format.h @@ -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");