<div dir="ltr">All my comments below are on chunks that are no longer needed now that anv_get_isl_format hasn't had it's name changed. Take or leave them as your personal level of pedantry dictates. :)<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 4, 2017 at 10:34 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A given Vulkan format can now be decomposed into a set of planes. We<br>
now use 'struct anv_format_plane' to represent the format of those<br>
planes.<br>
<br>
v2: by Jason<br>
Rename anv_get_plane_format() to anv_get_format_plane()<br>
Don't rename anv_get_isl_format()<br>
Replace ds_fmt() by fmt2()<br>
Introduce fmt_unsupported()<br>
<br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
---<br>
src/intel/vulkan/anv_blorp.c | 18 +-<br>
src/intel/vulkan/anv_formats.c | 512 +++++++++++++++++++++---------<wbr>---------<br>
src/intel/vulkan/anv_image.c | 12 +-<br>
src/intel/vulkan/anv_private.h | 54 ++++-<br>
src/intel/vulkan/genX_<wbr>pipeline.c | 7 +-<br>
5 files changed, 339 insertions(+), 264 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c<br>
index 8dead1d87a8..187042c71cf 100644<br>
--- a/src/intel/vulkan/anv_blorp.c<br>
+++ b/src/intel/vulkan/anv_blorp.c<br>
@@ -459,12 +459,12 @@ void anv_CmdBlitImage(<br>
get_blorp_surf_for_anv_image(<wbr>dst_image, dst_res->aspectMask,<br>
dst_image->aux_usage, &dst);<br>
<br>
- struct anv_format src_format =<br>
- anv_get_format(&cmd_buffer-><wbr>device->info, src_image->vk_format,<br>
- src_res->aspectMask, src_image->tiling);<br>
- struct anv_format dst_format =<br>
- anv_get_format(&cmd_buffer-><wbr>device->info, dst_image->vk_format,<br>
- dst_res->aspectMask, dst_image->tiling);<br>
+ struct anv_format_plane src_format =<br>
+ anv_get_format_plane(&cmd_<wbr>buffer->device->info, src_image->vk_format,<br>
+ src_res->aspectMask, src_image->tiling);<br>
+ struct anv_format_plane dst_format =<br>
+ anv_get_format_plane(&cmd_<wbr>buffer->device->info, dst_image->vk_format,<br>
+ dst_res->aspectMask, dst_image->tiling);<br>
<br>
unsigned dst_start, dst_end;<br>
if (dst_image->type == VK_IMAGE_TYPE_3D) {<br>
@@ -758,9 +758,9 @@ void anv_CmdClearColorImage(<br>
<br>
assert(pRanges[r].aspectMask == VK_IMAGE_ASPECT_COLOR_BIT);<br>
<br>
- struct anv_format src_format =<br>
- anv_get_format(&cmd_buffer-><wbr>device->info, image->vk_format,<br>
- VK_IMAGE_ASPECT_COLOR_BIT, image->tiling);<br>
+ struct anv_format_plane src_format =<br>
+ anv_get_format_plane(&cmd_<wbr>buffer->device->info, image->vk_format,<br>
+ VK_IMAGE_ASPECT_COLOR_BIT, image->tiling);<br>
<br>
unsigned base_layer = pRanges[r].baseArrayLayer;<br>
unsigned layer_count = anv_get_layerCount(image, &pRanges[r]);<br>
diff --git a/src/intel/vulkan/anv_<wbr>formats.c b/src/intel/vulkan/anv_<wbr>formats.c<br>
index 9db80ba14e3..e623b4f6324 100644<br>
--- a/src/intel/vulkan/anv_<wbr>formats.c<br>
+++ b/src/intel/vulkan/anv_<wbr>formats.c<br>
@@ -44,14 +44,40 @@<br>
#define BGRA _ISL_SWIZZLE(BLUE, GREEN, RED, ALPHA)<br>
#define RGB1 _ISL_SWIZZLE(RED, GREEN, BLUE, ONE)<br>
<br>
-#define swiz_fmt(__vk_fmt, __hw_fmt, __swizzle) \<br>
+#define _fmt(__hw_fmt, __swizzle) \<br>
+ { .isl_format = __hw_fmt, \<br>
+ .swizzle = __swizzle }<br>
+<br>
+#define swiz_fmt1(__vk_fmt, __hw_fmt, __swizzle) \<br>
[VK_ENUM_OFFSET(__vk_fmt)] = { \<br>
- .isl_format = __hw_fmt, \<br>
- .swizzle = __swizzle, \<br>
+ .planes = { \<br>
+ { .isl_format = __hw_fmt, .swizzle = __swizzle }, \<br>
+ }, \<br>
+ .n_planes = 1, \<br>
}<br>
<br>
-#define fmt(__vk_fmt, __hw_fmt) \<br>
- swiz_fmt(__vk_fmt, __hw_fmt, RGBA)<br>
+#define fmt1(__vk_fmt, __hw_fmt) \<br>
+ swiz_fmt1(__vk_fmt, __hw_fmt, RGBA)<br>
+<br>
+#define fmt2(__vk_fmt, __fmt1, __fmt2) \<br>
+ [VK_ENUM_OFFSET(__vk_fmt)] = { \<br>
+ .planes = { \<br>
+ { .isl_format = __fmt1, \<br>
+ .swizzle = RGBA, \<br>
+ }, \<br>
+ { .isl_format = __fmt2, \<br>
+ .swizzle = RGBA, \<br>
+ }, \<br>
+ }, \<br>
+ .n_planes = 2, \<br>
+ }<br>
+<br>
+#define fmt_unsupported(__vk_fmt) \<br>
+ [VK_ENUM_OFFSET(__vk_fmt)] = { \<br>
+ .planes = { \<br>
+ { .isl_format = ISL_FORMAT_UNSUPPORTED, }, \<br>
+ }, \<br>
+ }<br>
<br>
/* HINT: For array formats, the ISL name should match the VK name. For<br>
* packed formats, they should have the channels in reverse order from each<br>
@@ -59,196 +85,199 @@<br>
* bspec) names are in LSB -> MSB order while VK formats are MSB -> LSB.<br>
*/<br>
static const struct anv_format main_formats[] = {<br>
- fmt(VK_FORMAT_UNDEFINED, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_R4G4_UNORM_<wbr>PACK8, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_R4G4B4A4_UNORM_<wbr>PACK16, ISL_FORMAT_A4B4G4R4_UNORM),<br>
- swiz_fmt(VK_FORMAT_B4G4R4A4_<wbr>UNORM_PACK16, ISL_FORMAT_A4B4G4R4_UNORM, BGRA),<br>
- fmt(VK_FORMAT_R5G6B5_UNORM_<wbr>PACK16, ISL_FORMAT_B5G6R5_UNORM),<br>
- swiz_fmt(VK_FORMAT_B5G6R5_<wbr>UNORM_PACK16, ISL_FORMAT_B5G6R5_UNORM, BGRA),<br>
- fmt(VK_FORMAT_R5G5B5A1_UNORM_<wbr>PACK16, ISL_FORMAT_A1B5G5R5_UNORM),<br>
- fmt(VK_FORMAT_B5G5R5A1_UNORM_<wbr>PACK16, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_A1R5G5B5_UNORM_<wbr>PACK16, ISL_FORMAT_B5G5R5A1_UNORM),<br>
- fmt(VK_FORMAT_R8_UNORM, ISL_FORMAT_R8_UNORM),<br>
- fmt(VK_FORMAT_R8_SNORM, ISL_FORMAT_R8_SNORM),<br>
- fmt(VK_FORMAT_R8_USCALED, ISL_FORMAT_R8_USCALED),<br>
- fmt(VK_FORMAT_R8_SSCALED, ISL_FORMAT_R8_SSCALED),<br>
- fmt(VK_FORMAT_R8_UINT, ISL_FORMAT_R8_UINT),<br>
- fmt(VK_FORMAT_R8_SINT, ISL_FORMAT_R8_SINT),<br>
- swiz_fmt(VK_FORMAT_R8_SRGB, ISL_FORMAT_L8_UNORM_SRGB,<br>
- _ISL_SWIZZLE(RED, ZERO, ZERO, ONE)),<br>
- fmt(VK_FORMAT_R8G8_UNORM, ISL_FORMAT_R8G8_UNORM),<br>
- fmt(VK_FORMAT_R8G8_SNORM, ISL_FORMAT_R8G8_SNORM),<br>
- fmt(VK_FORMAT_R8G8_USCALED, ISL_FORMAT_R8G8_USCALED),<br>
- fmt(VK_FORMAT_R8G8_SSCALED, ISL_FORMAT_R8G8_SSCALED),<br>
- fmt(VK_FORMAT_R8G8_UINT, ISL_FORMAT_R8G8_UINT),<br>
- fmt(VK_FORMAT_R8G8_SINT, ISL_FORMAT_R8G8_SINT),<br>
- fmt(VK_FORMAT_R8G8_SRGB, ISL_FORMAT_UNSUPPORTED), /* L8A8_UNORM_SRGB */<br>
- fmt(VK_FORMAT_R8G8B8_UNORM, ISL_FORMAT_R8G8B8_UNORM),<br>
- fmt(VK_FORMAT_R8G8B8_SNORM, ISL_FORMAT_R8G8B8_SNORM),<br>
- fmt(VK_FORMAT_R8G8B8_USCALED, ISL_FORMAT_R8G8B8_USCALED),<br>
- fmt(VK_FORMAT_R8G8B8_SSCALED, ISL_FORMAT_R8G8B8_SSCALED),<br>
- fmt(VK_FORMAT_R8G8B8_UINT, ISL_FORMAT_R8G8B8_UINT),<br>
- fmt(VK_FORMAT_R8G8B8_SINT, ISL_FORMAT_R8G8B8_SINT),<br>
- fmt(VK_FORMAT_R8G8B8_SRGB, ISL_FORMAT_R8G8B8_UNORM_SRGB),<br>
- fmt(VK_FORMAT_R8G8B8A8_UNORM, ISL_FORMAT_R8G8B8A8_UNORM),<br>
- fmt(VK_FORMAT_R8G8B8A8_SNORM, ISL_FORMAT_R8G8B8A8_SNORM),<br>
- fmt(VK_FORMAT_R8G8B8A8_<wbr>USCALED, ISL_FORMAT_R8G8B8A8_USCALED),<br>
- fmt(VK_FORMAT_R8G8B8A8_<wbr>SSCALED, ISL_FORMAT_R8G8B8A8_SSCALED),<br>
- fmt(VK_FORMAT_R8G8B8A8_UINT, ISL_FORMAT_R8G8B8A8_UINT),<br>
- fmt(VK_FORMAT_R8G8B8A8_SINT, ISL_FORMAT_R8G8B8A8_SINT),<br>
- fmt(VK_FORMAT_R8G8B8A8_SRGB, ISL_FORMAT_R8G8B8A8_UNORM_<wbr>SRGB),<br>
- fmt(VK_FORMAT_A8B8G8R8_UNORM_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_UNORM),<br>
- fmt(VK_FORMAT_A8B8G8R8_SNORM_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_SNORM),<br>
- fmt(VK_FORMAT_A8B8G8R8_<wbr>USCALED_PACK32, ISL_FORMAT_R8G8B8A8_USCALED),<br>
- fmt(VK_FORMAT_A8B8G8R8_<wbr>SSCALED_PACK32, ISL_FORMAT_R8G8B8A8_SSCALED),<br>
- fmt(VK_FORMAT_A8B8G8R8_UINT_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_UINT),<br>
- fmt(VK_FORMAT_A8B8G8R8_SINT_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_SINT),<br>
- fmt(VK_FORMAT_A8B8G8R8_SRGB_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_UNORM_<wbr>SRGB),<br>
- fmt(VK_FORMAT_A2R10G10B10_<wbr>UNORM_PACK32, ISL_FORMAT_B10G10R10A2_UNORM),<br>
- fmt(VK_FORMAT_A2R10G10B10_<wbr>SNORM_PACK32, ISL_FORMAT_B10G10R10A2_SNORM),<br>
- fmt(VK_FORMAT_A2R10G10B10_<wbr>USCALED_PACK32, ISL_FORMAT_B10G10R10A2_<wbr>USCALED),<br>
- fmt(VK_FORMAT_A2R10G10B10_<wbr>SSCALED_PACK32, ISL_FORMAT_B10G10R10A2_<wbr>SSCALED),<br>
- fmt(VK_FORMAT_A2R10G10B10_<wbr>UINT_PACK32, ISL_FORMAT_B10G10R10A2_UINT),<br>
- fmt(VK_FORMAT_A2R10G10B10_<wbr>SINT_PACK32, ISL_FORMAT_B10G10R10A2_SINT),<br>
- fmt(VK_FORMAT_A2B10G10R10_<wbr>UNORM_PACK32, ISL_FORMAT_R10G10B10A2_UNORM),<br>
- fmt(VK_FORMAT_A2B10G10R10_<wbr>SNORM_PACK32, ISL_FORMAT_R10G10B10A2_SNORM),<br>
- fmt(VK_FORMAT_A2B10G10R10_<wbr>USCALED_PACK32, ISL_FORMAT_R10G10B10A2_<wbr>USCALED),<br>
- fmt(VK_FORMAT_A2B10G10R10_<wbr>SSCALED_PACK32, ISL_FORMAT_R10G10B10A2_<wbr>SSCALED),<br>
- fmt(VK_FORMAT_A2B10G10R10_<wbr>UINT_PACK32, ISL_FORMAT_R10G10B10A2_UINT),<br>
- fmt(VK_FORMAT_A2B10G10R10_<wbr>SINT_PACK32, ISL_FORMAT_R10G10B10A2_SINT),<br>
- fmt(VK_FORMAT_R16_UNORM, ISL_FORMAT_R16_UNORM),<br>
- fmt(VK_FORMAT_R16_SNORM, ISL_FORMAT_R16_SNORM),<br>
- fmt(VK_FORMAT_R16_USCALED, ISL_FORMAT_R16_USCALED),<br>
- fmt(VK_FORMAT_R16_SSCALED, ISL_FORMAT_R16_SSCALED),<br>
- fmt(VK_FORMAT_R16_UINT, ISL_FORMAT_R16_UINT),<br>
- fmt(VK_FORMAT_R16_SINT, ISL_FORMAT_R16_SINT),<br>
- fmt(VK_FORMAT_R16_SFLOAT, ISL_FORMAT_R16_FLOAT),<br>
- fmt(VK_FORMAT_R16G16_UNORM, ISL_FORMAT_R16G16_UNORM),<br>
- fmt(VK_FORMAT_R16G16_SNORM, ISL_FORMAT_R16G16_SNORM),<br>
- fmt(VK_FORMAT_R16G16_USCALED, ISL_FORMAT_R16G16_USCALED),<br>
- fmt(VK_FORMAT_R16G16_SSCALED, ISL_FORMAT_R16G16_SSCALED),<br>
- fmt(VK_FORMAT_R16G16_UINT, ISL_FORMAT_R16G16_UINT),<br>
- fmt(VK_FORMAT_R16G16_SINT, ISL_FORMAT_R16G16_SINT),<br>
- fmt(VK_FORMAT_R16G16_SFLOAT, ISL_FORMAT_R16G16_FLOAT),<br>
- fmt(VK_FORMAT_R16G16B16_UNORM, ISL_FORMAT_R16G16B16_UNORM),<br>
- fmt(VK_FORMAT_R16G16B16_SNORM, ISL_FORMAT_R16G16B16_SNORM),<br>
- fmt(VK_FORMAT_R16G16B16_<wbr>USCALED, ISL_FORMAT_R16G16B16_USCALED),<br>
- fmt(VK_FORMAT_R16G16B16_<wbr>SSCALED, ISL_FORMAT_R16G16B16_SSCALED),<br>
- fmt(VK_FORMAT_R16G16B16_UINT, ISL_FORMAT_R16G16B16_UINT),<br>
- fmt(VK_FORMAT_R16G16B16_SINT, ISL_FORMAT_R16G16B16_SINT),<br>
- fmt(VK_FORMAT_R16G16B16_<wbr>SFLOAT, ISL_FORMAT_R16G16B16_FLOAT),<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>UNORM, ISL_FORMAT_R16G16B16A16_UNORM)<wbr>,<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>SNORM, ISL_FORMAT_R16G16B16A16_SNORM)<wbr>,<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>USCALED, ISL_FORMAT_R16G16B16A16_<wbr>USCALED),<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>SSCALED, ISL_FORMAT_R16G16B16A16_<wbr>SSCALED),<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>UINT, ISL_FORMAT_R16G16B16A16_UINT),<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>SINT, ISL_FORMAT_R16G16B16A16_SINT),<br>
- fmt(VK_FORMAT_R16G16B16A16_<wbr>SFLOAT, ISL_FORMAT_R16G16B16A16_FLOAT)<wbr>,<br>
- fmt(VK_FORMAT_R32_UINT, ISL_FORMAT_R32_UINT),<br>
- fmt(VK_FORMAT_R32_SINT, ISL_FORMAT_R32_SINT),<br>
- fmt(VK_FORMAT_R32_SFLOAT, ISL_FORMAT_R32_FLOAT),<br>
- fmt(VK_FORMAT_R32G32_UINT, ISL_FORMAT_R32G32_UINT),<br>
- fmt(VK_FORMAT_R32G32_SINT, ISL_FORMAT_R32G32_SINT),<br>
- fmt(VK_FORMAT_R32G32_SFLOAT, ISL_FORMAT_R32G32_FLOAT),<br>
- fmt(VK_FORMAT_R32G32B32_UINT, ISL_FORMAT_R32G32B32_UINT),<br>
- fmt(VK_FORMAT_R32G32B32_SINT, ISL_FORMAT_R32G32B32_SINT),<br>
- fmt(VK_FORMAT_R32G32B32_<wbr>SFLOAT, ISL_FORMAT_R32G32B32_FLOAT),<br>
- fmt(VK_FORMAT_R32G32B32A32_<wbr>UINT, ISL_FORMAT_R32G32B32A32_UINT),<br>
- fmt(VK_FORMAT_R32G32B32A32_<wbr>SINT, ISL_FORMAT_R32G32B32A32_SINT),<br>
- fmt(VK_FORMAT_R32G32B32A32_<wbr>SFLOAT, ISL_FORMAT_R32G32B32A32_FLOAT)<wbr>,<br>
- fmt(VK_FORMAT_R64_UINT, ISL_FORMAT_R64_PASSTHRU),<br>
- fmt(VK_FORMAT_R64_SINT, ISL_FORMAT_R64_PASSTHRU),<br>
- fmt(VK_FORMAT_R64_SFLOAT, ISL_FORMAT_R64_PASSTHRU),<br>
- fmt(VK_FORMAT_R64G64_UINT, ISL_FORMAT_R64G64_PASSTHRU),<br>
- fmt(VK_FORMAT_R64G64_SINT, ISL_FORMAT_R64G64_PASSTHRU),<br>
- fmt(VK_FORMAT_R64G64_SFLOAT, ISL_FORMAT_R64G64_PASSTHRU),<br>
- fmt(VK_FORMAT_R64G64B64_UINT, ISL_FORMAT_R64G64B64_PASSTHRU)<wbr>,<br>
- fmt(VK_FORMAT_R64G64B64_SINT, ISL_FORMAT_R64G64B64_PASSTHRU)<wbr>,<br>
- fmt(VK_FORMAT_R64G64B64_<wbr>SFLOAT, ISL_FORMAT_R64G64B64_PASSTHRU)<wbr>,<br>
- fmt(VK_FORMAT_R64G64B64A64_<wbr>UINT, ISL_FORMAT_R64G64B64A64_<wbr>PASSTHRU),<br>
- fmt(VK_FORMAT_R64G64B64A64_<wbr>SINT, ISL_FORMAT_R64G64B64A64_<wbr>PASSTHRU),<br>
- fmt(VK_FORMAT_R64G64B64A64_<wbr>SFLOAT, ISL_FORMAT_R64G64B64A64_<wbr>PASSTHRU),<br>
- fmt(VK_FORMAT_B10G11R11_<wbr>UFLOAT_PACK32, ISL_FORMAT_R11G11B10_FLOAT),<br>
- fmt(VK_FORMAT_E5B9G9R9_UFLOAT_<wbr>PACK32, ISL_FORMAT_R9G9B9E5_SHAREDEXP)<wbr>,<br>
-<br>
- fmt(VK_FORMAT_D16_UNORM, ISL_FORMAT_R16_UNORM),<br>
- fmt(VK_FORMAT_X8_D24_UNORM_<wbr>PACK32, ISL_FORMAT_R24_UNORM_X8_<wbr>TYPELESS),<br>
- fmt(VK_FORMAT_D32_SFLOAT, ISL_FORMAT_R32_FLOAT),<br>
- fmt(VK_FORMAT_S8_UINT, ISL_FORMAT_R8_UINT),<br>
- fmt(VK_FORMAT_D16_UNORM_S8_<wbr>UINT, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_D24_UNORM_S8_<wbr>UINT, ISL_FORMAT_R24_UNORM_X8_<wbr>TYPELESS),<br>
- fmt(VK_FORMAT_D32_SFLOAT_S8_<wbr>UINT, ISL_FORMAT_R32_FLOAT),<br>
-<br>
- swiz_fmt(VK_FORMAT_BC1_RGB_<wbr>UNORM_BLOCK, ISL_FORMAT_BC1_UNORM, RGB1),<br>
- swiz_fmt(VK_FORMAT_BC1_RGB_<wbr>SRGB_BLOCK, ISL_FORMAT_BC1_UNORM_SRGB, RGB1),<br>
- fmt(VK_FORMAT_BC1_RGBA_UNORM_<wbr>BLOCK, ISL_FORMAT_BC1_UNORM),<br>
- fmt(VK_FORMAT_BC1_RGBA_SRGB_<wbr>BLOCK, ISL_FORMAT_BC1_UNORM_SRGB),<br>
- fmt(VK_FORMAT_BC2_UNORM_BLOCK, ISL_FORMAT_BC2_UNORM),<br>
- fmt(VK_FORMAT_BC2_SRGB_BLOCK, ISL_FORMAT_BC2_UNORM_SRGB),<br>
- fmt(VK_FORMAT_BC3_UNORM_BLOCK, ISL_FORMAT_BC3_UNORM),<br>
- fmt(VK_FORMAT_BC3_SRGB_BLOCK, ISL_FORMAT_BC3_UNORM_SRGB),<br>
- fmt(VK_FORMAT_BC4_UNORM_BLOCK, ISL_FORMAT_BC4_UNORM),<br>
- fmt(VK_FORMAT_BC4_SNORM_BLOCK, ISL_FORMAT_BC4_SNORM),<br>
- fmt(VK_FORMAT_BC5_UNORM_BLOCK, ISL_FORMAT_BC5_UNORM),<br>
- fmt(VK_FORMAT_BC5_SNORM_BLOCK, ISL_FORMAT_BC5_SNORM),<br>
- fmt(VK_FORMAT_BC6H_UFLOAT_<wbr>BLOCK, ISL_FORMAT_BC6H_UF16),<br>
- fmt(VK_FORMAT_BC6H_SFLOAT_<wbr>BLOCK, ISL_FORMAT_BC6H_SF16),<br>
- fmt(VK_FORMAT_BC7_UNORM_BLOCK, ISL_FORMAT_BC7_UNORM),<br>
- fmt(VK_FORMAT_BC7_SRGB_BLOCK, ISL_FORMAT_BC7_UNORM_SRGB),<br>
- fmt(VK_FORMAT_ETC2_R8G8B8_<wbr>UNORM_BLOCK, ISL_FORMAT_ETC2_RGB8),<br>
- fmt(VK_FORMAT_ETC2_R8G8B8_<wbr>SRGB_BLOCK, ISL_FORMAT_ETC2_SRGB8),<br>
- fmt(VK_FORMAT_ETC2_R8G8B8A1_<wbr>UNORM_BLOCK, ISL_FORMAT_ETC2_RGB8_PTA),<br>
- fmt(VK_FORMAT_ETC2_R8G8B8A1_<wbr>SRGB_BLOCK, ISL_FORMAT_ETC2_SRGB8_PTA),<br>
- fmt(VK_FORMAT_ETC2_R8G8B8A8_<wbr>UNORM_BLOCK, ISL_FORMAT_ETC2_EAC_RGBA8),<br>
- fmt(VK_FORMAT_ETC2_R8G8B8A8_<wbr>SRGB_BLOCK, ISL_FORMAT_ETC2_EAC_SRGB8_A8),<br>
- fmt(VK_FORMAT_EAC_R11_UNORM_<wbr>BLOCK, ISL_FORMAT_EAC_R11),<br>
- fmt(VK_FORMAT_EAC_R11_SNORM_<wbr>BLOCK, ISL_FORMAT_EAC_SIGNED_R11),<br>
- fmt(VK_FORMAT_EAC_R11G11_<wbr>UNORM_BLOCK, ISL_FORMAT_EAC_RG11),<br>
- fmt(VK_FORMAT_EAC_R11G11_<wbr>SNORM_BLOCK, ISL_FORMAT_EAC_SIGNED_RG11),<br>
- fmt(VK_FORMAT_ASTC_4x4_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_4X4_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_5x4_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X4_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_5x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X5_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_6x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X5_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_6x6_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X6_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_8x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X5_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_8x6_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X6_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_8x8_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X8_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_10x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X5_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_10x6_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X6_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_10x8_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X8_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_10x10_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X10_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_12x10_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X10_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_12x12_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X12_<wbr>U8SRGB),<br>
- fmt(VK_FORMAT_ASTC_4x4_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_4X4_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_5x4_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X4_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_5x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X5_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_6x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X5_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_6x6_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X6_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_8x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X5_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_8x6_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X6_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_8x8_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X8_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_10x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X5_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_10x6_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X6_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_10x8_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X8_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_10x10_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X10_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_12x10_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X10_<wbr>FLT16),<br>
- fmt(VK_FORMAT_ASTC_12x12_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X12_<wbr>FLT16),<br>
- fmt(VK_FORMAT_B8G8R8_UNORM, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8_SNORM, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8_USCALED, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8_SSCALED, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8_UINT, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8_SINT, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8_SRGB, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8A8_UNORM, ISL_FORMAT_B8G8R8A8_UNORM),<br>
- fmt(VK_FORMAT_B8G8R8A8_SNORM, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8A8_<wbr>USCALED, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8A8_<wbr>SSCALED, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8A8_UINT, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8A8_SINT, ISL_FORMAT_UNSUPPORTED),<br>
- fmt(VK_FORMAT_B8G8R8A8_SRGB, ISL_FORMAT_B8G8R8A8_UNORM_<wbr>SRGB),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>UNDEFINED),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>R4G4_UNORM_PACK8),<br>
+ fmt1(VK_FORMAT_R4G4B4A4_UNORM_<wbr>PACK16, ISL_FORMAT_A4B4G4R4_UNORM),<br>
+ swiz_fmt1(VK_FORMAT_B4G4R4A4_<wbr>UNORM_PACK16, ISL_FORMAT_A4B4G4R4_UNORM, BGRA),<br>
+ fmt1(VK_FORMAT_R5G6B5_UNORM_<wbr>PACK16, ISL_FORMAT_B5G6R5_UNORM),<br>
+ swiz_fmt1(VK_FORMAT_B5G6R5_<wbr>UNORM_PACK16, ISL_FORMAT_B5G6R5_UNORM, BGRA),<br>
+ fmt1(VK_FORMAT_R5G5B5A1_UNORM_<wbr>PACK16, ISL_FORMAT_A1B5G5R5_UNORM),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B5G5R5A1_UNORM_PACK16),<br>
+ fmt1(VK_FORMAT_A1R5G5B5_UNORM_<wbr>PACK16, ISL_FORMAT_B5G5R5A1_UNORM),<br>
+ fmt1(VK_FORMAT_R8_UNORM, ISL_FORMAT_R8_UNORM),<br>
+ fmt1(VK_FORMAT_R8_SNORM, ISL_FORMAT_R8_SNORM),<br>
+ fmt1(VK_FORMAT_R8_USCALED, ISL_FORMAT_R8_USCALED),<br>
+ fmt1(VK_FORMAT_R8_SSCALED, ISL_FORMAT_R8_SSCALED),<br>
+ fmt1(VK_FORMAT_R8_UINT, ISL_FORMAT_R8_UINT),<br>
+ fmt1(VK_FORMAT_R8_SINT, ISL_FORMAT_R8_SINT),<br>
+ swiz_fmt1(VK_FORMAT_R8_SRGB, ISL_FORMAT_L8_UNORM_SRGB,<br>
+ _ISL_SWIZZLE(RED, ZERO, ZERO, ONE)),<br>
+ fmt1(VK_FORMAT_R8G8_UNORM, ISL_FORMAT_R8G8_UNORM),<br>
+ fmt1(VK_FORMAT_R8G8_SNORM, ISL_FORMAT_R8G8_SNORM),<br>
+ fmt1(VK_FORMAT_R8G8_USCALED, ISL_FORMAT_R8G8_USCALED),<br>
+ fmt1(VK_FORMAT_R8G8_SSCALED, ISL_FORMAT_R8G8_SSCALED),<br>
+ fmt1(VK_FORMAT_R8G8_UINT, ISL_FORMAT_R8G8_UINT),<br>
+ fmt1(VK_FORMAT_R8G8_SINT, ISL_FORMAT_R8G8_SINT),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>R8G8_SRGB), /* L8A8_UNORM_SRGB */<br>
+ fmt1(VK_FORMAT_R8G8B8_UNORM, ISL_FORMAT_R8G8B8_UNORM),<br>
+ fmt1(VK_FORMAT_R8G8B8_SNORM, ISL_FORMAT_R8G8B8_SNORM),<br>
+ fmt1(VK_FORMAT_R8G8B8_USCALED, ISL_FORMAT_R8G8B8_USCALED),<br>
+ fmt1(VK_FORMAT_R8G8B8_SSCALED, ISL_FORMAT_R8G8B8_SSCALED),<br>
+ fmt1(VK_FORMAT_R8G8B8_UINT, ISL_FORMAT_R8G8B8_UINT),<br>
+ fmt1(VK_FORMAT_R8G8B8_SINT, ISL_FORMAT_R8G8B8_SINT),<br>
+ fmt1(VK_FORMAT_R8G8B8_SRGB, ISL_FORMAT_R8G8B8_UNORM_SRGB),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_UNORM, ISL_FORMAT_R8G8B8A8_UNORM),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_SNORM, ISL_FORMAT_R8G8B8A8_SNORM),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_<wbr>USCALED, ISL_FORMAT_R8G8B8A8_USCALED),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_<wbr>SSCALED, ISL_FORMAT_R8G8B8A8_SSCALED),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_UINT, ISL_FORMAT_R8G8B8A8_UINT),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_SINT, ISL_FORMAT_R8G8B8A8_SINT),<br>
+ fmt1(VK_FORMAT_R8G8B8A8_SRGB, ISL_FORMAT_R8G8B8A8_UNORM_<wbr>SRGB),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_UNORM_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_UNORM),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_SNORM_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_SNORM),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_<wbr>USCALED_PACK32, ISL_FORMAT_R8G8B8A8_USCALED),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_<wbr>SSCALED_PACK32, ISL_FORMAT_R8G8B8A8_SSCALED),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_UINT_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_UINT),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_SINT_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_SINT),<br>
+ fmt1(VK_FORMAT_A8B8G8R8_SRGB_<wbr>PACK32, ISL_FORMAT_R8G8B8A8_UNORM_<wbr>SRGB),<br>
+ fmt1(VK_FORMAT_A2R10G10B10_<wbr>UNORM_PACK32, ISL_FORMAT_B10G10R10A2_UNORM),<br>
+ fmt1(VK_FORMAT_A2R10G10B10_<wbr>SNORM_PACK32, ISL_FORMAT_B10G10R10A2_SNORM),<br>
+ fmt1(VK_FORMAT_A2R10G10B10_<wbr>USCALED_PACK32, ISL_FORMAT_B10G10R10A2_<wbr>USCALED),<br>
+ fmt1(VK_FORMAT_A2R10G10B10_<wbr>SSCALED_PACK32, ISL_FORMAT_B10G10R10A2_<wbr>SSCALED),<br>
+ fmt1(VK_FORMAT_A2R10G10B10_<wbr>UINT_PACK32, ISL_FORMAT_B10G10R10A2_UINT),<br>
+ fmt1(VK_FORMAT_A2R10G10B10_<wbr>SINT_PACK32, ISL_FORMAT_B10G10R10A2_SINT),<br>
+ fmt1(VK_FORMAT_A2B10G10R10_<wbr>UNORM_PACK32, ISL_FORMAT_R10G10B10A2_UNORM),<br>
+ fmt1(VK_FORMAT_A2B10G10R10_<wbr>SNORM_PACK32, ISL_FORMAT_R10G10B10A2_SNORM),<br>
+ fmt1(VK_FORMAT_A2B10G10R10_<wbr>USCALED_PACK32, ISL_FORMAT_R10G10B10A2_<wbr>USCALED),<br>
+ fmt1(VK_FORMAT_A2B10G10R10_<wbr>SSCALED_PACK32, ISL_FORMAT_R10G10B10A2_<wbr>SSCALED),<br>
+ fmt1(VK_FORMAT_A2B10G10R10_<wbr>UINT_PACK32, ISL_FORMAT_R10G10B10A2_UINT),<br>
+ fmt1(VK_FORMAT_A2B10G10R10_<wbr>SINT_PACK32, ISL_FORMAT_R10G10B10A2_SINT),<br>
+ fmt1(VK_FORMAT_R16_UNORM, ISL_FORMAT_R16_UNORM),<br>
+ fmt1(VK_FORMAT_R16_SNORM, ISL_FORMAT_R16_SNORM),<br>
+ fmt1(VK_FORMAT_R16_USCALED, ISL_FORMAT_R16_USCALED),<br>
+ fmt1(VK_FORMAT_R16_SSCALED, ISL_FORMAT_R16_SSCALED),<br>
+ fmt1(VK_FORMAT_R16_UINT, ISL_FORMAT_R16_UINT),<br>
+ fmt1(VK_FORMAT_R16_SINT, ISL_FORMAT_R16_SINT),<br>
+ fmt1(VK_FORMAT_R16_SFLOAT, ISL_FORMAT_R16_FLOAT),<br>
+ fmt1(VK_FORMAT_R16G16_UNORM, ISL_FORMAT_R16G16_UNORM),<br>
+ fmt1(VK_FORMAT_R16G16_SNORM, ISL_FORMAT_R16G16_SNORM),<br>
+ fmt1(VK_FORMAT_R16G16_USCALED, ISL_FORMAT_R16G16_USCALED),<br>
+ fmt1(VK_FORMAT_R16G16_SSCALED, ISL_FORMAT_R16G16_SSCALED),<br>
+ fmt1(VK_FORMAT_R16G16_UINT, ISL_FORMAT_R16G16_UINT),<br>
+ fmt1(VK_FORMAT_R16G16_SINT, ISL_FORMAT_R16G16_SINT),<br>
+ fmt1(VK_FORMAT_R16G16_SFLOAT, ISL_FORMAT_R16G16_FLOAT),<br>
+ fmt1(VK_FORMAT_R16G16B16_<wbr>UNORM, ISL_FORMAT_R16G16B16_UNORM),<br>
+ fmt1(VK_FORMAT_R16G16B16_<wbr>SNORM, ISL_FORMAT_R16G16B16_SNORM),<br>
+ fmt1(VK_FORMAT_R16G16B16_<wbr>USCALED, ISL_FORMAT_R16G16B16_USCALED),<br>
+ fmt1(VK_FORMAT_R16G16B16_<wbr>SSCALED, ISL_FORMAT_R16G16B16_SSCALED),<br>
+ fmt1(VK_FORMAT_R16G16B16_UINT, ISL_FORMAT_R16G16B16_UINT),<br>
+ fmt1(VK_FORMAT_R16G16B16_SINT, ISL_FORMAT_R16G16B16_SINT),<br>
+ fmt1(VK_FORMAT_R16G16B16_<wbr>SFLOAT, ISL_FORMAT_R16G16B16_FLOAT),<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>UNORM, ISL_FORMAT_R16G16B16A16_UNORM)<wbr>,<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>SNORM, ISL_FORMAT_R16G16B16A16_SNORM)<wbr>,<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>USCALED, ISL_FORMAT_R16G16B16A16_<wbr>USCALED),<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>SSCALED, ISL_FORMAT_R16G16B16A16_<wbr>SSCALED),<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>UINT, ISL_FORMAT_R16G16B16A16_UINT),<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>SINT, ISL_FORMAT_R16G16B16A16_SINT),<br>
+ fmt1(VK_FORMAT_R16G16B16A16_<wbr>SFLOAT, ISL_FORMAT_R16G16B16A16_FLOAT)<wbr>,<br>
+ fmt1(VK_FORMAT_R32_UINT, ISL_FORMAT_R32_UINT),<br>
+ fmt1(VK_FORMAT_R32_SINT, ISL_FORMAT_R32_SINT),<br>
+ fmt1(VK_FORMAT_R32_SFLOAT, ISL_FORMAT_R32_FLOAT),<br>
+ fmt1(VK_FORMAT_R32G32_UINT, ISL_FORMAT_R32G32_UINT),<br>
+ fmt1(VK_FORMAT_R32G32_SINT, ISL_FORMAT_R32G32_SINT),<br>
+ fmt1(VK_FORMAT_R32G32_SFLOAT, ISL_FORMAT_R32G32_FLOAT),<br>
+ fmt1(VK_FORMAT_R32G32B32_UINT, ISL_FORMAT_R32G32B32_UINT),<br>
+ fmt1(VK_FORMAT_R32G32B32_SINT, ISL_FORMAT_R32G32B32_SINT),<br>
+ fmt1(VK_FORMAT_R32G32B32_<wbr>SFLOAT, ISL_FORMAT_R32G32B32_FLOAT),<br>
+ fmt1(VK_FORMAT_R32G32B32A32_<wbr>UINT, ISL_FORMAT_R32G32B32A32_UINT),<br>
+ fmt1(VK_FORMAT_R32G32B32A32_<wbr>SINT, ISL_FORMAT_R32G32B32A32_SINT),<br>
+ fmt1(VK_FORMAT_R32G32B32A32_<wbr>SFLOAT, ISL_FORMAT_R32G32B32A32_FLOAT)<wbr>,<br>
+ fmt1(VK_FORMAT_R64_UINT, ISL_FORMAT_R64_PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64_SINT, ISL_FORMAT_R64_PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64_SFLOAT, ISL_FORMAT_R64_PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64G64_UINT, ISL_FORMAT_R64G64_PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64G64_SINT, ISL_FORMAT_R64G64_PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64G64_SFLOAT, ISL_FORMAT_R64G64_PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64G64B64_UINT, ISL_FORMAT_R64G64B64_PASSTHRU)<wbr>,<br>
+ fmt1(VK_FORMAT_R64G64B64_SINT, ISL_FORMAT_R64G64B64_PASSTHRU)<wbr>,<br>
+ fmt1(VK_FORMAT_R64G64B64_<wbr>SFLOAT, ISL_FORMAT_R64G64B64_PASSTHRU)<wbr>,<br>
+ fmt1(VK_FORMAT_R64G64B64A64_<wbr>UINT, ISL_FORMAT_R64G64B64A64_<wbr>PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64G64B64A64_<wbr>SINT, ISL_FORMAT_R64G64B64A64_<wbr>PASSTHRU),<br>
+ fmt1(VK_FORMAT_R64G64B64A64_<wbr>SFLOAT, ISL_FORMAT_R64G64B64A64_<wbr>PASSTHRU),<br>
+ fmt1(VK_FORMAT_B10G11R11_<wbr>UFLOAT_PACK32, ISL_FORMAT_R11G11B10_FLOAT),<br>
+ fmt1(VK_FORMAT_E5B9G9R9_<wbr>UFLOAT_PACK32, ISL_FORMAT_R9G9B9E5_SHAREDEXP)<wbr>,<br>
+<br>
+ fmt1(VK_FORMAT_D16_UNORM, ISL_FORMAT_R16_UNORM),<br>
+ fmt1(VK_FORMAT_X8_D24_UNORM_<wbr>PACK32, ISL_FORMAT_R24_UNORM_X8_<wbr>TYPELESS),<br>
+ fmt1(VK_FORMAT_D32_SFLOAT, ISL_FORMAT_R32_FLOAT),<br>
+ fmt1(VK_FORMAT_S8_UINT, ISL_FORMAT_R8_UINT),<br>
+ fmt_unsupported(VK_FORMAT_D16_<wbr>UNORM_S8_UINT),<br>
+ fmt2(VK_FORMAT_D24_UNORM_S8_<wbr>UINT, ISL_FORMAT_R24_UNORM_X8_<wbr>TYPELESS, ISL_FORMAT_R8_UINT),<br>
+ fmt2(VK_FORMAT_D32_SFLOAT_S8_<wbr>UINT, ISL_FORMAT_R32_FLOAT, ISL_FORMAT_R8_UINT),<br>
+<br>
+ swiz_fmt1(VK_FORMAT_BC1_RGB_<wbr>UNORM_BLOCK, ISL_FORMAT_BC1_UNORM, RGB1),<br>
+ swiz_fmt1(VK_FORMAT_BC1_RGB_<wbr>SRGB_BLOCK, ISL_FORMAT_BC1_UNORM_SRGB, RGB1),<br>
+ fmt1(VK_FORMAT_BC1_RGBA_UNORM_<wbr>BLOCK, ISL_FORMAT_BC1_UNORM),<br>
+ fmt1(VK_FORMAT_BC1_RGBA_SRGB_<wbr>BLOCK, ISL_FORMAT_BC1_UNORM_SRGB),<br>
+ fmt1(VK_FORMAT_BC2_UNORM_<wbr>BLOCK, ISL_FORMAT_BC2_UNORM),<br>
+ fmt1(VK_FORMAT_BC2_SRGB_BLOCK, ISL_FORMAT_BC2_UNORM_SRGB),<br>
+ fmt1(VK_FORMAT_BC3_UNORM_<wbr>BLOCK, ISL_FORMAT_BC3_UNORM),<br>
+ fmt1(VK_FORMAT_BC3_SRGB_BLOCK, ISL_FORMAT_BC3_UNORM_SRGB),<br>
+ fmt1(VK_FORMAT_BC4_UNORM_<wbr>BLOCK, ISL_FORMAT_BC4_UNORM),<br>
+ fmt1(VK_FORMAT_BC4_SNORM_<wbr>BLOCK, ISL_FORMAT_BC4_SNORM),<br>
+ fmt1(VK_FORMAT_BC5_UNORM_<wbr>BLOCK, ISL_FORMAT_BC5_UNORM),<br>
+ fmt1(VK_FORMAT_BC5_SNORM_<wbr>BLOCK, ISL_FORMAT_BC5_SNORM),<br>
+ fmt1(VK_FORMAT_BC6H_UFLOAT_<wbr>BLOCK, ISL_FORMAT_BC6H_UF16),<br>
+ fmt1(VK_FORMAT_BC6H_SFLOAT_<wbr>BLOCK, ISL_FORMAT_BC6H_SF16),<br>
+ fmt1(VK_FORMAT_BC7_UNORM_<wbr>BLOCK, ISL_FORMAT_BC7_UNORM),<br>
+ fmt1(VK_FORMAT_BC7_SRGB_BLOCK, ISL_FORMAT_BC7_UNORM_SRGB),<br>
+ fmt1(VK_FORMAT_ETC2_R8G8B8_<wbr>UNORM_BLOCK, ISL_FORMAT_ETC2_RGB8),<br>
+ fmt1(VK_FORMAT_ETC2_R8G8B8_<wbr>SRGB_BLOCK, ISL_FORMAT_ETC2_SRGB8),<br>
+ fmt1(VK_FORMAT_ETC2_R8G8B8A1_<wbr>UNORM_BLOCK, ISL_FORMAT_ETC2_RGB8_PTA),<br>
+ fmt1(VK_FORMAT_ETC2_R8G8B8A1_<wbr>SRGB_BLOCK, ISL_FORMAT_ETC2_SRGB8_PTA),<br>
+ fmt1(VK_FORMAT_ETC2_R8G8B8A8_<wbr>UNORM_BLOCK, ISL_FORMAT_ETC2_EAC_RGBA8),<br>
+ fmt1(VK_FORMAT_ETC2_R8G8B8A8_<wbr>SRGB_BLOCK, ISL_FORMAT_ETC2_EAC_SRGB8_A8),<br>
+ fmt1(VK_FORMAT_EAC_R11_UNORM_<wbr>BLOCK, ISL_FORMAT_EAC_R11),<br>
+ fmt1(VK_FORMAT_EAC_R11_SNORM_<wbr>BLOCK, ISL_FORMAT_EAC_SIGNED_R11),<br>
+ fmt1(VK_FORMAT_EAC_R11G11_<wbr>UNORM_BLOCK, ISL_FORMAT_EAC_RG11),<br>
+ fmt1(VK_FORMAT_EAC_R11G11_<wbr>SNORM_BLOCK, ISL_FORMAT_EAC_SIGNED_RG11),<br>
+ fmt1(VK_FORMAT_ASTC_4x4_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_4X4_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_5x4_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X4_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_5x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X5_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_6x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X5_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_6x6_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X6_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_8x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X5_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_8x6_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X6_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_8x8_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X8_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_10x5_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X5_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_10x6_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X6_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_10x8_SRGB_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X8_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_10x10_<wbr>SRGB_BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X10_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_12x10_<wbr>SRGB_BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X10_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_12x12_<wbr>SRGB_BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X12_<wbr>U8SRGB),<br>
+ fmt1(VK_FORMAT_ASTC_4x4_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_4X4_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_5x4_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X4_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_5x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_5X5_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_6x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X5_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_6x6_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_6X6_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_8x5_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X5_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_8x6_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X6_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_8x8_UNORM_<wbr>BLOCK, ISL_FORMAT_ASTC_LDR_2D_8X8_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_10x5_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X5_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_10x6_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X6_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_10x8_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X8_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_10x10_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_10X10_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_12x10_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X10_<wbr>FLT16),<br>
+ fmt1(VK_FORMAT_ASTC_12x12_<wbr>UNORM_BLOCK, ISL_FORMAT_ASTC_LDR_2D_12X12_<wbr>FLT16),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_UNORM),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_SNORM),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_USCALED),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_SSCALED),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_UINT),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_SINT),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8_SRGB),<br>
+ fmt1(VK_FORMAT_B8G8R8A8_UNORM, ISL_FORMAT_B8G8R8A8_UNORM),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8A8_SNORM),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8A8_USCALED),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8A8_SSCALED),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8A8_UINT),<br>
+ fmt_unsupported(VK_FORMAT_<wbr>B8G8R8A8_SINT),<br>
+ fmt1(VK_FORMAT_B8G8R8A8_SRGB, ISL_FORMAT_B8G8R8A8_UNORM_<wbr>SRGB),<br>
};<br>
<br>
+#undef _fmt<br>
+#undef swiz_fmt1<br>
+#undef fmt1<br>
#undef fmt<br>
<br>
static const struct {<br>
@@ -258,53 +287,55 @@ static const struct {<br>
[0] = { .formats = main_formats, .n_formats = ARRAY_SIZE(main_formats), },<br>
};<br>
<br>
-static struct anv_format<br>
-vk_to_anv_format(VkFormat vk_format)<br>
+const struct anv_format *<br>
+anv_get_format(VkFormat vk_format)<br>
{<br>
uint32_t enum_offset = VK_ENUM_OFFSET(vk_format);<br>
uint32_t ext_number = VK_ENUM_EXTENSION(vk_format);<br>
<br>
if (ext_number >= ARRAY_SIZE(anv_formats) ||<br>
enum_offset >= anv_formats[ext_number].n_<wbr>formats)<br>
- return (struct anv_format) { .isl_format = ISL_FORMAT_UNSUPPORTED };<br>
+ return NULL;<br>
<br>
- return anv_formats[ext_number].<wbr>formats[enum_offset];<br>
-}<br>
+ const struct anv_format *format =<br>
+ &anv_formats[ext_number].<wbr>formats[enum_offset];<br>
+ if (format->planes[0].isl_format == ISL_FORMAT_UNSUPPORTED)<br>
+ return NULL;<br>
<br>
-static bool<br>
-format_supported(VkFormat vk_format)<br>
-{<br>
- return vk_to_anv_format(vk_format).<wbr>isl_format != ISL_FORMAT_UNSUPPORTED;<br>
+ return format;<br>
}<br>
<br>
/**<br>
* Exactly one bit must be set in \a aspect.<br>
*/<br>
-struct anv_format<br>
-anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format,<br>
- VkImageAspectFlags aspect, VkImageTiling tiling)<br>
+struct anv_format_plane<br>
+anv_get_format_plane(const struct gen_device_info *devinfo, VkFormat vk_format,<br>
+ VkImageAspectFlags aspect, VkImageTiling tiling)<br>
{<br>
- struct anv_format format = vk_to_anv_format(vk_format);<br>
+ const struct anv_format *format = anv_get_format(vk_format);<br>
+ struct anv_format_plane plane_format = {<br>
+ .isl_format = ISL_FORMAT_UNSUPPORTED,<br>
+ };<br>
<br>
- if (format.isl_format == ISL_FORMAT_UNSUPPORTED)<br>
- return format;<br>
+ if (format == NULL)<br>
+ return plane_format;<br>
<br>
- if (aspect == VK_IMAGE_ASPECT_STENCIL_BIT) {<br>
- assert(vk_format_aspects(vk_<wbr>format) & VK_IMAGE_ASPECT_STENCIL_BIT);<br>
- format.isl_format = ISL_FORMAT_R8_UINT;<br>
- return format;<br>
- }<br>
+ uint32_t plane = anv_image_aspect_to_plane(vk_<wbr>format_aspects(vk_format), aspect);<br>
+ plane_format = format->planes[plane];<br>
+ if (plane_format.isl_format == ISL_FORMAT_UNSUPPORTED)<br>
+ return plane_format;<br>
<br>
- if (aspect & VK_IMAGE_ASPECT_DEPTH_BIT) {<br>
- assert(vk_format_aspects(vk_<wbr>format) & VK_IMAGE_ASPECT_DEPTH_BIT);<br>
- return format;<br>
+ if (aspect & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {<br>
+ assert(vk_format_aspects(vk_<wbr>format) &<br>
+ (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT));<br>
+ return plane_format;<br>
}<br>
<br>
assert(aspect == VK_IMAGE_ASPECT_COLOR_BIT);<br>
assert(vk_format_aspects(vk_<wbr>format) == VK_IMAGE_ASPECT_COLOR_BIT);<br>
<br>
const struct isl_format_layout *isl_layout =<br>
- isl_format_get_layout(format.<wbr>isl_format);<br>
+ isl_format_get_layout(plane_<wbr>format.isl_format);<br>
<br>
if (tiling == VK_IMAGE_TILING_OPTIMAL &&<br>
!util_is_power_of_two(isl_<wbr>layout->bpb)) {<br>
@@ -313,13 +344,14 @@ anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format,<br>
* this by switching them over to RGBX or RGBA formats under the<br>
* hood.<br>
*/<br>
- enum isl_format rgbx = isl_format_rgb_to_rgbx(format.<wbr>isl_format);<br>
+ enum isl_format rgbx = isl_format_rgb_to_rgbx(plane_<wbr>format.isl_format);<br>
if (rgbx != ISL_FORMAT_UNSUPPORTED &&<br>
isl_format_supports_rendering(<wbr>devinfo, rgbx)) {<br>
- format.isl_format = rgbx;<br>
+ plane_format.isl_format = rgbx;<br>
} else {<br>
- format.isl_format = isl_format_rgb_to_rgba(format.<wbr>isl_format);<br>
- format.swizzle = ISL_SWIZZLE(RED, GREEN, BLUE, ONE);<br>
+ plane_format.isl_format =<br>
+ isl_format_rgb_to_rgba(plane_<wbr>format.isl_format);<br>
+ plane_format.swizzle = ISL_SWIZZLE(RED, GREEN, BLUE, ONE);<br>
}<br>
}<br>
<br>
@@ -327,20 +359,18 @@ anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format,<br>
* back to a format with a more complex swizzle.<br>
*/<br>
if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_<wbr>PACK16 && devinfo->gen < 8) {<br>
- return (struct anv_format) {<br>
- .isl_format = ISL_FORMAT_B4G4R4A4_UNORM,<br>
- .swizzle = ISL_SWIZZLE(GREEN, RED, ALPHA, BLUE),<br>
- };<br>
+ plane_format.isl_format = ISL_FORMAT_B4G4R4A4_UNORM;<br>
+ plane_format.swizzle = ISL_SWIZZLE(GREEN, RED, ALPHA, BLUE);<br>
}<br>
<br>
- return format;<br>
+ return plane_format;<br>
}<br>
<br>
// Format capabilities<br>
<br>
static VkFormatFeatureFlags<br>
get_image_format_properties(<wbr>const struct gen_device_info *devinfo,<br>
- enum isl_format base, struct anv_format format)<br>
+ enum isl_format base, struct anv_format_plane format)<br>
{<br>
if (format.isl_format == ISL_FORMAT_UNSUPPORTED)<br>
return 0;<br>
@@ -410,19 +440,20 @@ get_buffer_format_properties(<wbr>const struct gen_device_info *devinfo,<br>
<br>
static void<br>
anv_physical_device_get_<wbr>format_properties(struct anv_physical_device *physical_device,<br>
- VkFormat format,<br>
+ VkFormat vk_format,<br>
VkFormatProperties *out_properties)<br>
{<br>
int gen = physical_device->info.gen * 10;<br>
if (physical_device->info.is_<wbr>haswell)<br>
gen += 5;<br>
<br>
+ const struct anv_format *format = anv_get_format(vk_format);<br>
VkFormatFeatureFlags linear = 0, tiled = 0, buffer = 0;<br>
- if (!format_supported(format)) {<br>
+ if (format == NULL) {<br>
/* Nothing to do here */<br>
- } else if (vk_format_is_depth_or_<wbr>stencil(format)) {<br>
+ } else if (vk_format_is_depth_or_<wbr>stencil(vk_format)) {<br>
tiled |= VK_FORMAT_FEATURE_DEPTH_<wbr>STENCIL_ATTACHMENT_BIT;<br>
- if (vk_format_aspects(format) == VK_IMAGE_ASPECT_DEPTH_BIT ||<br>
+ if (vk_format_aspects(vk_format) == VK_IMAGE_ASPECT_DEPTH_BIT ||<br>
physical_device->info.gen >= 8)<br>
tiled |= VK_FORMAT_FEATURE_SAMPLED_<wbr>IMAGE_BIT;<br>
<br>
@@ -431,13 +462,13 @@ anv_physical_device_get_<wbr>format_properties(struct anv_physical_device *physical_d<br>
VK_FORMAT_FEATURE_TRANSFER_<wbr>SRC_BIT_KHR |<br>
VK_FORMAT_FEATURE_TRANSFER_<wbr>DST_BIT_KHR;<br>
} else {<br>
- struct anv_format linear_fmt, tiled_fmt;<br>
- linear_fmt = anv_get_format(&physical_<wbr>device->info, format,<br>
- VK_IMAGE_ASPECT_COLOR_BIT,<br>
- VK_IMAGE_TILING_LINEAR);<br>
- tiled_fmt = anv_get_format(&physical_<wbr>device->info, format,<br>
- VK_IMAGE_ASPECT_COLOR_BIT,<br>
- VK_IMAGE_TILING_OPTIMAL);<br>
+ struct anv_format_plane linear_fmt, tiled_fmt;<br>
+ linear_fmt = anv_get_format_plane(&<wbr>physical_device->info, vk_format,<br>
+ VK_IMAGE_ASPECT_COLOR_BIT,<br>
+ VK_IMAGE_TILING_LINEAR);<br>
+ tiled_fmt = anv_get_format_plane(&<wbr>physical_device->info, vk_format,<br>
+ VK_IMAGE_ASPECT_COLOR_BIT,<br>
+ VK_IMAGE_TILING_OPTIMAL);<br>
<br>
linear = get_image_format_properties(&<wbr>physical_device->info,<br>
linear_fmt.isl_format, linear_fmt);<br>
@@ -515,8 +546,9 @@ anv_get_image_format_<wbr>properties(<br>
uint32_t maxMipLevels;<br>
uint32_t maxArraySize;<br>
VkSampleCountFlags sampleCounts = VK_SAMPLE_COUNT_1_BIT;<br>
+ const struct anv_format *format = anv_get_format(info->format);<br>
<br>
- if (!format_supported(info-><wbr>format))<br>
+ if (format == NULL)<br>
goto unsupported;<br>
<br>
anv_physical_device_get_<wbr>format_properties(physical_<wbr>device, info->format,<br>
@@ -570,7 +602,7 @@ anv_get_image_format_<wbr>properties(<br>
* * This field cannot be ASTC format if the Surface Type is SURFTYPE_1D.<br>
*/<br>
if (info->type == VK_IMAGE_TYPE_1D &&<br>
- isl_format_is_compressed(vk_<wbr>to_anv_format(info->format).<wbr>isl_format)) {<br>
+ isl_format_is_compressed(<wbr>format->planes[0].isl_format)) {<br>
goto unsupported;<br>
}<br>
<br>
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c<br>
index 7561b9b52b4..cec3768a380 100644<br>
--- a/src/intel/vulkan/anv_image.c<br>
+++ b/src/intel/vulkan/anv_image.c<br>
@@ -264,8 +264,8 @@ make_surface(const struct anv_device *dev,<br>
image->extent = anv_sanitize_image_extent(vk_<wbr>info->imageType,<br>
vk_info->extent);<br>
<br>
- enum isl_format format = anv_get_isl_format(&dev->info, vk_info->format,<br>
- aspect, vk_info->tiling);<br>
+ enum isl_format format =<br>
+ anv_get_isl_format(&dev->info, vk_info->format, aspect, vk_info->tiling);<br></blockquote><div><br></div><div>spurious change<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
assert(format != ISL_FORMAT_UNSUPPORTED);<br>
<br>
/* If an image is created as BLOCK_TEXEL_VIEW_COMPATIBLE, then we need to<br>
@@ -972,8 +972,12 @@ anv_CreateImageView(VkDevice _device,<br>
iview->aspect_mask = pCreateInfo->subresourceRange.<wbr>aspectMask;<br>
iview->vk_format = pCreateInfo->format;<br>
<br>
- struct anv_format format = anv_get_format(&device->info, pCreateInfo->format,<br>
- range->aspectMask, image->tiling);<br>
+ struct anv_format_plane format =<br>
+ anv_get_format_plane(&device-><wbr>info, pCreateInfo->format,<br>
+ range->aspectMask == (VK_IMAGE_ASPECT_DEPTH_BIT |<br>
+ VK_IMAGE_ASPECT_STENCIL_BIT) ?<br>
+ VK_IMAGE_ASPECT_DEPTH_BIT : range->aspectMask,<br>
+ image->tiling);<br>
<br>
iview->isl = (struct isl_view) {<br>
.format = format.isl_format,<br>
diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
index b58c803530c..261ec9bb7c6 100644<br>
--- a/src/intel/vulkan/anv_<wbr>private.h<br>
+++ b/src/intel/vulkan/anv_<wbr>private.h<br>
@@ -2169,20 +2169,60 @@ anv_pipeline_compile_cs(struct anv_pipeline *pipeline,<br>
const char *entrypoint,<br>
const VkSpecializationInfo *spec_info);<br>
<br>
-struct anv_format {<br>
+struct anv_format_plane {<br>
enum isl_format isl_format:16;<br>
struct isl_swizzle swizzle;<br>
};<br>
<br>
-struct anv_format<br>
-anv_get_format(const struct gen_device_info *devinfo, VkFormat format,<br>
- VkImageAspectFlags aspect, VkImageTiling tiling);<br>
+<br>
+struct anv_format {<br>
+ struct anv_format_plane planes[3];<br>
+ uint8_t n_planes;<br>
+};<br>
+<br>
+static inline uint32_t<br>
+anv_image_aspect_to_plane(<wbr>VkImageAspectFlags image_aspects,<br>
+ VkImageAspectFlags aspect_mask)<br>
+{<br>
+ switch (aspect_mask) {<br>
+ case VK_IMAGE_ASPECT_COLOR_BIT:<br>
+ case VK_IMAGE_ASPECT_DEPTH_BIT:<br>
+ case VK_IMAGE_ASPECT_PLANE_0_BIT_<wbr>KHR:<br>
+ return 0;<br>
+ case VK_IMAGE_ASPECT_STENCIL_BIT:<br>
+ if ((image_aspects & VK_IMAGE_ASPECT_DEPTH_BIT) == 0)<br>
+ return 0;<br>
+ /* Fall-through */<br>
+ case VK_IMAGE_ASPECT_PLANE_1_BIT_<wbr>KHR:<br>
+ return 1;<br>
+ case VK_IMAGE_ASPECT_PLANE_2_BIT_<wbr>KHR:<br>
+ return 2;<br>
+ default:<br>
+ unreachable("invalid image aspect");<br>
+ }<br>
+}<br>
+<br>
+const struct anv_format *<br>
+anv_get_format(VkFormat format);<br>
+<br>
+static inline uint32_t<br>
+anv_get_format_planes(<wbr>VkFormat vk_format)<br>
+{<br>
+ const struct anv_format *format = anv_get_format(vk_format);<br>
+<br>
+ return format != NULL ? format->n_planes : 0;<br>
+}<br>
+<br>
+struct anv_format_plane<br>
+anv_get_format_plane(const struct gen_device_info *devinfo, VkFormat vk_format,<br>
+ VkImageAspectFlags aspect, VkImageTiling tiling);<br>
<br>
static inline enum isl_format<br>
-anv_get_isl_format(const struct gen_device_info *devinfo, VkFormat vk_format,<br>
- VkImageAspectFlags aspect, VkImageTiling tiling)<br>
+anv_get_isl_format(const struct gen_device_info *devinfo,<br>
+ VkFormat vk_format, VkImageAspectFlags aspect,<br>
+ VkImageTiling tiling)<br></blockquote><div><br></div><div>Now a spurrious change<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
{<br>
- return anv_get_format(devinfo, vk_format, aspect, tiling).isl_format;<br>
+ return anv_get_format_plane(devinfo, vk_format, aspect, tiling).isl_format;<br>
}<br>
<br>
static inline struct isl_swizzle<br>
diff --git a/src/intel/vulkan/genX_<wbr>pipeline.c b/src/intel/vulkan/genX_<wbr>pipeline.c<br>
index c2fa9c0ff7f..62c522e1ea6 100644<br>
--- a/src/intel/vulkan/genX_<wbr>pipeline.c<br>
+++ b/src/intel/vulkan/genX_<wbr>pipeline.c<br>
@@ -120,10 +120,9 @@ emit_vertex_input(struct anv_pipeline *pipeline,<br>
for (uint32_t i = 0; i < info-><wbr>vertexAttributeDescriptionCoun<wbr>t; i++) {<br>
const VkVertexInputAttributeDescript<wbr>ion *desc =<br>
&info-><wbr>pVertexAttributeDescriptions[<wbr>i];<br>
- enum isl_format format = anv_get_isl_format(&pipeline-><wbr>device->info,<br>
- desc->format,<br>
- VK_IMAGE_ASPECT_COLOR_BIT,<br>
- VK_IMAGE_TILING_LINEAR);<br>
+ enum isl_format format =<br>
+ anv_get_isl_format(&pipeline-><wbr>device->info, desc->format,<br>
+ VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_TILING_LINEAR);<br></blockquote><div><br></div><div>Now a spurrious change<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
assert(desc->binding < MAX_VBS);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.14.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div></div></div>