summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-31 12:07:23 -0800
committerJason Ekstrand <[email protected]>2015-12-31 12:07:43 -0800
commit6b5cbdb317c770b7cf767bc95b3ed79f01b10cf9 (patch)
tree099611df3d9efdd8fb0a6381e6a4e9763f1a8dc9 /src
parent3fe1f118f8f5ad61d4dd58a7568627790ff31348 (diff)
anv/format: Get rid of num_channels
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/anv_formats.c218
-rw-r--r--src/vulkan/anv_private.h1
2 files changed, 109 insertions, 110 deletions
diff --git a/src/vulkan/anv_formats.c b/src/vulkan/anv_formats.c
index 9a895e05432..6465fabd5b5 100644
--- a/src/vulkan/anv_formats.c
+++ b/src/vulkan/anv_formats.c
@@ -36,7 +36,7 @@
}
static const struct anv_format anv_formats[] = {
- fmt(VK_FORMAT_UNDEFINED, ISL_FORMAT_RAW, .num_channels = 1),
+ fmt(VK_FORMAT_UNDEFINED, ISL_FORMAT_RAW),
fmt(VK_FORMAT_R4G4_UNORM_PACK8, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_R4G4B4A4_UNORM_PACK16, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B4G4R4A4_UNORM_PACK16, ISL_FORMAT_UNSUPPORTED),
@@ -45,115 +45,115 @@ static const struct anv_format anv_formats[] = {
fmt(VK_FORMAT_R5G5B5A1_UNORM_PACK16, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B5G5R5A1_UNORM_PACK16, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_A1R5G5B5_UNORM_PACK16, ISL_FORMAT_UNSUPPORTED),
- fmt(VK_FORMAT_R8_UNORM, ISL_FORMAT_R8_UNORM, .num_channels = 1),
- fmt(VK_FORMAT_R8_SNORM, ISL_FORMAT_R8_SNORM, .num_channels = 1),
- fmt(VK_FORMAT_R8_USCALED, ISL_FORMAT_R8_USCALED, .num_channels = 1),
- fmt(VK_FORMAT_R8_SSCALED, ISL_FORMAT_R8_SSCALED, .num_channels = 1),
- fmt(VK_FORMAT_R8_UINT, ISL_FORMAT_R8_UINT, .num_channels = 1),
- fmt(VK_FORMAT_R8_SINT, ISL_FORMAT_R8_SINT, .num_channels = 1),
+ fmt(VK_FORMAT_R8_UNORM, ISL_FORMAT_R8_UNORM),
+ fmt(VK_FORMAT_R8_SNORM, ISL_FORMAT_R8_SNORM),
+ fmt(VK_FORMAT_R8_USCALED, ISL_FORMAT_R8_USCALED),
+ fmt(VK_FORMAT_R8_SSCALED, ISL_FORMAT_R8_SSCALED),
+ fmt(VK_FORMAT_R8_UINT, ISL_FORMAT_R8_UINT),
+ fmt(VK_FORMAT_R8_SINT, ISL_FORMAT_R8_SINT),
fmt(VK_FORMAT_R8_SRGB, ISL_FORMAT_UNSUPPORTED),
- fmt(VK_FORMAT_R8G8_UNORM, ISL_FORMAT_R8G8_UNORM, .num_channels = 2),
- fmt(VK_FORMAT_R8G8_SNORM, ISL_FORMAT_R8G8_SNORM, .num_channels = 2),
- fmt(VK_FORMAT_R8G8_USCALED, ISL_FORMAT_R8G8_USCALED, .num_channels = 2),
- fmt(VK_FORMAT_R8G8_SSCALED, ISL_FORMAT_R8G8_SSCALED, .num_channels = 2),
- fmt(VK_FORMAT_R8G8_UINT, ISL_FORMAT_R8G8_UINT, .num_channels = 2),
- fmt(VK_FORMAT_R8G8_SINT, ISL_FORMAT_R8G8_SINT, .num_channels = 2),
+ fmt(VK_FORMAT_R8G8_UNORM, ISL_FORMAT_R8G8_UNORM),
+ fmt(VK_FORMAT_R8G8_SNORM, ISL_FORMAT_R8G8_SNORM),
+ fmt(VK_FORMAT_R8G8_USCALED, ISL_FORMAT_R8G8_USCALED),
+ fmt(VK_FORMAT_R8G8_SSCALED, ISL_FORMAT_R8G8_SSCALED),
+ fmt(VK_FORMAT_R8G8_UINT, ISL_FORMAT_R8G8_UINT),
+ fmt(VK_FORMAT_R8G8_SINT, ISL_FORMAT_R8G8_SINT),
fmt(VK_FORMAT_R8G8_SRGB, ISL_FORMAT_UNSUPPORTED), /* L8A8_UNORM_SRGB */
- fmt(VK_FORMAT_R8G8B8_UNORM, ISL_FORMAT_R8G8B8X8_UNORM, .num_channels = 3),
- fmt(VK_FORMAT_R8G8B8_SNORM, ISL_FORMAT_R8G8B8_SNORM, .num_channels = 3),
- fmt(VK_FORMAT_R8G8B8_USCALED, ISL_FORMAT_R8G8B8_USCALED, .num_channels = 3),
- fmt(VK_FORMAT_R8G8B8_SSCALED, ISL_FORMAT_R8G8B8_SSCALED, .num_channels = 3),
- fmt(VK_FORMAT_R8G8B8_UINT, ISL_FORMAT_R8G8B8_UINT, .num_channels = 3),
- fmt(VK_FORMAT_R8G8B8_SINT, ISL_FORMAT_R8G8B8_SINT, .num_channels = 3),
+ fmt(VK_FORMAT_R8G8B8_UNORM, ISL_FORMAT_R8G8B8X8_UNORM),
+ fmt(VK_FORMAT_R8G8B8_SNORM, ISL_FORMAT_R8G8B8_SNORM),
+ fmt(VK_FORMAT_R8G8B8_USCALED, ISL_FORMAT_R8G8B8_USCALED),
+ fmt(VK_FORMAT_R8G8B8_SSCALED, ISL_FORMAT_R8G8B8_SSCALED),
+ fmt(VK_FORMAT_R8G8B8_UINT, ISL_FORMAT_R8G8B8_UINT),
+ fmt(VK_FORMAT_R8G8B8_SINT, ISL_FORMAT_R8G8B8_SINT),
fmt(VK_FORMAT_R8G8B8_SRGB, ISL_FORMAT_UNSUPPORTED), /* B8G8R8A8_UNORM_SRGB */
- fmt(VK_FORMAT_R8G8B8A8_UNORM, ISL_FORMAT_R8G8B8A8_UNORM, .num_channels = 4),
- fmt(VK_FORMAT_R8G8B8A8_SNORM, ISL_FORMAT_R8G8B8A8_SNORM, .num_channels = 4),
- fmt(VK_FORMAT_R8G8B8A8_USCALED, ISL_FORMAT_R8G8B8A8_USCALED, .num_channels = 4),
- fmt(VK_FORMAT_R8G8B8A8_SSCALED, ISL_FORMAT_R8G8B8A8_SSCALED, .num_channels = 4),
- fmt(VK_FORMAT_R8G8B8A8_UINT, ISL_FORMAT_R8G8B8A8_UINT, .num_channels = 4),
- fmt(VK_FORMAT_R8G8B8A8_SINT, ISL_FORMAT_R8G8B8A8_SINT, .num_channels = 4),
- fmt(VK_FORMAT_R8G8B8A8_SRGB, ISL_FORMAT_R8G8B8A8_UNORM_SRGB, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_UNORM_PACK32, ISL_FORMAT_R8G8B8A8_UNORM, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_SNORM_PACK32, ISL_FORMAT_R8G8B8A8_SNORM, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_USCALED_PACK32, ISL_FORMAT_R8G8B8A8_USCALED, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_SSCALED_PACK32, ISL_FORMAT_R8G8B8A8_SSCALED, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_UINT_PACK32, ISL_FORMAT_R8G8B8A8_UINT, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_SINT_PACK32, ISL_FORMAT_R8G8B8A8_SINT, .num_channels = 4),
- fmt(VK_FORMAT_A8B8G8R8_SRGB_PACK32, ISL_FORMAT_R8G8B8A8_UNORM_SRGB, .num_channels = 4),
- fmt(VK_FORMAT_A2R10G10B10_UNORM_PACK32, ISL_FORMAT_B10G10R10A2_UNORM, .num_channels = 4),
- fmt(VK_FORMAT_A2R10G10B10_SNORM_PACK32, ISL_FORMAT_B10G10R10A2_SNORM, .num_channels = 4),
- fmt(VK_FORMAT_A2R10G10B10_USCALED_PACK32, ISL_FORMAT_B10G10R10A2_USCALED, .num_channels = 4),
- fmt(VK_FORMAT_A2R10G10B10_SSCALED_PACK32, ISL_FORMAT_B10G10R10A2_SSCALED, .num_channels = 4),
- fmt(VK_FORMAT_A2R10G10B10_UINT_PACK32, ISL_FORMAT_B10G10R10A2_UINT, .num_channels = 4),
- fmt(VK_FORMAT_A2R10G10B10_SINT_PACK32, ISL_FORMAT_B10G10R10A2_SINT, .num_channels = 4),
- fmt(VK_FORMAT_A2B10G10R10_UNORM_PACK32, ISL_FORMAT_R10G10B10A2_UNORM, .num_channels = 4),
- fmt(VK_FORMAT_A2B10G10R10_SNORM_PACK32, ISL_FORMAT_R10G10B10A2_SNORM, .num_channels = 4),
- fmt(VK_FORMAT_A2B10G10R10_USCALED_PACK32, ISL_FORMAT_R10G10B10A2_USCALED, .num_channels = 4),
- fmt(VK_FORMAT_A2B10G10R10_SSCALED_PACK32, ISL_FORMAT_R10G10B10A2_SSCALED, .num_channels = 4),
- fmt(VK_FORMAT_A2B10G10R10_UINT_PACK32, ISL_FORMAT_R10G10B10A2_UINT, .num_channels = 4),
- fmt(VK_FORMAT_A2B10G10R10_SINT_PACK32, ISL_FORMAT_R10G10B10A2_SINT, .num_channels = 4),
- fmt(VK_FORMAT_R16_UNORM, ISL_FORMAT_R16_UNORM, .num_channels = 1),
- fmt(VK_FORMAT_R16_SNORM, ISL_FORMAT_R16_SNORM, .num_channels = 1),
- fmt(VK_FORMAT_R16_USCALED, ISL_FORMAT_R16_USCALED, .num_channels = 1),
- fmt(VK_FORMAT_R16_SSCALED, ISL_FORMAT_R16_SSCALED, .num_channels = 1),
- fmt(VK_FORMAT_R16_UINT, ISL_FORMAT_R16_UINT, .num_channels = 1),
- fmt(VK_FORMAT_R16_SINT, ISL_FORMAT_R16_SINT, .num_channels = 1),
- fmt(VK_FORMAT_R16_SFLOAT, ISL_FORMAT_R16_FLOAT, .num_channels = 1),
- fmt(VK_FORMAT_R16G16_UNORM, ISL_FORMAT_R16G16_UNORM, .num_channels = 2),
- fmt(VK_FORMAT_R16G16_SNORM, ISL_FORMAT_R16G16_SNORM, .num_channels = 2),
- fmt(VK_FORMAT_R16G16_USCALED, ISL_FORMAT_R16G16_USCALED, .num_channels = 2),
- fmt(VK_FORMAT_R16G16_SSCALED, ISL_FORMAT_R16G16_SSCALED, .num_channels = 2),
- fmt(VK_FORMAT_R16G16_UINT, ISL_FORMAT_R16G16_UINT, .num_channels = 2),
- fmt(VK_FORMAT_R16G16_SINT, ISL_FORMAT_R16G16_SINT, .num_channels = 2),
- fmt(VK_FORMAT_R16G16_SFLOAT, ISL_FORMAT_R16G16_FLOAT, .num_channels = 2),
- fmt(VK_FORMAT_R16G16B16_UNORM, ISL_FORMAT_R16G16B16_UNORM, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16_SNORM, ISL_FORMAT_R16G16B16_SNORM, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16_USCALED, ISL_FORMAT_R16G16B16_USCALED, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16_SSCALED, ISL_FORMAT_R16G16B16_SSCALED, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16_UINT, ISL_FORMAT_R16G16B16_UINT, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16_SINT, ISL_FORMAT_R16G16B16_SINT, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16_SFLOAT, ISL_FORMAT_R16G16B16_FLOAT, .num_channels = 3),
- fmt(VK_FORMAT_R16G16B16A16_UNORM, ISL_FORMAT_R16G16B16A16_UNORM, .num_channels = 4),
- fmt(VK_FORMAT_R16G16B16A16_SNORM, ISL_FORMAT_R16G16B16A16_SNORM, .num_channels = 4),
- fmt(VK_FORMAT_R16G16B16A16_USCALED, ISL_FORMAT_R16G16B16A16_USCALED, .num_channels = 4),
- fmt(VK_FORMAT_R16G16B16A16_SSCALED, ISL_FORMAT_R16G16B16A16_SSCALED, .num_channels = 4),
- fmt(VK_FORMAT_R16G16B16A16_UINT, ISL_FORMAT_R16G16B16A16_UINT, .num_channels = 4),
- fmt(VK_FORMAT_R16G16B16A16_SINT, ISL_FORMAT_R16G16B16A16_SINT, .num_channels = 4),
- fmt(VK_FORMAT_R16G16B16A16_SFLOAT, ISL_FORMAT_R16G16B16A16_FLOAT, .num_channels = 4),
- fmt(VK_FORMAT_R32_UINT, ISL_FORMAT_R32_UINT, .num_channels = 1,),
- fmt(VK_FORMAT_R32_SINT, ISL_FORMAT_R32_SINT, .num_channels = 1,),
- fmt(VK_FORMAT_R32_SFLOAT, ISL_FORMAT_R32_FLOAT, .num_channels = 1,),
- fmt(VK_FORMAT_R32G32_UINT, ISL_FORMAT_R32G32_UINT, .num_channels = 2,),
- fmt(VK_FORMAT_R32G32_SINT, ISL_FORMAT_R32G32_SINT, .num_channels = 2,),
- fmt(VK_FORMAT_R32G32_SFLOAT, ISL_FORMAT_R32G32_FLOAT, .num_channels = 2,),
- fmt(VK_FORMAT_R32G32B32_UINT, ISL_FORMAT_R32G32B32_UINT, .num_channels = 3,),
- fmt(VK_FORMAT_R32G32B32_SINT, ISL_FORMAT_R32G32B32_SINT, .num_channels = 3,),
- fmt(VK_FORMAT_R32G32B32_SFLOAT, ISL_FORMAT_R32G32B32_FLOAT, .num_channels = 3,),
- fmt(VK_FORMAT_R32G32B32A32_UINT, ISL_FORMAT_R32G32B32A32_UINT, .num_channels = 4,),
- fmt(VK_FORMAT_R32G32B32A32_SINT, ISL_FORMAT_R32G32B32A32_SINT, .num_channels = 4,),
- fmt(VK_FORMAT_R32G32B32A32_SFLOAT, ISL_FORMAT_R32G32B32A32_FLOAT, .num_channels = 4,),
- fmt(VK_FORMAT_R64_UINT, ISL_FORMAT_R64_PASSTHRU, .num_channels = 1),
- fmt(VK_FORMAT_R64_SINT, ISL_FORMAT_R64_PASSTHRU, .num_channels = 1),
- fmt(VK_FORMAT_R64_SFLOAT, ISL_FORMAT_R64_FLOAT, .num_channels = 1),
- fmt(VK_FORMAT_R64G64_UINT, ISL_FORMAT_R64G64_PASSTHRU, .num_channels = 2),
- fmt(VK_FORMAT_R64G64_SINT, ISL_FORMAT_R64G64_PASSTHRU, .num_channels = 2),
- fmt(VK_FORMAT_R64G64_SFLOAT, ISL_FORMAT_R64G64_FLOAT, .num_channels = 2),
- fmt(VK_FORMAT_R64G64B64_UINT, ISL_FORMAT_R64G64B64_PASSTHRU, .num_channels = 3),
- fmt(VK_FORMAT_R64G64B64_SINT, ISL_FORMAT_R64G64B64_PASSTHRU, .num_channels = 3),
- fmt(VK_FORMAT_R64G64B64_SFLOAT, ISL_FORMAT_R64G64B64_FLOAT, .num_channels = 3),
- fmt(VK_FORMAT_R64G64B64A64_UINT, ISL_FORMAT_R64G64B64A64_PASSTHRU, .num_channels = 4),
- fmt(VK_FORMAT_R64G64B64A64_SINT, ISL_FORMAT_R64G64B64A64_PASSTHRU, .num_channels = 4),
- fmt(VK_FORMAT_R64G64B64A64_SFLOAT, ISL_FORMAT_R64G64B64A64_FLOAT, .num_channels = 4),
- fmt(VK_FORMAT_B10G11R11_UFLOAT_PACK32, ISL_FORMAT_R11G11B10_FLOAT, .num_channels = 3),
- fmt(VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, ISL_FORMAT_R9G9B9E5_SHAREDEXP, .num_channels = 3),
-
- fmt(VK_FORMAT_D16_UNORM, ISL_FORMAT_R16_UNORM, .num_channels = 1, .depth_format = D16_UNORM),
- fmt(VK_FORMAT_X8_D24_UNORM_PACK32, ISL_FORMAT_R24_UNORM_X8_TYPELESS, .num_channels = 1, .depth_format = D24_UNORM_X8_UINT),
- fmt(VK_FORMAT_D32_SFLOAT, ISL_FORMAT_R32_FLOAT, .num_channels = 1, .depth_format = D32_FLOAT),
- fmt(VK_FORMAT_S8_UINT, ISL_FORMAT_R8_UINT, .num_channels = 1, .has_stencil = true),
- fmt(VK_FORMAT_D16_UNORM_S8_UINT, ISL_FORMAT_R16_UNORM, .num_channels = 2, .depth_format = D16_UNORM, .has_stencil = true),
- fmt(VK_FORMAT_D24_UNORM_S8_UINT, ISL_FORMAT_R24_UNORM_X8_TYPELESS, .num_channels = 2, .depth_format = D24_UNORM_X8_UINT, .has_stencil = true),
- fmt(VK_FORMAT_D32_SFLOAT_S8_UINT, ISL_FORMAT_R32_FLOAT, .num_channels = 2, .depth_format = D32_FLOAT, .has_stencil = true),
+ fmt(VK_FORMAT_R8G8B8A8_UNORM, ISL_FORMAT_R8G8B8A8_UNORM),
+ fmt(VK_FORMAT_R8G8B8A8_SNORM, ISL_FORMAT_R8G8B8A8_SNORM),
+ fmt(VK_FORMAT_R8G8B8A8_USCALED, ISL_FORMAT_R8G8B8A8_USCALED),
+ fmt(VK_FORMAT_R8G8B8A8_SSCALED, ISL_FORMAT_R8G8B8A8_SSCALED),
+ fmt(VK_FORMAT_R8G8B8A8_UINT, ISL_FORMAT_R8G8B8A8_UINT),
+ fmt(VK_FORMAT_R8G8B8A8_SINT, ISL_FORMAT_R8G8B8A8_SINT),
+ fmt(VK_FORMAT_R8G8B8A8_SRGB, ISL_FORMAT_R8G8B8A8_UNORM_SRGB),
+ fmt(VK_FORMAT_A8B8G8R8_UNORM_PACK32, ISL_FORMAT_R8G8B8A8_UNORM),
+ fmt(VK_FORMAT_A8B8G8R8_SNORM_PACK32, ISL_FORMAT_R8G8B8A8_SNORM),
+ fmt(VK_FORMAT_A8B8G8R8_USCALED_PACK32, ISL_FORMAT_R8G8B8A8_USCALED),
+ fmt(VK_FORMAT_A8B8G8R8_SSCALED_PACK32, ISL_FORMAT_R8G8B8A8_SSCALED),
+ fmt(VK_FORMAT_A8B8G8R8_UINT_PACK32, ISL_FORMAT_R8G8B8A8_UINT),
+ fmt(VK_FORMAT_A8B8G8R8_SINT_PACK32, ISL_FORMAT_R8G8B8A8_SINT),
+ fmt(VK_FORMAT_A8B8G8R8_SRGB_PACK32, ISL_FORMAT_R8G8B8A8_UNORM_SRGB),
+ fmt(VK_FORMAT_A2R10G10B10_UNORM_PACK32, ISL_FORMAT_B10G10R10A2_UNORM),
+ fmt(VK_FORMAT_A2R10G10B10_SNORM_PACK32, ISL_FORMAT_B10G10R10A2_SNORM),
+ fmt(VK_FORMAT_A2R10G10B10_USCALED_PACK32, ISL_FORMAT_B10G10R10A2_USCALED),
+ fmt(VK_FORMAT_A2R10G10B10_SSCALED_PACK32, ISL_FORMAT_B10G10R10A2_SSCALED),
+ fmt(VK_FORMAT_A2R10G10B10_UINT_PACK32, ISL_FORMAT_B10G10R10A2_UINT),
+ fmt(VK_FORMAT_A2R10G10B10_SINT_PACK32, ISL_FORMAT_B10G10R10A2_SINT),
+ fmt(VK_FORMAT_A2B10G10R10_UNORM_PACK32, ISL_FORMAT_R10G10B10A2_UNORM),
+ fmt(VK_FORMAT_A2B10G10R10_SNORM_PACK32, ISL_FORMAT_R10G10B10A2_SNORM),
+ fmt(VK_FORMAT_A2B10G10R10_USCALED_PACK32, ISL_FORMAT_R10G10B10A2_USCALED),
+ fmt(VK_FORMAT_A2B10G10R10_SSCALED_PACK32, ISL_FORMAT_R10G10B10A2_SSCALED),
+ fmt(VK_FORMAT_A2B10G10R10_UINT_PACK32, ISL_FORMAT_R10G10B10A2_UINT),
+ fmt(VK_FORMAT_A2B10G10R10_SINT_PACK32, ISL_FORMAT_R10G10B10A2_SINT),
+ fmt(VK_FORMAT_R16_UNORM, ISL_FORMAT_R16_UNORM),
+ fmt(VK_FORMAT_R16_SNORM, ISL_FORMAT_R16_SNORM),
+ fmt(VK_FORMAT_R16_USCALED, ISL_FORMAT_R16_USCALED),
+ fmt(VK_FORMAT_R16_SSCALED, ISL_FORMAT_R16_SSCALED),
+ fmt(VK_FORMAT_R16_UINT, ISL_FORMAT_R16_UINT),
+ fmt(VK_FORMAT_R16_SINT, ISL_FORMAT_R16_SINT),
+ fmt(VK_FORMAT_R16_SFLOAT, ISL_FORMAT_R16_FLOAT),
+ fmt(VK_FORMAT_R16G16_UNORM, ISL_FORMAT_R16G16_UNORM),
+ fmt(VK_FORMAT_R16G16_SNORM, ISL_FORMAT_R16G16_SNORM),
+ fmt(VK_FORMAT_R16G16_USCALED, ISL_FORMAT_R16G16_USCALED),
+ fmt(VK_FORMAT_R16G16_SSCALED, ISL_FORMAT_R16G16_SSCALED),
+ fmt(VK_FORMAT_R16G16_UINT, ISL_FORMAT_R16G16_UINT),
+ fmt(VK_FORMAT_R16G16_SINT, ISL_FORMAT_R16G16_SINT),
+ fmt(VK_FORMAT_R16G16_SFLOAT, ISL_FORMAT_R16G16_FLOAT),
+ fmt(VK_FORMAT_R16G16B16_UNORM, ISL_FORMAT_R16G16B16_UNORM),
+ fmt(VK_FORMAT_R16G16B16_SNORM, ISL_FORMAT_R16G16B16_SNORM),
+ fmt(VK_FORMAT_R16G16B16_USCALED, ISL_FORMAT_R16G16B16_USCALED),
+ fmt(VK_FORMAT_R16G16B16_SSCALED, ISL_FORMAT_R16G16B16_SSCALED),
+ fmt(VK_FORMAT_R16G16B16_UINT, ISL_FORMAT_R16G16B16_UINT),
+ fmt(VK_FORMAT_R16G16B16_SINT, ISL_FORMAT_R16G16B16_SINT),
+ fmt(VK_FORMAT_R16G16B16_SFLOAT, ISL_FORMAT_R16G16B16_FLOAT),
+ fmt(VK_FORMAT_R16G16B16A16_UNORM, ISL_FORMAT_R16G16B16A16_UNORM),
+ fmt(VK_FORMAT_R16G16B16A16_SNORM, ISL_FORMAT_R16G16B16A16_SNORM),
+ fmt(VK_FORMAT_R16G16B16A16_USCALED, ISL_FORMAT_R16G16B16A16_USCALED),
+ fmt(VK_FORMAT_R16G16B16A16_SSCALED, ISL_FORMAT_R16G16B16A16_SSCALED),
+ fmt(VK_FORMAT_R16G16B16A16_UINT, ISL_FORMAT_R16G16B16A16_UINT),
+ fmt(VK_FORMAT_R16G16B16A16_SINT, ISL_FORMAT_R16G16B16A16_SINT),
+ fmt(VK_FORMAT_R16G16B16A16_SFLOAT, ISL_FORMAT_R16G16B16A16_FLOAT),
+ fmt(VK_FORMAT_R32_UINT, ISL_FORMAT_R32_UINT,),
+ fmt(VK_FORMAT_R32_SINT, ISL_FORMAT_R32_SINT,),
+ fmt(VK_FORMAT_R32_SFLOAT, ISL_FORMAT_R32_FLOAT,),
+ fmt(VK_FORMAT_R32G32_UINT, ISL_FORMAT_R32G32_UINT,),
+ fmt(VK_FORMAT_R32G32_SINT, ISL_FORMAT_R32G32_SINT,),
+ fmt(VK_FORMAT_R32G32_SFLOAT, ISL_FORMAT_R32G32_FLOAT,),
+ fmt(VK_FORMAT_R32G32B32_UINT, ISL_FORMAT_R32G32B32_UINT,),
+ fmt(VK_FORMAT_R32G32B32_SINT, ISL_FORMAT_R32G32B32_SINT,),
+ fmt(VK_FORMAT_R32G32B32_SFLOAT, ISL_FORMAT_R32G32B32_FLOAT,),
+ fmt(VK_FORMAT_R32G32B32A32_UINT, ISL_FORMAT_R32G32B32A32_UINT,),
+ fmt(VK_FORMAT_R32G32B32A32_SINT, ISL_FORMAT_R32G32B32A32_SINT,),
+ fmt(VK_FORMAT_R32G32B32A32_SFLOAT, ISL_FORMAT_R32G32B32A32_FLOAT,),
+ fmt(VK_FORMAT_R64_UINT, ISL_FORMAT_R64_PASSTHRU),
+ fmt(VK_FORMAT_R64_SINT, ISL_FORMAT_R64_PASSTHRU),
+ fmt(VK_FORMAT_R64_SFLOAT, ISL_FORMAT_R64_FLOAT),
+ fmt(VK_FORMAT_R64G64_UINT, ISL_FORMAT_R64G64_PASSTHRU),
+ fmt(VK_FORMAT_R64G64_SINT, ISL_FORMAT_R64G64_PASSTHRU),
+ fmt(VK_FORMAT_R64G64_SFLOAT, ISL_FORMAT_R64G64_FLOAT),
+ fmt(VK_FORMAT_R64G64B64_UINT, ISL_FORMAT_R64G64B64_PASSTHRU),
+ fmt(VK_FORMAT_R64G64B64_SINT, ISL_FORMAT_R64G64B64_PASSTHRU),
+ fmt(VK_FORMAT_R64G64B64_SFLOAT, ISL_FORMAT_R64G64B64_FLOAT),
+ fmt(VK_FORMAT_R64G64B64A64_UINT, ISL_FORMAT_R64G64B64A64_PASSTHRU),
+ fmt(VK_FORMAT_R64G64B64A64_SINT, ISL_FORMAT_R64G64B64A64_PASSTHRU),
+ fmt(VK_FORMAT_R64G64B64A64_SFLOAT, ISL_FORMAT_R64G64B64A64_FLOAT),
+ fmt(VK_FORMAT_B10G11R11_UFLOAT_PACK32, ISL_FORMAT_R11G11B10_FLOAT),
+ fmt(VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, ISL_FORMAT_R9G9B9E5_SHAREDEXP),
+
+ fmt(VK_FORMAT_D16_UNORM, ISL_FORMAT_R16_UNORM, .depth_format = D16_UNORM),
+ fmt(VK_FORMAT_X8_D24_UNORM_PACK32, ISL_FORMAT_R24_UNORM_X8_TYPELESS, .depth_format = D24_UNORM_X8_UINT),
+ fmt(VK_FORMAT_D32_SFLOAT, ISL_FORMAT_R32_FLOAT, .depth_format = D32_FLOAT),
+ fmt(VK_FORMAT_S8_UINT, ISL_FORMAT_R8_UINT, .has_stencil = true),
+ fmt(VK_FORMAT_D16_UNORM_S8_UINT, ISL_FORMAT_R16_UNORM, .depth_format = D16_UNORM, .has_stencil = true),
+ fmt(VK_FORMAT_D24_UNORM_S8_UINT, ISL_FORMAT_R24_UNORM_X8_TYPELESS, .depth_format = D24_UNORM_X8_UINT, .has_stencil = true),
+ fmt(VK_FORMAT_D32_SFLOAT_S8_UINT, ISL_FORMAT_R32_FLOAT, .depth_format = D32_FLOAT, .has_stencil = true),
fmt(VK_FORMAT_BC1_RGB_UNORM_BLOCK, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_BC1_RGB_SRGB_BLOCK, ISL_FORMAT_UNSUPPORTED),
@@ -216,13 +216,13 @@ static const struct anv_format anv_formats[] = {
fmt(VK_FORMAT_B8G8R8_UINT, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B8G8R8_SINT, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B8G8R8_SRGB, ISL_FORMAT_UNSUPPORTED),
- fmt(VK_FORMAT_B8G8R8A8_UNORM, ISL_FORMAT_B8G8R8A8_UNORM, .num_channels = 4),
+ fmt(VK_FORMAT_B8G8R8A8_UNORM, ISL_FORMAT_B8G8R8A8_UNORM),
fmt(VK_FORMAT_B8G8R8A8_SNORM, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B8G8R8A8_USCALED, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B8G8R8A8_SSCALED, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B8G8R8A8_UINT, ISL_FORMAT_UNSUPPORTED),
fmt(VK_FORMAT_B8G8R8A8_SINT, ISL_FORMAT_UNSUPPORTED),
- fmt(VK_FORMAT_B8G8R8A8_SRGB, ISL_FORMAT_B8G8R8A8_UNORM_SRGB, .num_channels = 4),
+ fmt(VK_FORMAT_B8G8R8A8_SRGB, ISL_FORMAT_B8G8R8A8_UNORM_SRGB),
};
#undef fmt
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index 95096748a9d..44d537ac5a8 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -1401,7 +1401,6 @@ struct anv_format {
const char *name;
enum isl_format surface_format; /**< RENDER_SURFACE_STATE.SurfaceFormat */
const struct isl_format_layout *isl_layout;
- uint8_t num_channels;
uint16_t depth_format; /**< 3DSTATE_DEPTH_BUFFER.SurfaceFormat */
bool has_stencil;
};