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

@@ -111,12 +111,7 @@ brw_blorp_surface_info_init(struct blorp_context *blorp,
.format = format,
.base_level = level,
.levels = 1,
.channel_select = {
ISL_CHANNEL_SELECT_RED,
ISL_CHANNEL_SELECT_GREEN,
ISL_CHANNEL_SELECT_BLUE,
ISL_CHANNEL_SELECT_ALPHA,
},
.swizzle = ISL_SWIZZLE_IDENTITY,
};
info->view.array_len = MAX2(info->surf.logical_level0_px.depth,