From 7ddb21708c800dfbe3cea2df6aaaf7aed852761b Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 27 Aug 2016 21:39:16 -0700 Subject: intel/isl: Add an isl_swizzle structure and use it for isl_view swizzles This should be more compact than the enum isl_channel_select[4] that we were using before. It's also very convenient because we already had such a structure in the Vulkan driver we just needed to pull it over. Signed-off-by: Jason Ekstrand Reviewed-by: Topi Pohjolainen --- src/intel/vulkan/anv_formats.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/intel/vulkan/anv_formats.c') diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index a746cd3..ff59f47 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -24,13 +24,6 @@ #include "anv_private.h" #include "vk_format_info.h" -#define ISL_SWIZZLE(r, g, b, a) { \ - ISL_CHANNEL_SELECT_##r, \ - ISL_CHANNEL_SELECT_##g, \ - ISL_CHANNEL_SELECT_##b, \ - ISL_CHANNEL_SELECT_##a, \ -} - #define RGBA ISL_SWIZZLE(RED, GREEN, BLUE, ALPHA) #define BGRA ISL_SWIZZLE(BLUE, GREEN, RED, ALPHA) #define RGB1 ISL_SWIZZLE(RED, GREEN, BLUE, ONE) @@ -283,7 +276,7 @@ anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format, format.isl_format = rgbx; } else { format.isl_format = isl_format_rgb_to_rgba(format.isl_format); - format.swizzle = (struct anv_format_swizzle) RGB1; + format.swizzle = RGB1; } } -- cgit v1.1