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 <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Jason Ekstrand
2016-08-27 21:39:16 -07:00
parent 376d1dc2f1
commit 7ddb21708c
8 changed files with 48 additions and 64 deletions

View File

@@ -1621,16 +1621,9 @@ anv_graphics_pipeline_create(VkDevice device,
const VkAllocationCallbacks *alloc,
VkPipeline *pPipeline);
struct anv_format_swizzle {
enum isl_channel_select r:4;
enum isl_channel_select g:4;
enum isl_channel_select b:4;
enum isl_channel_select a:4;
};
struct anv_format {
enum isl_format isl_format:16;
struct anv_format_swizzle swizzle;
struct isl_swizzle swizzle;
};
struct anv_format