From 40b65a86a45d5ffa604b5563d1ccaa1a897007ad Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 19 Feb 2020 11:45:59 +0000 Subject: [PATCH] radv: fix invalid conversion warnings in vk_format.h Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/vk_format.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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"); -- 2.30.2