summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-05-15 21:31:38 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-05-17 12:17:22 -0700
commit7cae59012d98959a997ef96c217adba0dc8b3ed7 (patch)
tree1fe5d14f21e30fd1ac1435365650930e54cc8920 /src/intel/vulkan/anv_image.c
parent8ed429a4f0d58eafe3e3212552af6fb0cb78feeb (diff)
downloadexternal_mesa3d-7cae59012d98959a997ef96c217adba0dc8b3ed7.zip
external_mesa3d-7cae59012d98959a997ef96c217adba0dc8b3ed7.tar.gz
external_mesa3d-7cae59012d98959a997ef96c217adba0dc8b3ed7.tar.bz2
anv/formats: Use the isl_channel_select enum for the swizzle
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r--src/intel/vulkan/anv_image.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 75c02b3..f517aa6 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -415,18 +415,12 @@ remap_swizzle(VkComponentSwizzle swizzle, VkComponentSwizzle component,
swizzle = component;
switch (swizzle) {
- case VK_COMPONENT_SWIZZLE_ZERO:
- return ISL_CHANNEL_SELECT_ZERO;
- case VK_COMPONENT_SWIZZLE_ONE:
- return ISL_CHANNEL_SELECT_ONE;
- case VK_COMPONENT_SWIZZLE_R:
- return ISL_CHANNEL_SELECT_RED + format_swizzle.r;
- case VK_COMPONENT_SWIZZLE_G:
- return ISL_CHANNEL_SELECT_RED + format_swizzle.g;
- case VK_COMPONENT_SWIZZLE_B:
- return ISL_CHANNEL_SELECT_RED + format_swizzle.b;
- case VK_COMPONENT_SWIZZLE_A:
- return ISL_CHANNEL_SELECT_RED + format_swizzle.a;
+ case VK_COMPONENT_SWIZZLE_ZERO: return ISL_CHANNEL_SELECT_ZERO;
+ case VK_COMPONENT_SWIZZLE_ONE: return ISL_CHANNEL_SELECT_ONE;
+ case VK_COMPONENT_SWIZZLE_R: return format_swizzle.r;
+ case VK_COMPONENT_SWIZZLE_G: return format_swizzle.g;
+ case VK_COMPONENT_SWIZZLE_B: return format_swizzle.b;
+ case VK_COMPONENT_SWIZZLE_A: return format_swizzle.a;
default:
unreachable("Invalid swizzle");
}