freedreno/a6xx: use single format enum
authorJonathan Marek <jonathan@marek.ca>
Wed, 12 Feb 2020 19:16:16 +0000 (14:16 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 Feb 2020 21:59:59 +0000 (21:59 +0000)
Loses some information about which formats can be used in which cases, but
we encode that information in the format table anyway.

Important notes:
* RB6_R10G10B10A2_UNORM becomes FMT6_R10G10B10A2_UNORM_DEST
* TFMT6_8_8_8_UNORM becomes FMT6_8_8_8_X8_UNORM (not FMT6_8_8_8_UNORM)

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3798>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3798>

15 files changed:
src/freedreno/registers/a6xx.xml
src/freedreno/vulkan/tu_blit.c
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_formats.c
src/freedreno/vulkan/tu_image.c
src/freedreno/vulkan/tu_private.h
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
src/gallium/drivers/freedreno/a6xx/fd6_draw.c
src/gallium/drivers/freedreno/a6xx/fd6_emit.c
src/gallium/drivers/freedreno/a6xx/fd6_format.c
src/gallium/drivers/freedreno/a6xx/fd6_format.h
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c
src/gallium/drivers/freedreno/a6xx/fd6_image.c
src/gallium/drivers/freedreno/a6xx/fd6_resource.c
src/gallium/drivers/freedreno/a6xx/fd6_screen.c

index 2cfa49f0a3e6f38f46365f56881effbdc7fc9da6..2c4266e90b4f72710c21bb37b603d65d26a2c1dc 100644 (file)
@@ -6,57 +6,6 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 <import file="adreno/adreno_common.xml"/>
 <import file="adreno/adreno_pm4.xml"/>
 
-<!-- these might be same as a5xx -->
-<enum name="a6xx_color_fmt">
-       <value value="0x02" name="RB6_A8_UNORM"/>
-       <value value="0x03" name="RB6_R8_UNORM"/>
-       <value value="0x04" name="RB6_R8_SNORM"/>
-       <value value="0x05" name="RB6_R8_UINT"/>
-       <value value="0x06" name="RB6_R8_SINT"/>
-       <value value="0x08" name="RB6_R4G4B4A4_UNORM"/>
-       <value value="0x0a" name="RB6_R5G5B5A1_UNORM"/>
-       <value value="0x0e" name="RB6_R5G6B5_UNORM"/>
-       <value value="0x0f" name="RB6_R8G8_UNORM"/>
-       <value value="0x10" name="RB6_R8G8_SNORM"/>
-       <value value="0x11" name="RB6_R8G8_UINT"/>
-       <value value="0x12" name="RB6_R8G8_SINT"/>
-       <value value="0x15" name="RB6_R16_UNORM"/>
-       <value value="0x16" name="RB6_R16_SNORM"/>
-       <value value="0x17" name="RB6_R16_FLOAT"/>
-       <value value="0x18" name="RB6_R16_UINT"/>
-       <value value="0x19" name="RB6_R16_SINT"/>
-       <value value="0x30" name="RB6_R8G8B8A8_UNORM"/>
-       <value value="0x31" name="RB6_R8G8B8X8_UNORM"/> <!-- 32 bpp format, samples 1 for alpha -->
-       <value value="0x32" name="RB6_R8G8B8A8_SNORM"/>
-       <value value="0x33" name="RB6_R8G8B8A8_UINT"/>
-       <value value="0x34" name="RB6_R8G8B8A8_SINT"/>
-       <value value="0x36" name="RB6_R10G10B10A2_FLOAT16"/>  <!-- float16 for 2d blit? -->
-       <value value="0x37" name="RB6_R10G10B10A2_UNORM"/>  <!-- GL_RGB10_A2 -->
-       <value value="0x3a" name="RB6_R10G10B10A2_UINT"/>   <!-- GL_RGB10_A2UI -->
-       <value value="0x42" name="RB6_R11G11B10_FLOAT"/>    <!-- GL_R11F_G11F_B10F -->
-       <value value="0x43" name="RB6_R16G16_UNORM"/>
-       <value value="0x44" name="RB6_R16G16_SNORM"/>
-       <value value="0x45" name="RB6_R16G16_FLOAT"/>
-       <value value="0x46" name="RB6_R16G16_UINT"/>
-       <value value="0x47" name="RB6_R16G16_SINT"/>
-       <value value="0x4a" name="RB6_R32_FLOAT"/>
-       <value value="0x4b" name="RB6_R32_UINT"/>
-       <value value="0x4c" name="RB6_R32_SINT"/>
-       <value value="0x60" name="RB6_R16G16B16A16_UNORM"/>
-       <value value="0x61" name="RB6_R16G16B16A16_SNORM"/>
-       <value value="0x62" name="RB6_R16G16B16A16_FLOAT"/>
-       <value value="0x63" name="RB6_R16G16B16A16_UINT"/>
-       <value value="0x64" name="RB6_R16G16B16A16_SINT"/>
-       <value value="0x67" name="RB6_R32G32_FLOAT"/>
-       <value value="0x68" name="RB6_R32G32_UINT"/>
-       <value value="0x69" name="RB6_R32G32_SINT"/>
-       <value value="0x82" name="RB6_R32G32B32A32_FLOAT"/>
-       <value value="0x83" name="RB6_R32G32B32A32_UINT"/>
-       <value value="0x84" name="RB6_R32G32B32A32_SINT"/>
-       <value value="0x91" name="RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8"/>
-       <value value="0xa0" name="RB6_Z24_UNORM_S8_UINT"/>
-</enum>
-
 <!-- these might be same as a5xx -->
 <enum name="a6xx_tile_mode">
        <value name="TILE6_LINEAR" value="0"/>
@@ -64,176 +13,134 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
        <value name="TILE6_3" value="3"/>
 </enum>
 
-<!-- these might be same as a5xx -->
-<enum name="a6xx_vtx_fmt" prefix="chipset">
-       <value value="0x03" name="VFMT6_8_UNORM"/>
-       <value value="0x04" name="VFMT6_8_SNORM"/>
-       <value value="0x05" name="VFMT6_8_UINT"/>
-       <value value="0x06" name="VFMT6_8_SINT"/>
-
-       <value value="0x0f" name="VFMT6_8_8_UNORM"/>
-       <value value="0x10" name="VFMT6_8_8_SNORM"/>
-       <value value="0x11" name="VFMT6_8_8_UINT"/>
-       <value value="0x12" name="VFMT6_8_8_SINT"/>
-
-       <value value="0x15" name="VFMT6_16_UNORM"/>
-       <value value="0x16" name="VFMT6_16_SNORM"/>
-       <value value="0x17" name="VFMT6_16_FLOAT"/>
-       <value value="0x18" name="VFMT6_16_UINT"/>
-       <value value="0x19" name="VFMT6_16_SINT"/>
-
-       <value value="0x21" name="VFMT6_8_8_8_UNORM"/>
-       <value value="0x22" name="VFMT6_8_8_8_SNORM"/>
-       <value value="0x23" name="VFMT6_8_8_8_UINT"/>
-       <value value="0x24" name="VFMT6_8_8_8_SINT"/>
-
-       <value value="0x30" name="VFMT6_8_8_8_8_UNORM"/>
-       <value value="0x32" name="VFMT6_8_8_8_8_SNORM"/>
-       <value value="0x33" name="VFMT6_8_8_8_8_UINT"/>
-       <value value="0x34" name="VFMT6_8_8_8_8_SINT"/>
-
-       <value value="0x36" name="VFMT6_10_10_10_2_UNORM"/>
-       <value value="0x39" name="VFMT6_10_10_10_2_SNORM"/>
-       <value value="0x3a" name="VFMT6_10_10_10_2_UINT"/>
-       <value value="0x3b" name="VFMT6_10_10_10_2_SINT"/>
-
-       <value value="0x42" name="VFMT6_11_11_10_FLOAT"/>
-
-       <value value="0x43" name="VFMT6_16_16_UNORM"/>
-       <value value="0x44" name="VFMT6_16_16_SNORM"/>
-       <value value="0x45" name="VFMT6_16_16_FLOAT"/>
-       <value value="0x46" name="VFMT6_16_16_UINT"/>
-       <value value="0x47" name="VFMT6_16_16_SINT"/>
-
-       <value value="0x48" name="VFMT6_32_UNORM"/>
-       <value value="0x49" name="VFMT6_32_SNORM"/>
-       <value value="0x4a" name="VFMT6_32_FLOAT"/>
-       <value value="0x4b" name="VFMT6_32_UINT"/>
-       <value value="0x4c" name="VFMT6_32_SINT"/>
-       <value value="0x4d" name="VFMT6_32_FIXED"/>
-
-       <value value="0x58" name="VFMT6_16_16_16_UNORM"/>
-       <value value="0x59" name="VFMT6_16_16_16_SNORM"/>
-       <value value="0x5a" name="VFMT6_16_16_16_FLOAT"/>
-       <value value="0x5b" name="VFMT6_16_16_16_UINT"/>
-       <value value="0x5c" name="VFMT6_16_16_16_SINT"/>
-
-       <value value="0x60" name="VFMT6_16_16_16_16_UNORM"/>
-       <value value="0x61" name="VFMT6_16_16_16_16_SNORM"/>
-       <value value="0x62" name="VFMT6_16_16_16_16_FLOAT"/>
-       <value value="0x63" name="VFMT6_16_16_16_16_UINT"/>
-       <value value="0x64" name="VFMT6_16_16_16_16_SINT"/>
-
-       <value value="0x65" name="VFMT6_32_32_UNORM"/>
-       <value value="0x66" name="VFMT6_32_32_SNORM"/>
-       <value value="0x67" name="VFMT6_32_32_FLOAT"/>
-       <value value="0x68" name="VFMT6_32_32_UINT"/>
-       <value value="0x69" name="VFMT6_32_32_SINT"/>
-       <value value="0x6a" name="VFMT6_32_32_FIXED"/>
-
-       <value value="0x70" name="VFMT6_32_32_32_UNORM"/>
-       <value value="0x71" name="VFMT6_32_32_32_SNORM"/>
-       <value value="0x72" name="VFMT6_32_32_32_UINT"/>
-       <value value="0x73" name="VFMT6_32_32_32_SINT"/>
-       <value value="0x74" name="VFMT6_32_32_32_FLOAT"/>
-       <value value="0x75" name="VFMT6_32_32_32_FIXED"/>
-
-       <value value="0x80" name="VFMT6_32_32_32_32_UNORM"/>
-       <value value="0x81" name="VFMT6_32_32_32_32_SNORM"/>
-       <value value="0x82" name="VFMT6_32_32_32_32_FLOAT"/>
-       <value value="0x83" name="VFMT6_32_32_32_32_UINT"/>
-       <value value="0x84" name="VFMT6_32_32_32_32_SINT"/>
-       <value value="0x85" name="VFMT6_32_32_32_32_FIXED"/>
-</enum>
-
-<enum name="a6xx_tex_fmt">
-       <value value="0x02" name="TFMT6_A8_UNORM"/>
-       <value value="0x03" name="TFMT6_8_UNORM"/>
-       <value value="0x04" name="TFMT6_8_SNORM"/>
-       <value value="0x05" name="TFMT6_8_UINT"/>
-       <value value="0x06" name="TFMT6_8_SINT"/>
-       <value value="0x08" name="TFMT6_4_4_4_4_UNORM"/>
-       <value value="0x0a" name="TFMT6_5_5_5_1_UNORM"/>
-       <value value="0x0e" name="TFMT6_5_6_5_UNORM"/>
-       <value value="0x0f" name="TFMT6_8_8_UNORM"/>
-       <value value="0x10" name="TFMT6_8_8_SNORM"/>
-       <value value="0x11" name="TFMT6_8_8_UINT"/>
-       <value value="0x12" name="TFMT6_8_8_SINT"/>
-       <value value="0x13" name="TFMT6_L8_A8_UNORM"/>
-       <value value="0x15" name="TFMT6_16_UNORM"/>
-       <value value="0x16" name="TFMT6_16_SNORM"/>
-       <value value="0x17" name="TFMT6_16_FLOAT"/>
-       <value value="0x18" name="TFMT6_16_UINT"/>
-       <value value="0x19" name="TFMT6_16_SINT"/>
-       <value value="0x30" name="TFMT6_8_8_8_8_UNORM"/>
-       <value value="0x31" name="TFMT6_8_8_8_UNORM"/>
-       <value value="0x32" name="TFMT6_8_8_8_8_SNORM"/>
-       <value value="0x33" name="TFMT6_8_8_8_8_UINT"/>
-       <value value="0x34" name="TFMT6_8_8_8_8_SINT"/>
-       <value value="0x35" name="TFMT6_9_9_9_E5_FLOAT"/>
-       <value value="0x36" name="TFMT6_10_10_10_2_UNORM"/>
-       <value value="0x3a" name="TFMT6_10_10_10_2_UINT"/>
-       <value value="0x42" name="TFMT6_11_11_10_FLOAT"/>
-       <value value="0x43" name="TFMT6_16_16_UNORM"/>
-       <value value="0x44" name="TFMT6_16_16_SNORM"/>
-       <value value="0x45" name="TFMT6_16_16_FLOAT"/>
-       <value value="0x46" name="TFMT6_16_16_UINT"/>
-       <value value="0x47" name="TFMT6_16_16_SINT"/>
-       <value value="0x4a" name="TFMT6_32_FLOAT"/>
-       <value value="0x4b" name="TFMT6_32_UINT"/>
-       <value value="0x4c" name="TFMT6_32_SINT"/>
-       <value value="0x60" name="TFMT6_16_16_16_16_UNORM"/>
-       <value value="0x61" name="TFMT6_16_16_16_16_SNORM"/>
-       <value value="0x62" name="TFMT6_16_16_16_16_FLOAT"/>
-       <value value="0x63" name="TFMT6_16_16_16_16_UINT"/>
-       <value value="0x64" name="TFMT6_16_16_16_16_SINT"/>
-       <value value="0x67" name="TFMT6_32_32_FLOAT"/>
-       <value value="0x68" name="TFMT6_32_32_UINT"/>
-       <value value="0x69" name="TFMT6_32_32_SINT"/>
-       <value value="0x72" name="TFMT6_32_32_32_UINT"/>
-       <value value="0x73" name="TFMT6_32_32_32_SINT"/>
-       <value value="0x74" name="TFMT6_32_32_32_FLOAT"/>
-       <value value="0x82" name="TFMT6_32_32_32_32_FLOAT"/>
-       <value value="0x83" name="TFMT6_32_32_32_32_UINT"/>
-       <value value="0x84" name="TFMT6_32_32_32_32_SINT"/>
-       <value value="0x91" name="TFMT6_Z24_UNORM_S8_UINT"/>
-       <value value="0xa0" name="TFMT6_X8Z24_UNORM"/>
-
-       <value value="0xab" name="TFMT6_ETC2_RG11_UNORM"/>
-       <value value="0xac" name="TFMT6_ETC2_RG11_SNORM"/>
-       <value value="0xad" name="TFMT6_ETC2_R11_UNORM"/>
-       <value value="0xae" name="TFMT6_ETC2_R11_SNORM"/>
-       <value value="0xaf" name="TFMT6_ETC1"/>
-       <value value="0xb0" name="TFMT6_ETC2_RGB8"/>
-       <value value="0xb1" name="TFMT6_ETC2_RGBA8"/>
-       <value value="0xb2" name="TFMT6_ETC2_RGB8A1"/>
-       <value value="0xb3" name="TFMT6_DXT1"/>
-       <value value="0xb4" name="TFMT6_DXT3"/>
-       <value value="0xb5" name="TFMT6_DXT5"/>
-       <value value="0xb7" name="TFMT6_RGTC1_UNORM"/>
-       <value value="0xb8" name="TFMT6_RGTC1_SNORM"/>
-       <value value="0xbb" name="TFMT6_RGTC2_UNORM"/>
-       <value value="0xbc" name="TFMT6_RGTC2_SNORM"/>
-       <value value="0xbe" name="TFMT6_BPTC_UFLOAT"/>
-       <value value="0xbf" name="TFMT6_BPTC_FLOAT"/>
-       <value value="0xc0" name="TFMT6_BPTC"/>
-       <value value="0xc1" name="TFMT6_ASTC_4x4"/>
-       <value value="0xc2" name="TFMT6_ASTC_5x4"/>
-       <value value="0xc3" name="TFMT6_ASTC_5x5"/>
-       <value value="0xc4" name="TFMT6_ASTC_6x5"/>
-       <value value="0xc5" name="TFMT6_ASTC_6x6"/>
-       <value value="0xc6" name="TFMT6_ASTC_8x5"/>
-       <value value="0xc7" name="TFMT6_ASTC_8x6"/>
-       <value value="0xc8" name="TFMT6_ASTC_8x8"/>
-       <value value="0xc9" name="TFMT6_ASTC_10x5"/>
-       <value value="0xca" name="TFMT6_ASTC_10x6"/>
-       <value value="0xcb" name="TFMT6_ASTC_10x8"/>
-       <value value="0xcc" name="TFMT6_ASTC_10x10"/>
-       <value value="0xcd" name="TFMT6_ASTC_12x10"/>
-       <value value="0xce" name="TFMT6_ASTC_12x12"/>
+<enum name="a6xx_format">
+       <value value="0x02" name="FMT6_A8_UNORM"/>
+       <value value="0x03" name="FMT6_8_UNORM"/>
+       <value value="0x04" name="FMT6_8_SNORM"/>
+       <value value="0x05" name="FMT6_8_UINT"/>
+       <value value="0x06" name="FMT6_8_SINT"/>
+
+       <value value="0x08" name="FMT6_4_4_4_4_UNORM"/>
+       <value value="0x0a" name="FMT6_5_5_5_1_UNORM"/>
+       <value value="0x0e" name="FMT6_5_6_5_UNORM"/>
+
+       <value value="0x0f" name="FMT6_8_8_UNORM"/>
+       <value value="0x10" name="FMT6_8_8_SNORM"/>
+       <value value="0x11" name="FMT6_8_8_UINT"/>
+       <value value="0x12" name="FMT6_8_8_SINT"/>
+       <value value="0x13" name="FMT6_L8_A8_UNORM"/>
+
+       <value value="0x15" name="FMT6_16_UNORM"/>
+       <value value="0x16" name="FMT6_16_SNORM"/>
+       <value value="0x17" name="FMT6_16_FLOAT"/>
+       <value value="0x18" name="FMT6_16_UINT"/>
+       <value value="0x19" name="FMT6_16_SINT"/>
+
+       <value value="0x21" name="FMT6_8_8_8_UNORM"/>
+       <value value="0x22" name="FMT6_8_8_8_SNORM"/>
+       <value value="0x23" name="FMT6_8_8_8_UINT"/>
+       <value value="0x24" name="FMT6_8_8_8_SINT"/>
+
+       <value value="0x30" name="FMT6_8_8_8_8_UNORM"/>
+       <value value="0x31" name="FMT6_8_8_8_X8_UNORM"/> <!-- samples 1 for alpha -->
+       <value value="0x32" name="FMT6_8_8_8_8_SNORM"/>
+       <value value="0x33" name="FMT6_8_8_8_8_UINT"/>
+       <value value="0x34" name="FMT6_8_8_8_8_SINT"/>
+
+       <value value="0x35" name="FMT6_9_9_9_E5_FLOAT"/>
+
+       <value value="0x36" name="FMT6_10_10_10_2_UNORM"/>
+       <value value="0x37" name="FMT6_10_10_10_2_UNORM_DEST"/>
+       <value value="0x39" name="FMT6_10_10_10_2_SNORM"/>
+       <value value="0x3a" name="FMT6_10_10_10_2_UINT"/>
+       <value value="0x3b" name="FMT6_10_10_10_2_SINT"/>
+
+       <value value="0x42" name="FMT6_11_11_10_FLOAT"/>
+
+       <value value="0x43" name="FMT6_16_16_UNORM"/>
+       <value value="0x44" name="FMT6_16_16_SNORM"/>
+       <value value="0x45" name="FMT6_16_16_FLOAT"/>
+       <value value="0x46" name="FMT6_16_16_UINT"/>
+       <value value="0x47" name="FMT6_16_16_SINT"/>
+
+       <value value="0x48" name="FMT6_32_UNORM"/>
+       <value value="0x49" name="FMT6_32_SNORM"/>
+       <value value="0x4a" name="FMT6_32_FLOAT"/>
+       <value value="0x4b" name="FMT6_32_UINT"/>
+       <value value="0x4c" name="FMT6_32_SINT"/>
+       <value value="0x4d" name="FMT6_32_FIXED"/>
+
+       <value value="0x58" name="FMT6_16_16_16_UNORM"/>
+       <value value="0x59" name="FMT6_16_16_16_SNORM"/>
+       <value value="0x5a" name="FMT6_16_16_16_FLOAT"/>
+       <value value="0x5b" name="FMT6_16_16_16_UINT"/>
+       <value value="0x5c" name="FMT6_16_16_16_SINT"/>
+
+       <value value="0x60" name="FMT6_16_16_16_16_UNORM"/>
+       <value value="0x61" name="FMT6_16_16_16_16_SNORM"/>
+       <value value="0x62" name="FMT6_16_16_16_16_FLOAT"/>
+       <value value="0x63" name="FMT6_16_16_16_16_UINT"/>
+       <value value="0x64" name="FMT6_16_16_16_16_SINT"/>
+
+       <value value="0x65" name="FMT6_32_32_UNORM"/>
+       <value value="0x66" name="FMT6_32_32_SNORM"/>
+       <value value="0x67" name="FMT6_32_32_FLOAT"/>
+       <value value="0x68" name="FMT6_32_32_UINT"/>
+       <value value="0x69" name="FMT6_32_32_SINT"/>
+       <value value="0x6a" name="FMT6_32_32_FIXED"/>
+
+       <value value="0x70" name="FMT6_32_32_32_UNORM"/>
+       <value value="0x71" name="FMT6_32_32_32_SNORM"/>
+       <value value="0x72" name="FMT6_32_32_32_UINT"/>
+       <value value="0x73" name="FMT6_32_32_32_SINT"/>
+       <value value="0x74" name="FMT6_32_32_32_FLOAT"/>
+       <value value="0x75" name="FMT6_32_32_32_FIXED"/>
+
+       <value value="0x80" name="FMT6_32_32_32_32_UNORM"/>
+       <value value="0x81" name="FMT6_32_32_32_32_SNORM"/>
+       <value value="0x82" name="FMT6_32_32_32_32_FLOAT"/>
+       <value value="0x83" name="FMT6_32_32_32_32_UINT"/>
+       <value value="0x84" name="FMT6_32_32_32_32_SINT"/>
+       <value value="0x85" name="FMT6_32_32_32_32_FIXED"/>
+
+       <value value="0x91" name="FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8"/>
+       <value value="0xa0" name="FMT6_Z24_UNORM_S8_UINT"/>
+
+       <value value="0xab" name="FMT6_ETC2_RG11_UNORM"/>
+       <value value="0xac" name="FMT6_ETC2_RG11_SNORM"/>
+       <value value="0xad" name="FMT6_ETC2_R11_UNORM"/>
+       <value value="0xae" name="FMT6_ETC2_R11_SNORM"/>
+       <value value="0xaf" name="FMT6_ETC1"/>
+       <value value="0xb0" name="FMT6_ETC2_RGB8"/>
+       <value value="0xb1" name="FMT6_ETC2_RGBA8"/>
+       <value value="0xb2" name="FMT6_ETC2_RGB8A1"/>
+       <value value="0xb3" name="FMT6_DXT1"/>
+       <value value="0xb4" name="FMT6_DXT3"/>
+       <value value="0xb5" name="FMT6_DXT5"/>
+       <value value="0xb7" name="FMT6_RGTC1_UNORM"/>
+       <value value="0xb8" name="FMT6_RGTC1_SNORM"/>
+       <value value="0xbb" name="FMT6_RGTC2_UNORM"/>
+       <value value="0xbc" name="FMT6_RGTC2_SNORM"/>
+       <value value="0xbe" name="FMT6_BPTC_UFLOAT"/>
+       <value value="0xbf" name="FMT6_BPTC_FLOAT"/>
+       <value value="0xc0" name="FMT6_BPTC"/>
+       <value value="0xc1" name="FMT6_ASTC_4x4"/>
+       <value value="0xc2" name="FMT6_ASTC_5x4"/>
+       <value value="0xc3" name="FMT6_ASTC_5x5"/>
+       <value value="0xc4" name="FMT6_ASTC_6x5"/>
+       <value value="0xc5" name="FMT6_ASTC_6x6"/>
+       <value value="0xc6" name="FMT6_ASTC_8x5"/>
+       <value value="0xc7" name="FMT6_ASTC_8x6"/>
+       <value value="0xc8" name="FMT6_ASTC_8x8"/>
+       <value value="0xc9" name="FMT6_ASTC_10x5"/>
+       <value value="0xca" name="FMT6_ASTC_10x6"/>
+       <value value="0xcb" name="FMT6_ASTC_10x8"/>
+       <value value="0xcc" name="FMT6_ASTC_10x10"/>
+       <value value="0xcd" name="FMT6_ASTC_12x10"/>
+       <value value="0xce" name="FMT6_ASTC_12x12"/>
 
        <!-- same as X8Z24_UNORM but for sampling stencil (integer, 2nd channel) -->
-       <value value="0xea" name="TFMT6_S8Z24_UINT"/>
+       <value value="0xea" name="FMT6_S8Z24_UINT"/>
 </enum>
 
 <enum name="a6xx_tex_fetchsize">
@@ -1987,7 +1894,7 @@ to upconvert to 32b float internally?
        </reg32>
        <reg32 offset="0x8101" name="GRAS_UNKNOWN_8101"/>
        <reg32 offset="0x8102" name="GRAS_2D_BLIT_INFO">
-               <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_color_fmt"/>
+               <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_format"/>
        </reg32>
        <reg32 offset="0x8103" name="GRAS_LRZ_BUFFER_BASE_LO"/>
        <reg32 offset="0x8104" name="GRAS_LRZ_BUFFER_BASE_HI"/>
@@ -2018,7 +1925,7 @@ to upconvert to 32b float internally?
        <bitset name="a6xx_2d_blit_cntl" inline="yes">
                <bitfield name="ROTATE" low="0" high="2" type="a6xx_rotation"/>
                <bitfield name="SOLID_COLOR" pos="7" type="boolean"/>
-               <bitfield name="COLOR_FORMAT" low="8" high="15" type="a6xx_color_fmt"/>
+               <bitfield name="COLOR_FORMAT" low="8" high="15" type="a6xx_format"/>
                <bitfield name="SCISSOR" pos="16" type="boolean"/>
 
                <bitfield name="UNK" low="17" high="18" type="uint"/>
@@ -2192,7 +2099,7 @@ to upconvert to 32b float internally?
                        <bitfield name="ALPHA_DEST_FACTOR" low="24" high="28" type="adreno_rb_blend_factor"/>
                </reg32>
                <reg32 offset="0x2" name="BUF_INFO">
-                       <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_color_fmt"/>
+                       <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_format"/>
                        <bitfield name="COLOR_TILE_MODE" low="8" high="9" type="a6xx_tile_mode"/>
                        <bitfield name="COLOR_SWAP" low="13" high="14" type="a3xx_color_swap"/>
                </reg32>
@@ -2330,7 +2237,7 @@ to upconvert to 32b float internally?
                <bitfield name="TILE_MODE" low="0" high="1" type="a6xx_tile_mode"/>
                <bitfield name="FLAGS" pos="2" type="boolean"/>
                <bitfield name="SAMPLES" low="3" high="4" type="a3xx_msaa_samples"/>
-               <bitfield name="COLOR_FORMAT" low="7" high="14" type="a6xx_color_fmt"/>
+               <bitfield name="COLOR_FORMAT" low="7" high="14" type="a6xx_format"/>
                <bitfield name="COLOR_SWAP" low="5" high="6" type="a3xx_color_swap"/>
        </reg32>
        <reg64 offset="0x88d8" name="RB_BLIT_DST" type="waddress"/>
@@ -2395,7 +2302,7 @@ to upconvert to 32b float internally?
        <reg32 offset="0x8c01" name="RB_UNKNOWN_8C01"/>
 
        <bitset name="a6xx_2d_surf_info" inline="yes">
-               <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_color_fmt"/>
+               <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_format"/>
                <bitfield name="TILE_MODE" low="8" high="9" type="a6xx_tile_mode"/>
                <bitfield name="COLOR_SWAP" low="10" high="11" type="a3xx_color_swap"/>
                <!-- b12 seems to be set when UBWC "FLAGS" buffer enabled -->
@@ -2731,7 +2638,7 @@ to upconvert to 32b float internally?
                        <!-- IDX appears to index into VFD_FETCH[] -->
                        <bitfield name="IDX" low="0" high="4" type="uint"/>
                        <bitfield name="INSTANCED" pos="17" type="boolean"/>
-                       <bitfield name="FORMAT" low="20" high="27" type="a6xx_vtx_fmt"/>
+                       <bitfield name="FORMAT" low="20" high="27" type="a6xx_format"/>
                        <bitfield name="SWAP" low="28" high="29" type="a3xx_color_swap"/>
                        <bitfield name="UNK30" pos="30" type="boolean"/>
                        <bitfield name="FLOAT" pos="31" type="boolean"/>
@@ -2959,7 +2866,7 @@ to upconvert to 32b float internally?
 
        <array offset="0xa996" name="SP_FS_MRT" stride="1" length="8">
                <reg32 offset="0" name="REG">
-                       <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_color_fmt"/>
+                       <bitfield name="COLOR_FORMAT" low="0" high="7" type="a6xx_format"/>
                        <bitfield name="COLOR_SINT" pos="8" type="boolean"/>
                        <bitfield name="COLOR_UINT" pos="9" type="boolean"/>
                </reg32>
@@ -3054,7 +2961,7 @@ to upconvert to 32b float internally?
                <bitfield name="UINT" pos="2" type="boolean"/>
                <!-- looks like HW only cares about the base type of this format,
                     which matches the ifmt? -->
-               <bitfield name="COLOR_FORMAT" low="3" high="10" type="a6xx_color_fmt"/>
+               <bitfield name="COLOR_FORMAT" low="3" high="10" type="a6xx_format"/>
                <!-- set when ifmt is R2D_UNORM8_SRGB -->
                <bitfield name="SRGB" pos="11" type="boolean"/>
                <!-- some sort of channel mask, not sure what it is for -->
@@ -3288,7 +3195,7 @@ to upconvert to 32b float internally?
                <bitfield name="SWIZ_W" low="13" high="15" type="a6xx_tex_swiz"/>
                <bitfield name="MIPLVLS" low="16" high="19" type="uint"/>
                <bitfield name="SAMPLES" low="20" high="21" type="a3xx_msaa_samples"/>
-               <bitfield name="FMT" low="22" high="29" type="a6xx_tex_fmt"/>
+               <bitfield name="FMT" low="22" high="29" type="a6xx_format"/>
                <bitfield name="SWAP" low="30" high="31" type="a3xx_color_swap"/>
        </reg32>
        <reg32 offset="1" name="1">
@@ -3369,7 +3276,7 @@ with a better name.
                used but if they are good chance position is same as TEX_CONST
                 -->
                <bitfield name="TILE_MODE" low="0" high="1" type="a6xx_tile_mode"/>
-               <bitfield name="FMT" low="22" high="29" type="a6xx_tex_fmt"/>
+               <bitfield name="FMT" low="22" high="29" type="a6xx_format"/>
        </reg32>
        <reg32 offset="1" name="1">
                <bitfield name="WIDTH" low="0" high="14" type="uint"/>
index ba0d0cc2fbb4decc898fd5c076d3594ec5f97844..36d071cbd655b1410043869653b737011fe6dace 100644 (file)
@@ -61,12 +61,12 @@ static uint32_t
 blit_image_info(const struct tu_blit_surf *img, bool src, bool stencil_read)
 {
    const struct tu_native_format *fmt = tu6_get_native_format(img->fmt);
-   enum a6xx_color_fmt rb = fmt->rb;
+   enum a6xx_format rb = fmt->rb;
    enum a3xx_color_swap swap = img->tiled ? WZYX : fmt->swap;
-   if (rb == RB6_R10G10B10A2_UNORM && src)
-      rb = RB6_R10G10B10A2_FLOAT16;
-   if (rb == RB6_Z24_UNORM_S8_UINT)
-      rb = RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
+   if (rb == FMT6_10_10_10_2_UNORM_DEST && src)
+      rb = FMT6_10_10_10_2_UNORM;
+   if (rb == FMT6_Z24_UNORM_S8_UINT)
+      rb = FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
 
    if (stencil_read)
       swap = XYZW;
@@ -85,11 +85,11 @@ emit_blit_step(struct tu_cmd_buffer *cmdbuf, const struct tu_blit *blt)
 
    tu_cs_reserve_space(cmdbuf->device, cs, 66);
 
-   enum a6xx_color_fmt fmt = tu6_get_native_format(blt->dst.fmt)->rb;
-   if (fmt == RB6_Z24_UNORM_S8_UINT)
-      fmt = RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
+   enum a6xx_format fmt = tu6_get_native_format(blt->dst.fmt)->rb;
+   if (fmt == FMT6_Z24_UNORM_S8_UINT)
+      fmt = FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
 
-   enum a6xx_2d_ifmt ifmt = tu6_rb_fmt_to_ifmt(fmt);
+   enum a6xx_2d_ifmt ifmt = tu6_fmt_to_ifmt(fmt);
 
    if (vk_format_is_srgb(blt->dst.fmt)) {
       assert(ifmt == R2D_UNORM8);
@@ -99,7 +99,7 @@ emit_blit_step(struct tu_cmd_buffer *cmdbuf, const struct tu_blit *blt)
    uint32_t blit_cntl = A6XX_RB_2D_BLIT_CNTL_ROTATE(blt->rotation) |
                         COND(blt->type == TU_BLIT_CLEAR, A6XX_RB_2D_BLIT_CNTL_SOLID_COLOR) |
                         A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT(fmt) | /* not required? */
-                        COND(fmt == RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8, A6XX_RB_2D_BLIT_CNTL_D24S8) |
+                        COND(fmt == FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8, A6XX_RB_2D_BLIT_CNTL_D24S8) |
                         A6XX_RB_2D_BLIT_CNTL_MASK(0xf) |
                         A6XX_RB_2D_BLIT_CNTL_IFMT(ifmt);
 
@@ -190,8 +190,8 @@ emit_blit_step(struct tu_cmd_buffer *cmdbuf, const struct tu_blit *blt)
    tu_cs_emit_pkt4(cs, REG_A6XX_RB_UNKNOWN_8C01, 1);
    tu_cs_emit(cs, 0);
 
-   if (fmt == RB6_R10G10B10A2_UNORM)
-      fmt = RB6_R16G16B16A16_FLOAT;
+   if (fmt == FMT6_10_10_10_2_UNORM_DEST)
+      fmt = FMT6_16_16_16_16_FLOAT;
 
    tu_cs_emit_pkt4(cs, REG_A6XX_SP_2D_SRC_FORMAT, 1);
    tu_cs_emit(cs, COND(vk_format_is_sint(blt->src.fmt), A6XX_SP_2D_SRC_FORMAT_SINT) |
index 99ad052a1bc1fbef49e25483aa46c9236a7a3e3d..3a0527c1849c7f2dd6e4dbf8667042b25d2c3717 100644 (file)
@@ -2978,7 +2978,7 @@ tu6_emit_ibo(struct tu_cmd_buffer *cmd,
          /* We don't expose robustBufferAccess, so leave the size unlimited. */
          uint32_t sz = MAX_STORAGE_BUFFER_RANGE / 4;
 
-         dst[0] = A6XX_IBO_0_FMT(TFMT6_32_UINT);
+         dst[0] = A6XX_IBO_0_FMT(FMT6_32_UINT);
          dst[1] = A6XX_IBO_1_WIDTH(sz & MASK(15)) |
                   A6XX_IBO_1_HEIGHT(sz >> 15);
          dst[2] = A6XX_IBO_2_UNK4 |
index ba86d3a7289497d66348ef6801779af515988205..f49348ab916bfe95e7342c9859697240be0432ee 100644 (file)
 #undef TU_FORMAT_TABLE_FIRST
 #undef TU_FORMAT_TABLE_LAST
 
-#define VFMT6_x -1
-#define TFMT6_x -1
-#define RB6_x -1
+#define FMT6_x -1
 
 #define TU6_FMT(vkfmt, vtxfmt, texfmt, rbfmt, swapfmt, valid)                \
    [VK_FORMAT_##vkfmt - TU_FORMAT_TABLE_FIRST] = {                           \
-      .vtx = VFMT6_##vtxfmt,                                                 \
-      .tex = TFMT6_##texfmt,                                                 \
-      .rb = RB6_##rbfmt,                                                     \
+      .vtx = FMT6_##vtxfmt,                                                  \
+      .tex = FMT6_##texfmt,                                                  \
+      .rb = (FMT6_##rbfmt == FMT6_10_10_10_2_UNORM) ? FMT6_10_10_10_2_UNORM_DEST : FMT6_##rbfmt, \
       .swap = swapfmt,                                                       \
       .present = valid,                                                      \
    }
  * exist).  It is the macro of choice that decides whether a VkFormat is
  * supported and how.
  */
-#define TU6_VTC(vk, fmt, alias, swap) TU6_FMT(vk, fmt, fmt, alias, swap, true)
-#define TU6_xTC(vk, fmt, alias, swap) TU6_FMT(vk, x, fmt, alias, swap, true)
-#define TU6_VTx(vk, fmt, alias, swap) TU6_FMT(vk, fmt, fmt, x, swap, true)
-#define TU6_Vxx(vk, fmt, alias, swap) TU6_FMT(vk, fmt, x, x, swap, true)
-#define TU6_xTx(vk, fmt, alias, swap) TU6_FMT(vk, x, fmt, x, swap, true)
-#define TU6_xxx(vk, fmt, alias, swap) TU6_FMT(vk, x, x, x, WZYX, false)
+#define TU6_VTC(vk, fmt, swap) TU6_FMT(vk, fmt, fmt, fmt, swap, true)
+#define TU6_xTC(vk, fmt, swap) TU6_FMT(vk, x, fmt, fmt, swap, true)
+#define TU6_VTx(vk, fmt, swap) TU6_FMT(vk, fmt, fmt, x, swap, true)
+#define TU6_Vxx(vk, fmt, swap) TU6_FMT(vk, fmt, x, x, swap, true)
+#define TU6_xTx(vk, fmt, swap) TU6_FMT(vk, x, fmt, x, swap, true)
+#define TU6_xxx(vk, fmt, swap) TU6_FMT(vk, x, x, x, WZYX, false)
 
 #define TU_FORMAT_TABLE_FIRST VK_FORMAT_UNDEFINED
 #define TU_FORMAT_TABLE_LAST VK_FORMAT_ASTC_12x12_SRGB_BLOCK
 TU_FORMAT_TABLE(tu6_format_table0) = {
-   TU6_xxx(UNDEFINED,                  x,                 x,                  x),    /* 0 */
+   TU6_xxx(UNDEFINED,                  x,                 x),    /* 0 */
 
    /* 8-bit packed */
-   TU6_xxx(R4G4_UNORM_PACK8,           4_4_UNORM,         R4G4_UNORM,         WZXY), /* 1 */
+   TU6_xxx(R4G4_UNORM_PACK8,           4_4_UNORM,         WZXY), /* 1 */
 
    /* 16-bit packed */
-   TU6_xTC(R4G4B4A4_UNORM_PACK16,      4_4_4_4_UNORM,     R4G4B4A4_UNORM,     XYZW), /* 2 */
-   TU6_xTC(B4G4R4A4_UNORM_PACK16,      4_4_4_4_UNORM,     R4G4B4A4_UNORM,     ZYXW), /* 3 */
-   TU6_xTC(R5G6B5_UNORM_PACK16,        5_6_5_UNORM,       R5G6B5_UNORM,       WXYZ), /* 4 */
-   TU6_xTC(B5G6R5_UNORM_PACK16,        5_6_5_UNORM,       R5G6B5_UNORM,       WZYX), /* 5 */
-   TU6_xxx(R5G5B5A1_UNORM_PACK16,      1_5_5_5_UNORM,     A1R5G5B5_UNORM,     XYZW), /* 6 */
-   TU6_xxx(B5G5R5A1_UNORM_PACK16,      1_5_5_5_UNORM,     A1R5G5B5_UNORM,     XYZW), /* 7 */
-   TU6_xTC(A1R5G5B5_UNORM_PACK16,      5_5_5_1_UNORM,     R5G5B5A1_UNORM,     WXYZ), /* 8 */
+   TU6_xTC(R4G4B4A4_UNORM_PACK16,      4_4_4_4_UNORM,     XYZW), /* 2 */
+   TU6_xTC(B4G4R4A4_UNORM_PACK16,      4_4_4_4_UNORM,     ZYXW), /* 3 */
+   TU6_xTC(R5G6B5_UNORM_PACK16,        5_6_5_UNORM,       WXYZ), /* 4 */
+   TU6_xTC(B5G6R5_UNORM_PACK16,        5_6_5_UNORM,       WZYX), /* 5 */
+   TU6_xxx(R5G5B5A1_UNORM_PACK16,      1_5_5_5_UNORM,     XYZW), /* 6 */
+   TU6_xxx(B5G5R5A1_UNORM_PACK16,      1_5_5_5_UNORM,     XYZW), /* 7 */
+   TU6_xTC(A1R5G5B5_UNORM_PACK16,      5_5_5_1_UNORM,     WXYZ), /* 8 */
 
    /* 8-bit R */
-   TU6_VTC(R8_UNORM,                   8_UNORM,           R8_UNORM,           WZYX), /* 9 */
-   TU6_VTC(R8_SNORM,                   8_SNORM,           R8_SNORM,           WZYX), /* 10 */
-   TU6_Vxx(R8_USCALED,                 8_UINT,            R8_UINT,            WZYX), /* 11 */
-   TU6_Vxx(R8_SSCALED,                 8_SINT,            R8_SINT,            WZYX), /* 12 */
-   TU6_VTC(R8_UINT,                    8_UINT,            R8_UINT,            WZYX), /* 13 */
-   TU6_VTC(R8_SINT,                    8_SINT,            R8_SINT,            WZYX), /* 14 */
-   TU6_xTC(R8_SRGB,                    8_UNORM,           R8_UNORM,           WZYX), /* 15 */
+   TU6_VTC(R8_UNORM,                   8_UNORM,           WZYX), /* 9 */
+   TU6_VTC(R8_SNORM,                   8_SNORM,           WZYX), /* 10 */
+   TU6_Vxx(R8_USCALED,                 8_UINT,            WZYX), /* 11 */
+   TU6_Vxx(R8_SSCALED,                 8_SINT,            WZYX), /* 12 */
+   TU6_VTC(R8_UINT,                    8_UINT,            WZYX), /* 13 */
+   TU6_VTC(R8_SINT,                    8_SINT,            WZYX), /* 14 */
+   TU6_xTC(R8_SRGB,                    8_UNORM,           WZYX), /* 15 */
 
    /* 16-bit RG */
-   TU6_VTC(R8G8_UNORM,                 8_8_UNORM,         R8G8_UNORM,         WZYX), /* 16 */
-   TU6_VTC(R8G8_SNORM,                 8_8_SNORM,         R8G8_SNORM,         WZYX), /* 17 */
-   TU6_Vxx(R8G8_USCALED,               8_8_UINT,          R8G8_UINT,          WZYX), /* 18 */
-   TU6_Vxx(R8G8_SSCALED,               8_8_SINT,          R8G8_SINT,          WZYX), /* 19 */
-   TU6_VTC(R8G8_UINT,                  8_8_UINT,          R8G8_UINT,          WZYX), /* 20 */
-   TU6_VTC(R8G8_SINT,                  8_8_SINT,          R8G8_SINT,          WZYX), /* 21 */
-   TU6_xTC(R8G8_SRGB,                  8_8_UNORM,         R8G8_UNORM,         WZYX), /* 22 */
+   TU6_VTC(R8G8_UNORM,                 8_8_UNORM,         WZYX), /* 16 */
+   TU6_VTC(R8G8_SNORM,                 8_8_SNORM,         WZYX), /* 17 */
+   TU6_Vxx(R8G8_USCALED,               8_8_UINT,          WZYX), /* 18 */
+   TU6_Vxx(R8G8_SSCALED,               8_8_SINT,          WZYX), /* 19 */
+   TU6_VTC(R8G8_UINT,                  8_8_UINT,          WZYX), /* 20 */
+   TU6_VTC(R8G8_SINT,                  8_8_SINT,          WZYX), /* 21 */
+   TU6_xTC(R8G8_SRGB,                  8_8_UNORM,         WZYX), /* 22 */
 
    /* 24-bit RGB */
-   TU6_Vxx(R8G8B8_UNORM,               8_8_8_UNORM,       R8G8B8_UNORM,       WZYX), /* 23 */
-   TU6_Vxx(R8G8B8_SNORM,               8_8_8_SNORM,       R8G8B8_SNORM,       WZYX), /* 24 */
-   TU6_Vxx(R8G8B8_USCALED,             8_8_8_UINT,        R8G8B8_UINT,        WZYX), /* 25 */
-   TU6_Vxx(R8G8B8_SSCALED,             8_8_8_SINT,        R8G8B8_SINT,        WZYX), /* 26 */
-   TU6_Vxx(R8G8B8_UINT,                8_8_8_UINT,        R8G8B8_UINT,        WZYX), /* 27 */
-   TU6_Vxx(R8G8B8_SINT,                8_8_8_SINT,        R8G8B8_SINT,        WZYX), /* 28 */
-   TU6_xxx(R8G8B8_SRGB,                8_8_8_UNORM,       R8G8B8_UNORM,       WZYX), /* 29 */
+   TU6_Vxx(R8G8B8_UNORM,               8_8_8_UNORM,       WZYX), /* 23 */
+   TU6_Vxx(R8G8B8_SNORM,               8_8_8_SNORM,       WZYX), /* 24 */
+   TU6_Vxx(R8G8B8_USCALED,             8_8_8_UINT,        WZYX), /* 25 */
+   TU6_Vxx(R8G8B8_SSCALED,             8_8_8_SINT,        WZYX), /* 26 */
+   TU6_Vxx(R8G8B8_UINT,                8_8_8_UINT,        WZYX), /* 27 */
+   TU6_Vxx(R8G8B8_SINT,                8_8_8_SINT,        WZYX), /* 28 */
+   TU6_xxx(R8G8B8_SRGB,                8_8_8_UNORM,       WZYX), /* 29 */
 
    /* 24-bit BGR */
-   TU6_xxx(B8G8R8_UNORM,               8_8_8_UNORM,       R8G8B8_UNORM,       WXYZ), /* 30 */
-   TU6_xxx(B8G8R8_SNORM,               8_8_8_SNORM,       R8G8B8_SNORM,       WXYZ), /* 31 */
-   TU6_xxx(B8G8R8_USCALED,             8_8_8_UINT,        R8G8B8_UINT,        WXYZ), /* 32 */
-   TU6_xxx(B8G8R8_SSCALED,             8_8_8_SINT,        R8G8B8_SINT,        WXYZ), /* 33 */
-   TU6_xxx(B8G8R8_UINT,                8_8_8_UINT,        R8G8B8_UINT,        WXYZ), /* 34 */
-   TU6_xxx(B8G8R8_SINT,                8_8_8_SINT,        R8G8B8_SINT,        WXYZ), /* 35 */
-   TU6_xxx(B8G8R8_SRGB,                8_8_8_UNORM,       R8G8B8_UNORM,       WXYZ), /* 36 */
+   TU6_xxx(B8G8R8_UNORM,               8_8_8_UNORM,       WXYZ), /* 30 */
+   TU6_xxx(B8G8R8_SNORM,               8_8_8_SNORM,       WXYZ), /* 31 */
+   TU6_xxx(B8G8R8_USCALED,             8_8_8_UINT,        WXYZ), /* 32 */
+   TU6_xxx(B8G8R8_SSCALED,             8_8_8_SINT,        WXYZ), /* 33 */
+   TU6_xxx(B8G8R8_UINT,                8_8_8_UINT,        WXYZ), /* 34 */
+   TU6_xxx(B8G8R8_SINT,                8_8_8_SINT,        WXYZ), /* 35 */
+   TU6_xxx(B8G8R8_SRGB,                8_8_8_UNORM,       WXYZ), /* 36 */
 
    /* 32-bit RGBA */
-   TU6_VTC(R8G8B8A8_UNORM,             8_8_8_8_UNORM,     R8G8B8A8_UNORM,     WZYX), /* 37 */
-   TU6_VTC(R8G8B8A8_SNORM,             8_8_8_8_SNORM,     R8G8B8A8_SNORM,     WZYX), /* 38 */
-   TU6_Vxx(R8G8B8A8_USCALED,           8_8_8_8_UINT,      R8G8B8A8_UINT,      WZYX), /* 39 */
-   TU6_Vxx(R8G8B8A8_SSCALED,           8_8_8_8_SINT,      R8G8B8A8_SINT,      WZYX), /* 40 */
-   TU6_VTC(R8G8B8A8_UINT,              8_8_8_8_UINT,      R8G8B8A8_UINT,      WZYX), /* 41 */
-   TU6_VTC(R8G8B8A8_SINT,              8_8_8_8_SINT,      R8G8B8A8_SINT,      WZYX), /* 42 */
-   TU6_xTC(R8G8B8A8_SRGB,              8_8_8_8_UNORM,     R8G8B8A8_UNORM,     WZYX), /* 43 */
+   TU6_VTC(R8G8B8A8_UNORM,             8_8_8_8_UNORM,     WZYX), /* 37 */
+   TU6_VTC(R8G8B8A8_SNORM,             8_8_8_8_SNORM,     WZYX), /* 38 */
+   TU6_Vxx(R8G8B8A8_USCALED,           8_8_8_8_UINT,      WZYX), /* 39 */
+   TU6_Vxx(R8G8B8A8_SSCALED,           8_8_8_8_SINT,      WZYX), /* 40 */
+   TU6_VTC(R8G8B8A8_UINT,              8_8_8_8_UINT,      WZYX), /* 41 */
+   TU6_VTC(R8G8B8A8_SINT,              8_8_8_8_SINT,      WZYX), /* 42 */
+   TU6_xTC(R8G8B8A8_SRGB,              8_8_8_8_UNORM,     WZYX), /* 43 */
 
    /* 32-bit BGRA */
-   TU6_VTC(B8G8R8A8_UNORM,             8_8_8_8_UNORM,     R8G8B8A8_UNORM,     WXYZ), /* 44 */
-   TU6_VTC(B8G8R8A8_SNORM,             8_8_8_8_SNORM,     R8G8B8A8_SNORM,     WXYZ), /* 45 */
-   TU6_Vxx(B8G8R8A8_USCALED,           8_8_8_8_UINT,      R8G8B8A8_UINT,      WXYZ), /* 46 */
-   TU6_Vxx(B8G8R8A8_SSCALED,           8_8_8_8_SINT,      R8G8B8A8_SINT,      WXYZ), /* 47 */
-   TU6_VTC(B8G8R8A8_UINT,              8_8_8_8_UINT,      R8G8B8A8_UINT,      WXYZ), /* 48 */
-   TU6_VTC(B8G8R8A8_SINT,              8_8_8_8_SINT,      R8G8B8A8_SINT,      WXYZ), /* 49 */
-   TU6_xTC(B8G8R8A8_SRGB,              8_8_8_8_UNORM,     R8G8B8A8_UNORM,     WXYZ), /* 50 */
+   TU6_VTC(B8G8R8A8_UNORM,             8_8_8_8_UNORM,     WXYZ), /* 44 */
+   TU6_VTC(B8G8R8A8_SNORM,             8_8_8_8_SNORM,     WXYZ), /* 45 */
+   TU6_Vxx(B8G8R8A8_USCALED,           8_8_8_8_UINT,      WXYZ), /* 46 */
+   TU6_Vxx(B8G8R8A8_SSCALED,           8_8_8_8_SINT,      WXYZ), /* 47 */
+   TU6_VTC(B8G8R8A8_UINT,              8_8_8_8_UINT,      WXYZ), /* 48 */
+   TU6_VTC(B8G8R8A8_SINT,              8_8_8_8_SINT,      WXYZ), /* 49 */
+   TU6_xTC(B8G8R8A8_SRGB,              8_8_8_8_UNORM,     WXYZ), /* 50 */
 
    /* 32-bit packed */
-   TU6_VTC(A8B8G8R8_UNORM_PACK32,      8_8_8_8_UNORM,     R8G8B8A8_UNORM,     WZYX), /* 51 */
-   TU6_VTC(A8B8G8R8_SNORM_PACK32,      8_8_8_8_SNORM,     R8G8B8A8_SNORM,     WZYX), /* 52 */
-   TU6_Vxx(A8B8G8R8_USCALED_PACK32,    8_8_8_8_UINT,      R8G8B8A8_UINT,      WZYX), /* 53 */
-   TU6_Vxx(A8B8G8R8_SSCALED_PACK32,    8_8_8_8_SINT,      R8G8B8A8_SINT,      WZYX), /* 54 */
-   TU6_VTC(A8B8G8R8_UINT_PACK32,       8_8_8_8_UINT,      R8G8B8A8_UINT,      WZYX), /* 55 */
-   TU6_VTC(A8B8G8R8_SINT_PACK32,       8_8_8_8_SINT,      R8G8B8A8_SINT,      WZYX), /* 56 */
-   TU6_xTC(A8B8G8R8_SRGB_PACK32,       8_8_8_8_UNORM,     R8G8B8A8_UNORM,     WZYX), /* 57 */
-   TU6_VTC(A2R10G10B10_UNORM_PACK32,   10_10_10_2_UNORM,  R10G10B10A2_UNORM,  WXYZ), /* 58 */
-   TU6_Vxx(A2R10G10B10_SNORM_PACK32,   10_10_10_2_SNORM,  R10G10B10A2_SNORM,  WXYZ), /* 59 */
-   TU6_Vxx(A2R10G10B10_USCALED_PACK32, 10_10_10_2_UINT,   R10G10B10A2_UINT,   WXYZ), /* 60 */
-   TU6_Vxx(A2R10G10B10_SSCALED_PACK32, 10_10_10_2_SINT,   R10G10B10A2_SINT,   WXYZ), /* 61 */
-   TU6_VTC(A2R10G10B10_UINT_PACK32,    10_10_10_2_UINT,   R10G10B10A2_UINT,   WXYZ), /* 62 */
-   TU6_Vxx(A2R10G10B10_SINT_PACK32,    10_10_10_2_SINT,   R10G10B10A2_SINT,   WXYZ), /* 63 */
-   TU6_VTC(A2B10G10R10_UNORM_PACK32,   10_10_10_2_UNORM,  R10G10B10A2_UNORM,  WZYX), /* 64 */
-   TU6_Vxx(A2B10G10R10_SNORM_PACK32,   10_10_10_2_SNORM,  R10G10B10A2_SNORM,  WZYX), /* 65 */
-   TU6_Vxx(A2B10G10R10_USCALED_PACK32, 10_10_10_2_UINT,   R10G10B10A2_UINT,   WZYX), /* 66 */
-   TU6_Vxx(A2B10G10R10_SSCALED_PACK32, 10_10_10_2_SINT,   R10G10B10A2_SINT,   WZYX), /* 67 */
-   TU6_VTC(A2B10G10R10_UINT_PACK32,    10_10_10_2_UINT,   R10G10B10A2_UINT,   WZYX), /* 68 */
-   TU6_Vxx(A2B10G10R10_SINT_PACK32,    10_10_10_2_SINT,   R10G10B10A2_SINT,   WZYX), /* 69 */
+   TU6_VTC(A8B8G8R8_UNORM_PACK32,      8_8_8_8_UNORM,     WZYX), /* 51 */
+   TU6_VTC(A8B8G8R8_SNORM_PACK32,      8_8_8_8_SNORM,     WZYX), /* 52 */
+   TU6_Vxx(A8B8G8R8_USCALED_PACK32,    8_8_8_8_UINT,      WZYX), /* 53 */
+   TU6_Vxx(A8B8G8R8_SSCALED_PACK32,    8_8_8_8_SINT,      WZYX), /* 54 */
+   TU6_VTC(A8B8G8R8_UINT_PACK32,       8_8_8_8_UINT,      WZYX), /* 55 */
+   TU6_VTC(A8B8G8R8_SINT_PACK32,       8_8_8_8_SINT,      WZYX), /* 56 */
+   TU6_xTC(A8B8G8R8_SRGB_PACK32,       8_8_8_8_UNORM,     WZYX), /* 57 */
+   TU6_VTC(A2R10G10B10_UNORM_PACK32,   10_10_10_2_UNORM,  WXYZ), /* 58 */
+   TU6_Vxx(A2R10G10B10_SNORM_PACK32,   10_10_10_2_SNORM,  WXYZ), /* 59 */
+   TU6_Vxx(A2R10G10B10_USCALED_PACK32, 10_10_10_2_UINT,   WXYZ), /* 60 */
+   TU6_Vxx(A2R10G10B10_SSCALED_PACK32, 10_10_10_2_SINT,   WXYZ), /* 61 */
+   TU6_VTC(A2R10G10B10_UINT_PACK32,    10_10_10_2_UINT,   WXYZ), /* 62 */
+   TU6_Vxx(A2R10G10B10_SINT_PACK32,    10_10_10_2_SINT,   WXYZ), /* 63 */
+   TU6_VTC(A2B10G10R10_UNORM_PACK32,   10_10_10_2_UNORM,  WZYX), /* 64 */
+   TU6_Vxx(A2B10G10R10_SNORM_PACK32,   10_10_10_2_SNORM,  WZYX), /* 65 */
+   TU6_Vxx(A2B10G10R10_USCALED_PACK32, 10_10_10_2_UINT,   WZYX), /* 66 */
+   TU6_Vxx(A2B10G10R10_SSCALED_PACK32, 10_10_10_2_SINT,   WZYX), /* 67 */
+   TU6_VTC(A2B10G10R10_UINT_PACK32,    10_10_10_2_UINT,   WZYX), /* 68 */
+   TU6_Vxx(A2B10G10R10_SINT_PACK32,    10_10_10_2_SINT,   WZYX), /* 69 */
 
    /* 16-bit R */
-   TU6_VTC(R16_UNORM,                  16_UNORM,          R16_UNORM,          WZYX), /* 70 */
-   TU6_VTC(R16_SNORM,                  16_SNORM,          R16_SNORM,          WZYX), /* 71 */
-   TU6_Vxx(R16_USCALED,                16_UINT,           R16_UINT,           WZYX), /* 72 */
-   TU6_Vxx(R16_SSCALED,                16_SINT,           R16_SINT,           WZYX), /* 73 */
-   TU6_VTC(R16_UINT,                   16_UINT,           R16_UINT,           WZYX), /* 74 */
-   TU6_VTC(R16_SINT,                   16_SINT,           R16_SINT,           WZYX), /* 75 */
-   TU6_VTC(R16_SFLOAT,                 16_FLOAT,          R16_FLOAT,          WZYX), /* 76 */
+   TU6_VTC(R16_UNORM,                  16_UNORM,          WZYX), /* 70 */
+   TU6_VTC(R16_SNORM,                  16_SNORM,          WZYX), /* 71 */
+   TU6_Vxx(R16_USCALED,                16_UINT,           WZYX), /* 72 */
+   TU6_Vxx(R16_SSCALED,                16_SINT,           WZYX), /* 73 */
+   TU6_VTC(R16_UINT,                   16_UINT,           WZYX), /* 74 */
+   TU6_VTC(R16_SINT,                   16_SINT,           WZYX), /* 75 */
+   TU6_VTC(R16_SFLOAT,                 16_FLOAT,          WZYX), /* 76 */
 
    /* 32-bit RG */
-   TU6_VTC(R16G16_UNORM,               16_16_UNORM,       R16G16_UNORM,       WZYX), /* 77 */
-   TU6_VTC(R16G16_SNORM,               16_16_SNORM,       R16G16_SNORM,       WZYX), /* 78 */
-   TU6_Vxx(R16G16_USCALED,             16_16_UINT,        R16G16_UINT,        WZYX), /* 79 */
-   TU6_Vxx(R16G16_SSCALED,             16_16_SINT,        R16G16_SINT,        WZYX), /* 80 */
-   TU6_VTC(R16G16_UINT,                16_16_UINT,        R16G16_UINT,        WZYX), /* 81 */
-   TU6_VTC(R16G16_SINT,                16_16_SINT,        R16G16_SINT,        WZYX), /* 82 */
-   TU6_VTC(R16G16_SFLOAT,              16_16_FLOAT,       R16G16_FLOAT,       WZYX), /* 83 */
+   TU6_VTC(R16G16_UNORM,               16_16_UNORM,       WZYX), /* 77 */
+   TU6_VTC(R16G16_SNORM,               16_16_SNORM,       WZYX), /* 78 */
+   TU6_Vxx(R16G16_USCALED,             16_16_UINT,        WZYX), /* 79 */
+   TU6_Vxx(R16G16_SSCALED,             16_16_SINT,        WZYX), /* 80 */
+   TU6_VTC(R16G16_UINT,                16_16_UINT,        WZYX), /* 81 */
+   TU6_VTC(R16G16_SINT,                16_16_SINT,        WZYX), /* 82 */
+   TU6_VTC(R16G16_SFLOAT,              16_16_FLOAT,       WZYX), /* 83 */
 
    /* 48-bit RGB */
-   TU6_Vxx(R16G16B16_UNORM,            16_16_16_UNORM,    R16G16B16_UNORM,    WZYX), /* 84 */
-   TU6_Vxx(R16G16B16_SNORM,            16_16_16_SNORM,    R16G16B16_SNORM,    WZYX), /* 85 */
-   TU6_Vxx(R16G16B16_USCALED,          16_16_16_UINT,     R16G16B16_UINT,     WZYX), /* 86 */
-   TU6_Vxx(R16G16B16_SSCALED,          16_16_16_SINT,     R16G16B16_SINT,     WZYX), /* 87 */
-   TU6_Vxx(R16G16B16_UINT,             16_16_16_UINT,     R16G16B16_UINT,     WZYX), /* 88 */
-   TU6_Vxx(R16G16B16_SINT,             16_16_16_SINT,     R16G16B16_SINT,     WZYX), /* 89 */
-   TU6_Vxx(R16G16B16_SFLOAT,           16_16_16_FLOAT,    R16G16B16_FLOAT,    WZYX), /* 90 */
+   TU6_Vxx(R16G16B16_UNORM,            16_16_16_UNORM,    WZYX), /* 84 */
+   TU6_Vxx(R16G16B16_SNORM,            16_16_16_SNORM,    WZYX), /* 85 */
+   TU6_Vxx(R16G16B16_USCALED,          16_16_16_UINT,     WZYX), /* 86 */
+   TU6_Vxx(R16G16B16_SSCALED,          16_16_16_SINT,     WZYX), /* 87 */
+   TU6_Vxx(R16G16B16_UINT,             16_16_16_UINT,     WZYX), /* 88 */
+   TU6_Vxx(R16G16B16_SINT,             16_16_16_SINT,     WZYX), /* 89 */
+   TU6_Vxx(R16G16B16_SFLOAT,           16_16_16_FLOAT,    WZYX), /* 90 */
 
    /* 64-bit RGBA */
-   TU6_VTC(R16G16B16A16_UNORM,         16_16_16_16_UNORM, R16G16B16A16_UNORM, WZYX), /* 91 */
-   TU6_VTC(R16G16B16A16_SNORM,         16_16_16_16_SNORM, R16G16B16A16_SNORM, WZYX), /* 92 */
-   TU6_Vxx(R16G16B16A16_USCALED,       16_16_16_16_UINT,  R16G16B16A16_UINT,  WZYX), /* 93 */
-   TU6_Vxx(R16G16B16A16_SSCALED,       16_16_16_16_SINT,  R16G16B16A16_SINT,  WZYX), /* 94 */
-   TU6_VTC(R16G16B16A16_UINT,          16_16_16_16_UINT,  R16G16B16A16_UINT,  WZYX), /* 95 */
-   TU6_VTC(R16G16B16A16_SINT,          16_16_16_16_SINT,  R16G16B16A16_SINT,  WZYX), /* 96 */
-   TU6_VTC(R16G16B16A16_SFLOAT,        16_16_16_16_FLOAT, R16G16B16A16_FLOAT, WZYX), /* 97 */
+   TU6_VTC(R16G16B16A16_UNORM,         16_16_16_16_UNORM, WZYX), /* 91 */
+   TU6_VTC(R16G16B16A16_SNORM,         16_16_16_16_SNORM, WZYX), /* 92 */
+   TU6_Vxx(R16G16B16A16_USCALED,       16_16_16_16_UINT,  WZYX), /* 93 */
+   TU6_Vxx(R16G16B16A16_SSCALED,       16_16_16_16_SINT,  WZYX), /* 94 */
+   TU6_VTC(R16G16B16A16_UINT,          16_16_16_16_UINT,  WZYX), /* 95 */
+   TU6_VTC(R16G16B16A16_SINT,          16_16_16_16_SINT,  WZYX), /* 96 */
+   TU6_VTC(R16G16B16A16_SFLOAT,        16_16_16_16_FLOAT, WZYX), /* 97 */
 
    /* 32-bit R */
-   TU6_VTC(R32_UINT,                   32_UINT,           R32_UINT,           WZYX), /* 98 */
-   TU6_VTC(R32_SINT,                   32_SINT,           R32_SINT,           WZYX), /* 99 */
-   TU6_VTC(R32_SFLOAT,                 32_FLOAT,          R32_FLOAT,          WZYX), /* 100 */
+   TU6_VTC(R32_UINT,                   32_UINT,           WZYX), /* 98 */
+   TU6_VTC(R32_SINT,                   32_SINT,           WZYX), /* 99 */
+   TU6_VTC(R32_SFLOAT,                 32_FLOAT,          WZYX), /* 100 */
 
    /* 64-bit RG */
-   TU6_VTC(R32G32_UINT,                32_32_UINT,        R32G32_UINT,        WZYX), /* 101 */
-   TU6_VTC(R32G32_SINT,                32_32_SINT,        R32G32_SINT,        WZYX), /* 102 */
-   TU6_VTC(R32G32_SFLOAT,              32_32_FLOAT,       R32G32_FLOAT,       WZYX), /* 103 */
+   TU6_VTC(R32G32_UINT,                32_32_UINT,        WZYX), /* 101 */
+   TU6_VTC(R32G32_SINT,                32_32_SINT,        WZYX), /* 102 */
+   TU6_VTC(R32G32_SFLOAT,              32_32_FLOAT,       WZYX), /* 103 */
 
    /* 96-bit RGB */
-   TU6_Vxx(R32G32B32_UINT,             32_32_32_UINT,     R32G32B32_UINT,     WZYX), /* 104 */
-   TU6_Vxx(R32G32B32_SINT,             32_32_32_SINT,     R32G32B32_SINT,     WZYX), /* 105 */
-   TU6_Vxx(R32G32B32_SFLOAT,           32_32_32_FLOAT,    R32G32B32_FLOAT,    WZYX), /* 106 */
+   TU6_Vxx(R32G32B32_UINT,             32_32_32_UINT,     WZYX), /* 104 */
+   TU6_Vxx(R32G32B32_SINT,             32_32_32_SINT,     WZYX), /* 105 */
+   TU6_Vxx(R32G32B32_SFLOAT,           32_32_32_FLOAT,    WZYX), /* 106 */
 
    /* 128-bit RGBA */
-   TU6_VTC(R32G32B32A32_UINT,          32_32_32_32_UINT,  R32G32B32A32_UINT,  WZYX), /* 107 */
-   TU6_VTC(R32G32B32A32_SINT,          32_32_32_32_SINT,  R32G32B32A32_SINT,  WZYX), /* 108 */
-   TU6_VTC(R32G32B32A32_SFLOAT,        32_32_32_32_FLOAT, R32G32B32A32_FLOAT, WZYX), /* 109 */
+   TU6_VTC(R32G32B32A32_UINT,          32_32_32_32_UINT,  WZYX), /* 107 */
+   TU6_VTC(R32G32B32A32_SINT,          32_32_32_32_SINT,  WZYX), /* 108 */
+   TU6_VTC(R32G32B32A32_SFLOAT,        32_32_32_32_FLOAT, WZYX), /* 109 */
 
    /* 64-bit R */
-   TU6_xxx(R64_UINT,                   64_UINT,           R64_UINT,           WZYX), /* 110 */
-   TU6_xxx(R64_SINT,                   64_SINT,           R64_SINT,           WZYX), /* 111 */
-   TU6_xxx(R64_SFLOAT,                 64_FLOAT,          R64_FLOAT,          WZYX), /* 112 */
+   TU6_xxx(R64_UINT,                   64_UINT,           WZYX), /* 110 */
+   TU6_xxx(R64_SINT,                   64_SINT,           WZYX), /* 111 */
+   TU6_xxx(R64_SFLOAT,                 64_FLOAT,          WZYX), /* 112 */
 
    /* 128-bit RG */
-   TU6_xxx(R64G64_UINT,                64_64_UINT,        R64G64_UINT,        WZYX), /* 113 */
-   TU6_xxx(R64G64_SINT,                64_64_SINT,        R64G64_SINT,        WZYX), /* 114 */
-   TU6_xxx(R64G64_SFLOAT,              64_64_FLOAT,       R64G64_FLOAT,       WZYX), /* 115 */
+   TU6_xxx(R64G64_UINT,                64_64_UINT,        WZYX), /* 113 */
+   TU6_xxx(R64G64_SINT,                64_64_SINT,        WZYX), /* 114 */
+   TU6_xxx(R64G64_SFLOAT,              64_64_FLOAT,       WZYX), /* 115 */
 
    /* 192-bit RGB */
-   TU6_xxx(R64G64B64_UINT,             64_64_64_UINT,     R64G64B64_UINT,     WZYX), /* 116 */
-   TU6_xxx(R64G64B64_SINT,             64_64_64_SINT,     R64G64B64_SINT,     WZYX), /* 117 */
-   TU6_xxx(R64G64B64_SFLOAT,           64_64_64_FLOAT,    R64G64B64_FLOAT,    WZYX), /* 118 */
+   TU6_xxx(R64G64B64_UINT,             64_64_64_UINT,     WZYX), /* 116 */
+   TU6_xxx(R64G64B64_SINT,             64_64_64_SINT,     WZYX), /* 117 */
+   TU6_xxx(R64G64B64_SFLOAT,           64_64_64_FLOAT,    WZYX), /* 118 */
 
    /* 256-bit RGBA */
-   TU6_xxx(R64G64B64A64_UINT,          64_64_64_64_UINT,  R64G64B64A64_UINT,  WZYX), /* 119 */
-   TU6_xxx(R64G64B64A64_SINT,          64_64_64_64_SINT,  R64G64B64A64_SINT,  WZYX), /* 120 */
-   TU6_xxx(R64G64B64A64_SFLOAT,        64_64_64_64_FLOAT, R64G64B64A64_FLOAT, WZYX), /* 121 */
+   TU6_xxx(R64G64B64A64_UINT,          64_64_64_64_UINT,  WZYX), /* 119 */
+   TU6_xxx(R64G64B64A64_SINT,          64_64_64_64_SINT,  WZYX), /* 120 */
+   TU6_xxx(R64G64B64A64_SFLOAT,        64_64_64_64_FLOAT, WZYX), /* 121 */
 
    /* 32-bit packed float */
-   TU6_VTC(B10G11R11_UFLOAT_PACK32,    11_11_10_FLOAT,    R11G11B10_FLOAT,    WZYX), /* 122 */
-   TU6_xTx(E5B9G9R9_UFLOAT_PACK32,     9_9_9_E5_FLOAT,    R9G9B9E5_FLOAT,     WZYX), /* 123 */
+   TU6_VTC(B10G11R11_UFLOAT_PACK32,    11_11_10_FLOAT,    WZYX), /* 122 */
+   TU6_xTx(E5B9G9R9_UFLOAT_PACK32,     9_9_9_E5_FLOAT,    WZYX), /* 123 */
 
    /* depth/stencil */
-   TU6_xTC(D16_UNORM,                  16_UNORM,          R16_UNORM,          WZYX), /* 124 */
-   TU6_xTC(X8_D24_UNORM_PACK32,        Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, WZYX), /* 125 */
-   TU6_xTC(D32_SFLOAT,                 32_FLOAT,          R32_FLOAT,          WZYX), /* 126 */
-   TU6_xTC(S8_UINT,                    8_UINT,            R8_UINT,            WZYX), /* 127 */
-   TU6_xxx(D16_UNORM_S8_UINT,          X8Z16_UNORM,       X8Z16_UNORM,        WZYX), /* 128 */
-   TU6_xTC(D24_UNORM_S8_UINT,          Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, WZYX), /* 129 */
-   TU6_xxx(D32_SFLOAT_S8_UINT,         x,                 x,                  WZYX), /* 130 */
+   TU6_xTC(D16_UNORM,                  16_UNORM,          WZYX), /* 124 */
+   TU6_xTC(X8_D24_UNORM_PACK32,        Z24_UNORM_S8_UINT, WZYX), /* 125 */
+   TU6_xTC(D32_SFLOAT,                 32_FLOAT,          WZYX), /* 126 */
+   TU6_xTC(S8_UINT,                    8_UINT,            WZYX), /* 127 */
+   TU6_xxx(D16_UNORM_S8_UINT,          X8Z16_UNORM,       WZYX), /* 128 */
+   TU6_xTC(D24_UNORM_S8_UINT,          Z24_UNORM_S8_UINT, WZYX), /* 129 */
+   TU6_xxx(D32_SFLOAT_S8_UINT,         x,                 WZYX), /* 130 */
 
    /* compressed */
-   TU6_xTx(BC1_RGB_UNORM_BLOCK,        DXT1,              DXT1,               WZYX), /* 131 */
-   TU6_xTx(BC1_RGB_SRGB_BLOCK,         DXT1,              DXT1,               WZYX), /* 132 */
-   TU6_xTx(BC1_RGBA_UNORM_BLOCK,       DXT1,              DXT1,               WZYX), /* 133 */
-   TU6_xTx(BC1_RGBA_SRGB_BLOCK,        DXT1,              DXT1,               WZYX), /* 134 */
-   TU6_xTx(BC2_UNORM_BLOCK,            DXT3,              DXT3,               WZYX), /* 135 */
-   TU6_xTx(BC2_SRGB_BLOCK,             DXT3,              DXT3,               WZYX), /* 136 */
-   TU6_xTx(BC3_UNORM_BLOCK,            DXT5,              DXT5,               WZYX), /* 137 */
-   TU6_xTx(BC3_SRGB_BLOCK,             DXT5,              DXT5,               WZYX), /* 138 */
-   TU6_xTx(BC4_UNORM_BLOCK,            RGTC1_UNORM,       RGTC1_UNORM,        WZYX), /* 139 */
-   TU6_xTx(BC4_SNORM_BLOCK,            RGTC1_SNORM,       RGTC1_SNORM,        WZYX), /* 140 */
-   TU6_xTx(BC5_UNORM_BLOCK,            RGTC2_UNORM,       RGTC2_UNORM,        WZYX), /* 141 */
-   TU6_xTx(BC5_SNORM_BLOCK,            RGTC2_SNORM,       RGTC2_SNORM,        WZYX), /* 142 */
-   TU6_xTx(BC6H_UFLOAT_BLOCK,          BPTC_UFLOAT,       BPTC_UFLOAT,        WZYX), /* 143 */
-   TU6_xTx(BC6H_SFLOAT_BLOCK,          BPTC_FLOAT,        BPTC_FLOAT,         WZYX), /* 144 */
-   TU6_xTx(BC7_UNORM_BLOCK,            BPTC,              BPTC,               WZYX), /* 145 */
-   TU6_xTx(BC7_SRGB_BLOCK,             BPTC,              BPTC,               WZYX), /* 146 */
-   TU6_xTx(ETC2_R8G8B8_UNORM_BLOCK,    ETC2_RGB8,         ETC2_RGB8,          WZYX), /* 147 */
-   TU6_xTx(ETC2_R8G8B8_SRGB_BLOCK,     ETC2_RGB8,         ETC2_RGB8,          WZYX), /* 148 */
-   TU6_xTx(ETC2_R8G8B8A1_UNORM_BLOCK,  ETC2_RGB8A1,       ETC2_RGB8A1,        WZYX), /* 149 */
-   TU6_xTx(ETC2_R8G8B8A1_SRGB_BLOCK,   ETC2_RGB8A1,       ETC2_RGB8A1,        WZYX), /* 150 */
-   TU6_xTx(ETC2_R8G8B8A8_UNORM_BLOCK,  ETC2_RGBA8,        ETC2_RGBA8,         WZYX), /* 151 */
-   TU6_xTx(ETC2_R8G8B8A8_SRGB_BLOCK,   ETC2_RGBA8,        ETC2_RGBA8,         WZYX), /* 152 */
-   TU6_xTx(EAC_R11_UNORM_BLOCK,        ETC2_R11_UNORM,    ETC2_R11_UNORM,     WZYX), /* 153 */
-   TU6_xTx(EAC_R11_SNORM_BLOCK,        ETC2_R11_SNORM,    ETC2_R11_SNORM,     WZYX), /* 154 */
-   TU6_xTx(EAC_R11G11_UNORM_BLOCK,     ETC2_RG11_UNORM,   ETC2_RG11_UNORM,    WZYX), /* 155 */
-   TU6_xTx(EAC_R11G11_SNORM_BLOCK,     ETC2_RG11_SNORM,   ETC2_RG11_SNORM,    WZYX), /* 156 */
-   TU6_xTx(ASTC_4x4_UNORM_BLOCK,       ASTC_4x4,          ASTC_4x4,           WZYX), /* 157 */
-   TU6_xTx(ASTC_4x4_SRGB_BLOCK,        ASTC_4x4,          ASTC_4x4,           WZYX), /* 158 */
-   TU6_xTx(ASTC_5x4_UNORM_BLOCK,       ASTC_5x4,          ASTC_5x4,           WZYX), /* 159 */
-   TU6_xTx(ASTC_5x4_SRGB_BLOCK,        ASTC_5x4,          ASTC_5x4,           WZYX), /* 160 */
-   TU6_xTx(ASTC_5x5_UNORM_BLOCK,       ASTC_5x5,          ASTC_5x5,           WZYX), /* 161 */
-   TU6_xTx(ASTC_5x5_SRGB_BLOCK,        ASTC_5x5,          ASTC_5x5,           WZYX), /* 162 */
-   TU6_xTx(ASTC_6x5_UNORM_BLOCK,       ASTC_6x5,          ASTC_6x5,           WZYX), /* 163 */
-   TU6_xTx(ASTC_6x5_SRGB_BLOCK,        ASTC_6x5,          ASTC_6x5,           WZYX), /* 164 */
-   TU6_xTx(ASTC_6x6_UNORM_BLOCK,       ASTC_6x6,          ASTC_6x6,           WZYX), /* 165 */
-   TU6_xTx(ASTC_6x6_SRGB_BLOCK,        ASTC_6x6,          ASTC_6x6,           WZYX), /* 166 */
-   TU6_xTx(ASTC_8x5_UNORM_BLOCK,       ASTC_8x5,          ASTC_8x5,           WZYX), /* 167 */
-   TU6_xTx(ASTC_8x5_SRGB_BLOCK,        ASTC_8x5,          ASTC_8x5,           WZYX), /* 168 */
-   TU6_xTx(ASTC_8x6_UNORM_BLOCK,       ASTC_8x6,          ASTC_8x6,           WZYX), /* 169 */
-   TU6_xTx(ASTC_8x6_SRGB_BLOCK,        ASTC_8x6,          ASTC_8x6,           WZYX), /* 170 */
-   TU6_xTx(ASTC_8x8_UNORM_BLOCK,       ASTC_8x8,          ASTC_8x8,           WZYX), /* 171 */
-   TU6_xTx(ASTC_8x8_SRGB_BLOCK,        ASTC_8x8,          ASTC_8x8,           WZYX), /* 172 */
-   TU6_xTx(ASTC_10x5_UNORM_BLOCK,      ASTC_10x5,         ASTC_10x5,          WZYX), /* 173 */
-   TU6_xTx(ASTC_10x5_SRGB_BLOCK,       ASTC_10x5,         ASTC_10x5,          WZYX), /* 174 */
-   TU6_xTx(ASTC_10x6_UNORM_BLOCK,      ASTC_10x6,         ASTC_10x6,          WZYX), /* 175 */
-   TU6_xTx(ASTC_10x6_SRGB_BLOCK,       ASTC_10x6,         ASTC_10x6,          WZYX), /* 176 */
-   TU6_xTx(ASTC_10x8_UNORM_BLOCK,      ASTC_10x8,         ASTC_10x8,          WZYX), /* 177 */
-   TU6_xTx(ASTC_10x8_SRGB_BLOCK,       ASTC_10x8,         ASTC_10x8,          WZYX), /* 178 */
-   TU6_xTx(ASTC_10x10_UNORM_BLOCK,     ASTC_10x10,        ASTC_10x10,         WZYX), /* 179 */
-   TU6_xTx(ASTC_10x10_SRGB_BLOCK,      ASTC_10x10,        ASTC_10x10,         WZYX), /* 180 */
-   TU6_xTx(ASTC_12x10_UNORM_BLOCK,     ASTC_12x10,        ASTC_12x10,         WZYX), /* 181 */
-   TU6_xTx(ASTC_12x10_SRGB_BLOCK,      ASTC_12x10,        ASTC_12x10,         WZYX), /* 182 */
-   TU6_xTx(ASTC_12x12_UNORM_BLOCK,     ASTC_12x12,        ASTC_12x12,         WZYX), /* 183 */
-   TU6_xTx(ASTC_12x12_SRGB_BLOCK,      ASTC_12x12,        ASTC_12x12,         WZYX), /* 184 */
+   TU6_xTx(BC1_RGB_UNORM_BLOCK,        DXT1,              WZYX), /* 131 */
+   TU6_xTx(BC1_RGB_SRGB_BLOCK,         DXT1,              WZYX), /* 132 */
+   TU6_xTx(BC1_RGBA_UNORM_BLOCK,       DXT1,              WZYX), /* 133 */
+   TU6_xTx(BC1_RGBA_SRGB_BLOCK,        DXT1,              WZYX), /* 134 */
+   TU6_xTx(BC2_UNORM_BLOCK,            DXT3,              WZYX), /* 135 */
+   TU6_xTx(BC2_SRGB_BLOCK,             DXT3,              WZYX), /* 136 */
+   TU6_xTx(BC3_UNORM_BLOCK,            DXT5,              WZYX), /* 137 */
+   TU6_xTx(BC3_SRGB_BLOCK,             DXT5,              WZYX), /* 138 */
+   TU6_xTx(BC4_UNORM_BLOCK,            RGTC1_UNORM,       WZYX), /* 139 */
+   TU6_xTx(BC4_SNORM_BLOCK,            RGTC1_SNORM,       WZYX), /* 140 */
+   TU6_xTx(BC5_UNORM_BLOCK,            RGTC2_UNORM,       WZYX), /* 141 */
+   TU6_xTx(BC5_SNORM_BLOCK,            RGTC2_SNORM,       WZYX), /* 142 */
+   TU6_xTx(BC6H_UFLOAT_BLOCK,          BPTC_UFLOAT,       WZYX), /* 143 */
+   TU6_xTx(BC6H_SFLOAT_BLOCK,          BPTC_FLOAT,        WZYX), /* 144 */
+   TU6_xTx(BC7_UNORM_BLOCK,            BPTC,              WZYX), /* 145 */
+   TU6_xTx(BC7_SRGB_BLOCK,             BPTC,              WZYX), /* 146 */
+   TU6_xTx(ETC2_R8G8B8_UNORM_BLOCK,    ETC2_RGB8,         WZYX), /* 147 */
+   TU6_xTx(ETC2_R8G8B8_SRGB_BLOCK,     ETC2_RGB8,         WZYX), /* 148 */
+   TU6_xTx(ETC2_R8G8B8A1_UNORM_BLOCK,  ETC2_RGB8A1,       WZYX), /* 149 */
+   TU6_xTx(ETC2_R8G8B8A1_SRGB_BLOCK,   ETC2_RGB8A1,       WZYX), /* 150 */
+   TU6_xTx(ETC2_R8G8B8A8_UNORM_BLOCK,  ETC2_RGBA8,        WZYX), /* 151 */
+   TU6_xTx(ETC2_R8G8B8A8_SRGB_BLOCK,   ETC2_RGBA8,        WZYX), /* 152 */
+   TU6_xTx(EAC_R11_UNORM_BLOCK,        ETC2_R11_UNORM,    WZYX), /* 153 */
+   TU6_xTx(EAC_R11_SNORM_BLOCK,        ETC2_R11_SNORM,    WZYX), /* 154 */
+   TU6_xTx(EAC_R11G11_UNORM_BLOCK,     ETC2_RG11_UNORM,   WZYX), /* 155 */
+   TU6_xTx(EAC_R11G11_SNORM_BLOCK,     ETC2_RG11_SNORM,   WZYX), /* 156 */
+   TU6_xTx(ASTC_4x4_UNORM_BLOCK,       ASTC_4x4,          WZYX), /* 157 */
+   TU6_xTx(ASTC_4x4_SRGB_BLOCK,        ASTC_4x4,          WZYX), /* 158 */
+   TU6_xTx(ASTC_5x4_UNORM_BLOCK,       ASTC_5x4,          WZYX), /* 159 */
+   TU6_xTx(ASTC_5x4_SRGB_BLOCK,        ASTC_5x4,          WZYX), /* 160 */
+   TU6_xTx(ASTC_5x5_UNORM_BLOCK,       ASTC_5x5,          WZYX), /* 161 */
+   TU6_xTx(ASTC_5x5_SRGB_BLOCK,        ASTC_5x5,          WZYX), /* 162 */
+   TU6_xTx(ASTC_6x5_UNORM_BLOCK,       ASTC_6x5,          WZYX), /* 163 */
+   TU6_xTx(ASTC_6x5_SRGB_BLOCK,        ASTC_6x5,          WZYX), /* 164 */
+   TU6_xTx(ASTC_6x6_UNORM_BLOCK,       ASTC_6x6,          WZYX), /* 165 */
+   TU6_xTx(ASTC_6x6_SRGB_BLOCK,        ASTC_6x6,          WZYX), /* 166 */
+   TU6_xTx(ASTC_8x5_UNORM_BLOCK,       ASTC_8x5,          WZYX), /* 167 */
+   TU6_xTx(ASTC_8x5_SRGB_BLOCK,        ASTC_8x5,          WZYX), /* 168 */
+   TU6_xTx(ASTC_8x6_UNORM_BLOCK,       ASTC_8x6,          WZYX), /* 169 */
+   TU6_xTx(ASTC_8x6_SRGB_BLOCK,        ASTC_8x6,          WZYX), /* 170 */
+   TU6_xTx(ASTC_8x8_UNORM_BLOCK,       ASTC_8x8,          WZYX), /* 171 */
+   TU6_xTx(ASTC_8x8_SRGB_BLOCK,        ASTC_8x8,          WZYX), /* 172 */
+   TU6_xTx(ASTC_10x5_UNORM_BLOCK,      ASTC_10x5,         WZYX), /* 173 */
+   TU6_xTx(ASTC_10x5_SRGB_BLOCK,       ASTC_10x5,         WZYX), /* 174 */
+   TU6_xTx(ASTC_10x6_UNORM_BLOCK,      ASTC_10x6,         WZYX), /* 175 */
+   TU6_xTx(ASTC_10x6_SRGB_BLOCK,       ASTC_10x6,         WZYX), /* 176 */
+   TU6_xTx(ASTC_10x8_UNORM_BLOCK,      ASTC_10x8,         WZYX), /* 177 */
+   TU6_xTx(ASTC_10x8_SRGB_BLOCK,       ASTC_10x8,         WZYX), /* 178 */
+   TU6_xTx(ASTC_10x10_UNORM_BLOCK,     ASTC_10x10,        WZYX), /* 179 */
+   TU6_xTx(ASTC_10x10_SRGB_BLOCK,      ASTC_10x10,        WZYX), /* 180 */
+   TU6_xTx(ASTC_12x10_UNORM_BLOCK,     ASTC_12x10,        WZYX), /* 181 */
+   TU6_xTx(ASTC_12x10_SRGB_BLOCK,      ASTC_12x10,        WZYX), /* 182 */
+   TU6_xTx(ASTC_12x12_UNORM_BLOCK,     ASTC_12x12,        WZYX), /* 183 */
+   TU6_xTx(ASTC_12x12_SRGB_BLOCK,      ASTC_12x12,        WZYX), /* 184 */
 };
 #undef TU_FORMAT_TABLE_FIRST
 #undef TU_FORMAT_TABLE_LAST
@@ -336,65 +334,65 @@ tu6_get_native_format(VkFormat format)
 }
 
 enum a6xx_2d_ifmt
-tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt)
+tu6_fmt_to_ifmt(enum a6xx_format fmt)
 {
    switch (fmt) {
-   case RB6_A8_UNORM:
-   case RB6_R8_UNORM:
-   case RB6_R8_SNORM:
-   case RB6_R8G8_UNORM:
-   case RB6_R8G8_SNORM:
-   case RB6_R8G8B8A8_UNORM:
-   case RB6_R8G8B8X8_UNORM:
-   case RB6_R8G8B8A8_SNORM:
-   case RB6_R4G4B4A4_UNORM:
-   case RB6_R5G5B5A1_UNORM:
-   case RB6_R5G6B5_UNORM:
-   case RB6_Z24_UNORM_S8_UINT:
-   case RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8:
+   case FMT6_A8_UNORM:
+   case FMT6_8_UNORM:
+   case FMT6_8_SNORM:
+   case FMT6_8_8_UNORM:
+   case FMT6_8_8_SNORM:
+   case FMT6_8_8_8_8_UNORM:
+   case FMT6_8_8_8_X8_UNORM:
+   case FMT6_8_8_8_8_SNORM:
+   case FMT6_4_4_4_4_UNORM:
+   case FMT6_5_5_5_1_UNORM:
+   case FMT6_5_6_5_UNORM:
+   case FMT6_Z24_UNORM_S8_UINT:
+   case FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8:
       return R2D_UNORM8;
 
-   case RB6_R32_UINT:
-   case RB6_R32_SINT:
-   case RB6_R32G32_UINT:
-   case RB6_R32G32_SINT:
-   case RB6_R32G32B32A32_UINT:
-   case RB6_R32G32B32A32_SINT:
+   case FMT6_32_UINT:
+   case FMT6_32_SINT:
+   case FMT6_32_32_UINT:
+   case FMT6_32_32_SINT:
+   case FMT6_32_32_32_32_UINT:
+   case FMT6_32_32_32_32_SINT:
       return R2D_INT32;
 
-   case RB6_R16_UINT:
-   case RB6_R16_SINT:
-   case RB6_R16G16_UINT:
-   case RB6_R16G16_SINT:
-   case RB6_R16G16B16A16_UINT:
-   case RB6_R16G16B16A16_SINT:
-   case RB6_R10G10B10A2_UINT:
+   case FMT6_16_UINT:
+   case FMT6_16_SINT:
+   case FMT6_16_16_UINT:
+   case FMT6_16_16_SINT:
+   case FMT6_16_16_16_16_UINT:
+   case FMT6_16_16_16_16_SINT:
+   case FMT6_10_10_10_2_UINT:
       return R2D_INT16;
 
-   case RB6_R8_UINT:
-   case RB6_R8_SINT:
-   case RB6_R8G8_UINT:
-   case RB6_R8G8_SINT:
-   case RB6_R8G8B8A8_UINT:
-   case RB6_R8G8B8A8_SINT:
+   case FMT6_8_UINT:
+   case FMT6_8_SINT:
+   case FMT6_8_8_UINT:
+   case FMT6_8_8_SINT:
+   case FMT6_8_8_8_8_UINT:
+   case FMT6_8_8_8_8_SINT:
       return R2D_INT8;
 
-   case RB6_R16_UNORM:
-   case RB6_R16_SNORM:
-   case RB6_R16G16_UNORM:
-   case RB6_R16G16_SNORM:
-   case RB6_R16G16B16A16_UNORM:
-   case RB6_R16G16B16A16_SNORM:
-   case RB6_R32_FLOAT:
-   case RB6_R32G32_FLOAT:
-   case RB6_R32G32B32A32_FLOAT:
+   case FMT6_16_UNORM:
+   case FMT6_16_SNORM:
+   case FMT6_16_16_UNORM:
+   case FMT6_16_16_SNORM:
+   case FMT6_16_16_16_16_UNORM:
+   case FMT6_16_16_16_16_SNORM:
+   case FMT6_32_FLOAT:
+   case FMT6_32_32_FLOAT:
+   case FMT6_32_32_32_32_FLOAT:
       return R2D_FLOAT32;
 
-   case RB6_R16_FLOAT:
-   case RB6_R16G16_FLOAT:
-   case RB6_R16G16B16A16_FLOAT:
-   case RB6_R11G11B10_FLOAT:
-   case RB6_R10G10B10A2_UNORM:
+   case FMT6_16_FLOAT:
+   case FMT6_16_16_FLOAT:
+   case FMT6_16_16_16_16_FLOAT:
+   case FMT6_11_11_10_FLOAT:
+   case FMT6_10_10_10_2_UNORM_DEST:
       return R2D_FLOAT16;
 
    default:
@@ -660,7 +658,7 @@ tu_2d_clear_color(const VkClearColorValue *val, VkFormat format, uint32_t buf[4]
       return;
    }
 
-   enum a6xx_2d_ifmt ifmt = tu6_rb_fmt_to_ifmt(tu6_get_native_format(format)->rb);
+   enum a6xx_2d_ifmt ifmt = tu6_fmt_to_ifmt(tu6_get_native_format(format)->rb);
 
    assert(desc && (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ||
                    format == VK_FORMAT_B10G11R11_UFLOAT_PACK32));
index 4b804ba5c24cfb8a7ec4bff81163bdafc285360b..a9ed203439a1e36753a46fcfe230856481725948 100644 (file)
@@ -289,7 +289,7 @@ tu_image_view_init(struct tu_image_view *iview,
    unsigned fmt_tex = fmt->tex;
    if (iview->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT &&
        iview->vk_format == VK_FORMAT_D24_UNORM_S8_UINT)
-      fmt_tex = TFMT6_S8Z24_UINT;
+      fmt_tex = FMT6_S8Z24_UINT;
 
    iview->descriptor[0] =
       A6XX_TEX_CONST_0_TILE_MODE(tile_mode) |
index e0e76bd179e1589c2c21323a05f7f93909724078..934c907b98c25b5a323be8a65fc656fe6f1823ea 100644 (file)
@@ -1271,7 +1271,7 @@ tu_2d_clear_color(const VkClearColorValue *val, VkFormat format, uint32_t buf[4]
 void
 tu_2d_clear_zs(const VkClearDepthStencilValue *val, VkFormat format, uint32_t buf[4]);
 
-enum a6xx_2d_ifmt tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt);
+enum a6xx_2d_ifmt tu6_fmt_to_ifmt(enum a6xx_format fmt);
 enum a6xx_depth_format tu6_pipe2depth(VkFormat format);
 
 struct tu_image_level
index f812aab37a6cd0c08e763743536e06ff4cc99c25..9ef8be6b5a023e2ea2b983618b9a7cca477657e9 100644 (file)
@@ -58,7 +58,7 @@ ok_dims(const struct pipe_resource *r, const struct pipe_box *b, int lvl)
 static bool
 ok_format(enum pipe_format pfmt)
 {
-       enum a6xx_color_fmt fmt = fd6_pipe2color(pfmt);
+       enum a6xx_format fmt = fd6_pipe2color(pfmt);
 
        switch (pfmt) {
        case PIPE_FORMAT_Z24_UNORM_S8_UINT:
@@ -159,7 +159,7 @@ emit_setup(struct fd_batch *batch)
 }
 
 static uint32_t
-blit_control(enum a6xx_color_fmt fmt, bool is_srgb)
+blit_control(enum a6xx_format fmt, bool is_srgb)
 {
        enum a6xx_2d_ifmt ifmt = fd6_ifmt(fmt);
 
@@ -233,7 +233,7 @@ emit_blit_buffer(struct fd_context *ctx, struct fd_ringbuffer *ring,
        OUT_PKT7(ring, CP_SET_MARKER, 1);
        OUT_RING(ring, A6XX_CP_SET_MARKER_0_MODE(RM6_BLIT2DSCALE));
 
-       uint32_t blit_cntl = blit_control(RB6_R8_UNORM, false) | 0x20000000;
+       uint32_t blit_cntl = blit_control(FMT6_8_UNORM, false) | 0x20000000;
        OUT_PKT4(ring, REG_A6XX_RB_2D_BLIT_CNTL, 1);
        OUT_RING(ring, blit_cntl);
 
@@ -256,7 +256,7 @@ emit_blit_buffer(struct fd_context *ctx, struct fd_ringbuffer *ring,
                 * Emit source:
                 */
                OUT_PKT4(ring, REG_A6XX_SP_PS_2D_SRC_INFO, 10);
-               OUT_RING(ring, A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT(RB6_R8_UNORM) |
+               OUT_RING(ring, A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT(FMT6_8_UNORM) |
                                A6XX_SP_PS_2D_SRC_INFO_TILE_MODE(TILE6_LINEAR) |
                                 A6XX_SP_PS_2D_SRC_INFO_COLOR_SWAP(WZYX) |
                                 0x500000);
@@ -275,7 +275,7 @@ emit_blit_buffer(struct fd_context *ctx, struct fd_ringbuffer *ring,
                 * Emit destination:
                 */
                OUT_PKT4(ring, REG_A6XX_RB_2D_DST_INFO, 9);
-               OUT_RING(ring, A6XX_RB_2D_DST_INFO_COLOR_FORMAT(RB6_R8_UNORM) |
+               OUT_RING(ring, A6XX_RB_2D_DST_INFO_COLOR_FORMAT(FMT6_8_UNORM) |
                                 A6XX_RB_2D_DST_INFO_TILE_MODE(TILE6_LINEAR) |
                                 A6XX_RB_2D_DST_INFO_COLOR_SWAP(WZYX));
                OUT_RELOCW(ring, dst->bo, doff, 0, 0);    /* RB_2D_DST_LO/HI */
@@ -330,7 +330,7 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
        const struct pipe_box *dbox = &info->dst.box;
        struct fd_resource *src, *dst;
        struct fdl_slice *sslice, *dslice;
-       enum a6xx_color_fmt sfmt, dfmt;
+       enum a6xx_format sfmt, dfmt;
        enum a6xx_tile_mode stile, dtile;
        enum a3xx_color_swap sswap, dswap;
        unsigned spitch, dpitch;
@@ -404,7 +404,7 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
                        color->ui[2] = (depth_unorm24 >> 16) & 0xff;
                        color->ui[3] = stencil;
 
-                       dfmt = RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
+                       dfmt = FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
                        break;
                }
                case PIPE_FORMAT_B5G6R5_UNORM:
@@ -435,7 +435,7 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
                        OUT_RING(ring, _mesa_float_to_half(color->f[1]));
                        OUT_RING(ring, _mesa_float_to_half(color->f[2]));
                        OUT_RING(ring, _mesa_float_to_half(color->f[3]));
-                       sfmt = RB6_R16G16B16A16_FLOAT;
+                       sfmt = FMT6_16_16_16_16_FLOAT;
                        break;
 
                case R2D_FLOAT32:
@@ -485,8 +485,8 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
 
                enum a3xx_msaa_samples samples = fd_msaa_samples(src->base.nr_samples);
 
-               if (sfmt == RB6_R10G10B10A2_UNORM)
-                       sfmt = RB6_R10G10B10A2_FLOAT16;
+               if (sfmt == FMT6_10_10_10_2_UNORM_DEST)
+                       sfmt = FMT6_10_10_10_2_UNORM;
 
                OUT_PKT4(ring, REG_A6XX_SP_PS_2D_SRC_INFO, 10);
                OUT_RING(ring, A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT(sfmt) |
@@ -562,8 +562,8 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
                OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8C01, 1);
                OUT_RING(ring, 0);
 
-               if (dfmt == RB6_R10G10B10A2_UNORM)
-                       sfmt = RB6_R16G16B16A16_FLOAT;
+               if (dfmt == FMT6_10_10_10_2_UNORM_DEST)
+                       sfmt = FMT6_16_16_16_16_FLOAT;
 
                /* This register is probably badly named... it seems that it's
                 * controlling the internal/accumulator format or something like
index 18f741fbd5801b5acfefc94a2dd9e5eff4d830e2..f2d26a0eadf5f9e3c1e106abb54b87fec1364796 100644 (file)
@@ -397,11 +397,11 @@ fd6_clear_lrz(struct fd_batch *batch, struct fd_resource *zsbuf, double depth)
        OUT_RING(ring, 0x0000f410);
 
        OUT_PKT4(ring, REG_A6XX_GRAS_2D_BLIT_CNTL, 1);
-       OUT_RING(ring, A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT(RB6_R16_UNORM) |
+       OUT_RING(ring, A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT(FMT6_16_UNORM) |
                        0x4f00080);
 
        OUT_PKT4(ring, REG_A6XX_RB_2D_BLIT_CNTL, 1);
-       OUT_RING(ring, A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT(RB6_R16_UNORM) |
+       OUT_RING(ring, A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT(FMT6_16_UNORM) |
                        0x4f00080);
 
        fd6_event_write(batch, ring, UNK_1D, true);
@@ -414,7 +414,7 @@ fd6_clear_lrz(struct fd_batch *batch, struct fd_resource *zsbuf, double depth)
        OUT_RING(ring, 0x00000000);
 
        OUT_PKT4(ring, REG_A6XX_RB_2D_DST_INFO, 9);
-       OUT_RING(ring, A6XX_RB_2D_DST_INFO_COLOR_FORMAT(RB6_R16_UNORM) |
+       OUT_RING(ring, A6XX_RB_2D_DST_INFO_COLOR_FORMAT(FMT6_16_UNORM) |
                        A6XX_RB_2D_DST_INFO_TILE_MODE(TILE6_LINEAR) |
                        A6XX_RB_2D_DST_INFO_COLOR_SWAP(WZYX));
        OUT_RELOCW(ring, zsbuf->lrz, 0, 0, 0);
index 767c2335971f542d9e95b3199091c51f83a0602b..8a72ff07025b0b038ef362a5d40b5f02c3a4ca12 100644 (file)
@@ -652,7 +652,7 @@ build_vbo_state(struct fd6_emit *emit, const struct ir3_shader_variant *vp)
                                        &vtx->vertexbuf.vb[elem->vertex_buffer_index];
                        struct fd_resource *rsc = fd_resource(vb->buffer.resource);
                        enum pipe_format pfmt = elem->src_format;
-                       enum a6xx_vtx_fmt fmt = fd6_pipe2vtx(pfmt);
+                       enum a6xx_format fmt = fd6_pipe2vtx(pfmt);
                        bool isint = util_format_is_pure_integer(pfmt);
                        uint32_t off = vb->buffer_offset + elem->src_offset;
                        uint32_t size = fd_bo_size(rsc->bo) - off;
index ec0e8b0ce8abe9681fae2bdec9436a3962a26b03..0c6d79b71b248891ba5c69c001c3fa88c1f521cb 100644 (file)
  */
 
 struct fd6_format {
-       enum a6xx_vtx_fmt vtx;
-       enum a6xx_tex_fmt tex;
-       enum a6xx_color_fmt rb;
+       enum a6xx_format vtx;
+       enum a6xx_format tex;
+       enum a6xx_format rb;
        enum a3xx_color_swap swap;
        boolean present;
 };
 
-#define RB6_NONE ~0
+#define FMT6_NONE ~0
 
-/* vertex + texture */
-#define VT(pipe, fmt, rbfmt, swapfmt) \
+#define FMT(pipe, vtxfmt, texfmt, rbfmt, swapfmt) \
        [PIPE_FORMAT_ ## pipe] = { \
                .present = 1, \
-               .vtx = VFMT6_ ## fmt, \
-               .tex = TFMT6_ ## fmt, \
-               .rb = RB6_ ## rbfmt, \
+               .vtx = FMT6_ ## vtxfmt, \
+               .tex = FMT6_ ## texfmt, \
+               .rb = FMT6_ ## rbfmt, \
                .swap = swapfmt \
        }
 
-/* texture-only */
-#define _T(pipe, fmt, rbfmt, swapfmt) \
-       [PIPE_FORMAT_ ## pipe] = { \
-               .present = 1, \
-               .vtx = ~0, \
-               .tex = TFMT6_ ## fmt, \
-               .rb = RB6_ ## rbfmt, \
-               .swap = swapfmt \
-       }
+/* vertex + texture + color */
+#define VTC(pipe, fmt, swapfmt) FMT(pipe, fmt, fmt, fmt, swapfmt)
 
-/* vertex-only */
-#define V_(pipe, fmt, rbfmt, swapfmt) \
-       [PIPE_FORMAT_ ## pipe] = { \
-               .present = 1, \
-               .vtx = VFMT6_ ## fmt, \
-               .tex = ~0, \
-               .rb = RB6_ ## rbfmt, \
-               .swap = swapfmt \
-       }
+#define _TC(pipe, fmt, swapfmt) FMT(pipe, NONE, fmt, fmt, swapfmt)
+#define _T_(pipe, fmt, swapfmt) FMT(pipe, NONE, fmt, NONE, swapfmt)
+#define VT_(pipe, fmt, swapfmt) FMT(pipe, fmt, fmt, NONE, swapfmt)
+#define V__(pipe, fmt, swapfmt) FMT(pipe, fmt, NONE, NONE, swapfmt)
 
 static struct fd6_format formats[PIPE_FORMAT_COUNT] = {
-       /* for blitting, treat PIPE_FORMAT_NONE as 8bit R8: */
-       _T(R8_UINT,    8_UINT,  R8_UINT,  WZYX),
-
        /* 8-bit */
-       VT(R8_UNORM,   8_UNORM, R8_UNORM, WZYX),
-       VT(R8_SNORM,   8_SNORM, R8_SNORM, WZYX),
-       VT(R8_UINT,    8_UINT,  R8_UINT,  WZYX),
-       VT(R8_SINT,    8_SINT,  R8_SINT,  WZYX),
-       V_(R8_USCALED, 8_UINT,  NONE,     WZYX),
-       V_(R8_SSCALED, 8_SINT,  NONE,     WZYX),
-
-       _T(A8_UNORM,   8_UNORM, A8_UNORM, WZYX),
-       _T(L8_UNORM,   8_UNORM, R8_UNORM, WZYX),
-       _T(I8_UNORM,   8_UNORM, NONE,     WZYX),
-
-       _T(A8_UINT,    8_UINT,  NONE,     WZYX),
-       _T(A8_SINT,    8_SINT,  NONE,     WZYX),
-       _T(L8_UINT,    8_UINT,  NONE,     WZYX),
-       _T(L8_SINT,    8_SINT,  NONE,     WZYX),
-       _T(I8_UINT,    8_UINT,  NONE,     WZYX),
-       _T(I8_SINT,    8_SINT,  NONE,     WZYX),
-
-       _T(S8_UINT,    8_UINT,  R8_UNORM, WZYX),
+       VTC(R8_UNORM,   8_UNORM,                     WZYX),
+       VTC(R8_SNORM,   8_SNORM,                     WZYX),
+       VTC(R8_UINT,    8_UINT,                      WZYX),
+       VTC(R8_SINT,    8_SINT,                      WZYX),
+       V__(R8_USCALED, 8_UINT,                      WZYX),
+       V__(R8_SSCALED, 8_SINT,                      WZYX),
+
+       FMT(A8_UNORM,   NONE, 8_UNORM, A8_UNORM,     WZYX),
+       _TC(L8_UNORM,   8_UNORM,                     WZYX),
+       _T_(I8_UNORM,   8_UNORM,                     WZYX),
+
+       _T_(A8_UINT,    8_UINT,                      WZYX),
+       _T_(A8_SINT,    8_SINT,                      WZYX),
+       _T_(L8_UINT,    8_UINT,                      WZYX),
+       _T_(L8_SINT,    8_SINT,                      WZYX),
+       _T_(I8_UINT,    8_UINT,                      WZYX),
+       _T_(I8_SINT,    8_SINT,                      WZYX),
+
+       _TC(S8_UINT,    8_UINT,                      WZYX),
 
        /* 16-bit */
-       VT(R16_UNORM,   16_UNORM, R16_UNORM, WZYX),
-       VT(R16_SNORM,   16_SNORM, R16_SNORM, WZYX),
-       VT(R16_UINT,    16_UINT,  R16_UINT,  WZYX),
-       VT(R16_SINT,    16_SINT,  R16_SINT,  WZYX),
-       V_(R16_USCALED, 16_UINT,  NONE,      WZYX),
-       V_(R16_SSCALED, 16_SINT,  NONE,      WZYX),
-       VT(R16_FLOAT,   16_FLOAT, R16_FLOAT, WZYX),
-       _T(Z16_UNORM,   16_UNORM, R16_UNORM, WZYX),
-
-       _T(A16_UNORM,   16_UNORM, NONE,      WZYX),
-       _T(A16_SNORM,   16_SNORM, NONE,      WZYX),
-       _T(A16_UINT,    16_UINT,  NONE,      WZYX),
-       _T(A16_SINT,    16_SINT,  NONE,      WZYX),
-       _T(L16_UNORM,   16_UNORM, NONE,      WZYX),
-       _T(L16_SNORM,   16_SNORM, NONE,      WZYX),
-       _T(L16_UINT,    16_UINT,  NONE,      WZYX),
-       _T(L16_SINT,    16_SINT,  NONE,      WZYX),
-       _T(I16_UNORM,   16_UNORM, NONE,      WZYX),
-       _T(I16_SNORM,   16_SNORM, NONE,      WZYX),
-       _T(I16_UINT,    16_UINT,  NONE,      WZYX),
-       _T(I16_SINT,    16_SINT,  NONE,      WZYX),
-
-       VT(R8G8_UNORM,   8_8_UNORM, R8G8_UNORM, WZYX),
-       VT(R8G8_SNORM,   8_8_SNORM, R8G8_SNORM, WZYX),
-       VT(R8G8_UINT,    8_8_UINT,  R8G8_UINT,  WZYX),
-       VT(R8G8_SINT,    8_8_SINT,  R8G8_SINT,  WZYX),
-       V_(R8G8_USCALED, 8_8_UINT,  NONE,       WZYX),
-       V_(R8G8_SSCALED, 8_8_SINT,  NONE,       WZYX),
-
-       _T(L8A8_UINT,    8_8_UINT,  NONE,       WZYX),
-       _T(L8A8_SINT,    8_8_SINT,  NONE,       WZYX),
-
-       _T(B5G6R5_UNORM,   5_6_5_UNORM,   R5G6B5_UNORM,   WXYZ),
-       _T(B5G5R5A1_UNORM, 5_5_5_1_UNORM, R5G5B5A1_UNORM, WXYZ),
-       _T(B5G5R5X1_UNORM, 5_5_5_1_UNORM, R5G5B5A1_UNORM, WXYZ),
-       _T(B4G4R4A4_UNORM, 4_4_4_4_UNORM, R4G4B4A4_UNORM, WXYZ),
+       VTC(R16_UNORM,   16_UNORM,                   WZYX),
+       VTC(R16_SNORM,   16_SNORM,                   WZYX),
+       VTC(R16_UINT,    16_UINT,                    WZYX),
+       VTC(R16_SINT,    16_SINT,                    WZYX),
+       V__(R16_USCALED, 16_UINT,                    WZYX),
+       V__(R16_SSCALED, 16_SINT,                    WZYX),
+       VTC(R16_FLOAT,   16_FLOAT,                   WZYX),
+       _TC(Z16_UNORM,   16_UNORM,                   WZYX),
+
+       _T_(A16_UNORM,   16_UNORM,                   WZYX),
+       _T_(A16_SNORM,   16_SNORM,                   WZYX),
+       _T_(A16_UINT,    16_UINT,                    WZYX),
+       _T_(A16_SINT,    16_SINT,                    WZYX),
+       _T_(L16_UNORM,   16_UNORM,                   WZYX),
+       _T_(L16_SNORM,   16_SNORM,                   WZYX),
+       _T_(L16_UINT,    16_UINT,                    WZYX),
+       _T_(L16_SINT,    16_SINT,                    WZYX),
+       _T_(I16_UNORM,   16_UNORM,                   WZYX),
+       _T_(I16_SNORM,   16_SNORM,                   WZYX),
+       _T_(I16_UINT,    16_UINT,                    WZYX),
+       _T_(I16_SINT,    16_SINT,                    WZYX),
+
+       VTC(R8G8_UNORM,   8_8_UNORM,                 WZYX),
+       VTC(R8G8_SNORM,   8_8_SNORM,                 WZYX),
+       VTC(R8G8_UINT,    8_8_UINT,                  WZYX),
+       VTC(R8G8_SINT,    8_8_SINT,                  WZYX),
+       V__(R8G8_USCALED, 8_8_UINT,                  WZYX),
+       V__(R8G8_SSCALED, 8_8_SINT,                  WZYX),
+
+       _T_(L8A8_UINT,    8_8_UINT,                  WZYX),
+       _T_(L8A8_SINT,    8_8_SINT,                  WZYX),
+
+       _TC(B5G6R5_UNORM,   5_6_5_UNORM,             WXYZ),
+       _TC(B5G5R5A1_UNORM, 5_5_5_1_UNORM,           WXYZ),
+       _TC(B5G5R5X1_UNORM, 5_5_5_1_UNORM,           WXYZ),
+       _TC(B4G4R4A4_UNORM, 4_4_4_4_UNORM,           WXYZ),
 
        /* 24-bit */
-       V_(R8G8B8_UNORM,   8_8_8_UNORM, NONE, WZYX),
-       V_(R8G8B8_SNORM,   8_8_8_SNORM, NONE, WZYX),
-       V_(R8G8B8_UINT,    8_8_8_UINT,  NONE, WZYX),
-       V_(R8G8B8_SINT,    8_8_8_SINT,  NONE, WZYX),
-       V_(R8G8B8_USCALED, 8_8_8_UINT,  NONE, WZYX),
-       V_(R8G8B8_SSCALED, 8_8_8_SINT,  NONE, WZYX),
+       V__(R8G8B8_UNORM,   8_8_8_UNORM,             WZYX),
+       V__(R8G8B8_SNORM,   8_8_8_SNORM,             WZYX),
+       V__(R8G8B8_UINT,    8_8_8_UINT,              WZYX),
+       V__(R8G8B8_SINT,    8_8_8_SINT,              WZYX),
+       V__(R8G8B8_USCALED, 8_8_8_UINT,              WZYX),
+       V__(R8G8B8_SSCALED, 8_8_8_SINT,              WZYX),
 
        /* 32-bit */
-       VT(R32_UINT,    32_UINT,  R32_UINT, WZYX),
-       VT(R32_SINT,    32_SINT,  R32_SINT, WZYX),
-       V_(R32_USCALED, 32_UINT,  NONE,     WZYX),
-       V_(R32_SSCALED, 32_SINT,  NONE,     WZYX),
-       VT(R32_FLOAT,   32_FLOAT, R32_FLOAT,WZYX),
-       V_(R32_FIXED,   32_FIXED, NONE,     WZYX),
-
-       _T(A32_UINT,    32_UINT,  NONE,     WZYX),
-       _T(A32_SINT,    32_SINT,  NONE,     WZYX),
-       _T(L32_UINT,    32_UINT,  NONE,     WZYX),
-       _T(L32_SINT,    32_SINT,  NONE,     WZYX),
-       _T(I32_UINT,    32_UINT,  NONE,     WZYX),
-       _T(I32_SINT,    32_SINT,  NONE,     WZYX),
-
-       VT(R16G16_UNORM,   16_16_UNORM, R16G16_UNORM, WZYX),
-       VT(R16G16_SNORM,   16_16_SNORM, R16G16_SNORM, WZYX),
-       VT(R16G16_UINT,    16_16_UINT,  R16G16_UINT,  WZYX),
-       VT(R16G16_SINT,    16_16_SINT,  R16G16_SINT,  WZYX),
-       VT(R16G16_USCALED, 16_16_UINT,  NONE,         WZYX),
-       VT(R16G16_SSCALED, 16_16_SINT,  NONE,         WZYX),
-       VT(R16G16_FLOAT,   16_16_FLOAT, R16G16_FLOAT, WZYX),
-
-       _T(L16A16_UNORM,   16_16_UNORM, NONE,         WZYX),
-       _T(L16A16_SNORM,   16_16_SNORM, NONE,         WZYX),
-       _T(L16A16_UINT,    16_16_UINT,  NONE,         WZYX),
-       _T(L16A16_SINT,    16_16_SINT,  NONE,         WZYX),
-
-       VT(R8G8B8A8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX),
-       _T(R8G8B8X8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, WZYX),
-       _T(R8G8B8A8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX),
-       _T(R8G8B8X8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, WZYX),
-       VT(R8G8B8A8_SNORM,   8_8_8_8_SNORM, R8G8B8A8_SNORM, WZYX),
-       VT(R8G8B8A8_UINT,    8_8_8_8_UINT,  R8G8B8A8_UINT,  WZYX),
-       VT(R8G8B8A8_SINT,    8_8_8_8_SINT,  R8G8B8A8_SINT,  WZYX),
-       V_(R8G8B8A8_USCALED, 8_8_8_8_UINT,  NONE,           WZYX),
-       V_(R8G8B8A8_SSCALED, 8_8_8_8_SINT,  NONE,           WZYX),
-
-       VT(B8G8R8A8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, WXYZ),
-       _T(B8G8R8X8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, WXYZ),
-       VT(B8G8R8A8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, WXYZ),
-       _T(B8G8R8X8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, WXYZ),
-
-       VT(A8B8G8R8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, XYZW),
-       _T(X8B8G8R8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, XYZW),
-       _T(A8B8G8R8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, XYZW),
-       _T(X8B8G8R8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, XYZW),
-
-       VT(A8R8G8B8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, ZYXW),
-       _T(X8R8G8B8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, ZYXW),
-       _T(A8R8G8B8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, ZYXW),
-       _T(X8R8G8B8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, ZYXW),
-
-       VT(R10G10B10A2_UNORM,   10_10_10_2_UNORM, R10G10B10A2_UNORM, WZYX),
-       VT(B10G10R10A2_UNORM,   10_10_10_2_UNORM, R10G10B10A2_UNORM, WXYZ),
-       _T(B10G10R10X2_UNORM,   10_10_10_2_UNORM, R10G10B10A2_UNORM, WXYZ),
-       V_(R10G10B10A2_SNORM,   10_10_10_2_SNORM, NONE,              WZYX),
-       V_(B10G10R10A2_SNORM,   10_10_10_2_SNORM, NONE,              WXYZ),
-       VT(R10G10B10A2_UINT,    10_10_10_2_UINT,  R10G10B10A2_UINT,  WZYX),
-       VT(B10G10R10A2_UINT,    10_10_10_2_UINT,  R10G10B10A2_UINT,  WXYZ),
-       V_(R10G10B10A2_USCALED, 10_10_10_2_UINT,  NONE,              WZYX),
-       V_(B10G10R10A2_USCALED, 10_10_10_2_UINT,  NONE,              WXYZ),
-       V_(R10G10B10A2_SSCALED, 10_10_10_2_SINT,  NONE,              WZYX),
-       V_(B10G10R10A2_SSCALED, 10_10_10_2_SINT,  NONE,              WXYZ),
-
-       VT(R11G11B10_FLOAT, 11_11_10_FLOAT, R11G11B10_FLOAT, WZYX),
-       _T(R9G9B9E5_FLOAT,  9_9_9_E5_FLOAT, NONE,            WZYX),
-
-       _T(Z24X8_UNORM,          X8Z24_UNORM,       Z24_UNORM_S8_UINT, WZYX),
-       _T(X24S8_UINT,           8_8_8_8_UINT,      Z24_UNORM_S8_UINT, WZYX),
-       _T(Z24_UNORM_S8_UINT,    X8Z24_UNORM,       Z24_UNORM_S8_UINT, WZYX),
-       _T(Z32_FLOAT,            32_FLOAT,          R32_FLOAT,         WZYX),
-       _T(Z32_FLOAT_S8X24_UINT, 32_FLOAT,          R32_FLOAT,         WZYX),
-       _T(X32_S8X24_UINT,       8_UINT,            R8_UINT,           WZYX),
+       VTC(R32_UINT,    32_UINT,                    WZYX),
+       VTC(R32_SINT,    32_SINT,                    WZYX),
+       V__(R32_USCALED, 32_UINT,                    WZYX),
+       V__(R32_SSCALED, 32_SINT,                    WZYX),
+       VTC(R32_FLOAT,   32_FLOAT,                   WZYX),
+       V__(R32_FIXED,   32_FIXED,                   WZYX),
+
+       _T_(A32_UINT,    32_UINT,                    WZYX),
+       _T_(A32_SINT,    32_SINT,                    WZYX),
+       _T_(L32_UINT,    32_UINT,                    WZYX),
+       _T_(L32_SINT,    32_SINT,                    WZYX),
+       _T_(I32_UINT,    32_UINT,                    WZYX),
+       _T_(I32_SINT,    32_SINT,                    WZYX),
+
+       VTC(R16G16_UNORM,   16_16_UNORM,             WZYX),
+       VTC(R16G16_SNORM,   16_16_SNORM,             WZYX),
+       VTC(R16G16_UINT,    16_16_UINT,              WZYX),
+       VTC(R16G16_SINT,    16_16_SINT,              WZYX),
+       VT_(R16G16_USCALED, 16_16_UINT,              WZYX),
+       VT_(R16G16_SSCALED, 16_16_SINT,              WZYX),
+       VTC(R16G16_FLOAT,   16_16_FLOAT,             WZYX),
+
+       _T_(L16A16_UNORM,   16_16_UNORM,             WZYX),
+       _T_(L16A16_SNORM,   16_16_SNORM,             WZYX),
+       _T_(L16A16_UINT,    16_16_UINT,              WZYX),
+       _T_(L16A16_SINT,    16_16_SINT,              WZYX),
+
+       VTC(R8G8B8A8_UNORM,   8_8_8_8_UNORM,         WZYX),
+       _TC(R8G8B8X8_UNORM,   8_8_8_8_UNORM,         WZYX),
+       _TC(R8G8B8A8_SRGB,    8_8_8_8_UNORM,         WZYX),
+       _TC(R8G8B8X8_SRGB,    8_8_8_8_UNORM,         WZYX),
+       VTC(R8G8B8A8_SNORM,   8_8_8_8_SNORM,         WZYX),
+       VTC(R8G8B8A8_UINT,    8_8_8_8_UINT,          WZYX),
+       VTC(R8G8B8A8_SINT,    8_8_8_8_SINT,          WZYX),
+       V__(R8G8B8A8_USCALED, 8_8_8_8_UINT,          WZYX),
+       V__(R8G8B8A8_SSCALED, 8_8_8_8_SINT,          WZYX),
+
+       VTC(B8G8R8A8_UNORM,   8_8_8_8_UNORM,         WXYZ),
+       _TC(B8G8R8X8_UNORM,   8_8_8_8_UNORM,         WXYZ),
+       VTC(B8G8R8A8_SRGB,    8_8_8_8_UNORM,         WXYZ),
+       _TC(B8G8R8X8_SRGB,    8_8_8_8_UNORM,         WXYZ),
+
+       VTC(A8B8G8R8_UNORM,   8_8_8_8_UNORM,         XYZW),
+       _TC(X8B8G8R8_UNORM,   8_8_8_8_UNORM,         XYZW),
+       _TC(A8B8G8R8_SRGB,    8_8_8_8_UNORM,         XYZW),
+       _TC(X8B8G8R8_SRGB,    8_8_8_8_UNORM,         XYZW),
+
+       VTC(A8R8G8B8_UNORM,   8_8_8_8_UNORM,         ZYXW),
+       _TC(X8R8G8B8_UNORM,   8_8_8_8_UNORM,         ZYXW),
+       _TC(A8R8G8B8_SRGB,    8_8_8_8_UNORM,         ZYXW),
+       _TC(X8R8G8B8_SRGB,    8_8_8_8_UNORM,         ZYXW),
+
+       FMT(R10G10B10A2_UNORM, 10_10_10_2_UNORM, 10_10_10_2_UNORM, 10_10_10_2_UNORM_DEST, WZYX),
+       FMT(B10G10R10A2_UNORM, 10_10_10_2_UNORM, 10_10_10_2_UNORM, 10_10_10_2_UNORM_DEST, WXYZ),
+       FMT(B10G10R10X2_UNORM, NONE,             10_10_10_2_UNORM, 10_10_10_2_UNORM_DEST, WXYZ),
+       V__(R10G10B10A2_SNORM,   10_10_10_2_SNORM,   WZYX),
+       V__(B10G10R10A2_SNORM,   10_10_10_2_SNORM,   WXYZ),
+       VTC(R10G10B10A2_UINT,    10_10_10_2_UINT,    WZYX),
+       VTC(B10G10R10A2_UINT,    10_10_10_2_UINT,    WXYZ),
+       V__(R10G10B10A2_USCALED, 10_10_10_2_UINT,    WZYX),
+       V__(B10G10R10A2_USCALED, 10_10_10_2_UINT,    WXYZ),
+       V__(R10G10B10A2_SSCALED, 10_10_10_2_SINT,    WZYX),
+       V__(B10G10R10A2_SSCALED, 10_10_10_2_SINT,    WXYZ),
+
+       VTC(R11G11B10_FLOAT, 11_11_10_FLOAT,         WZYX),
+       _T_(R9G9B9E5_FLOAT,  9_9_9_E5_FLOAT,         WZYX),
+
+       _TC(Z24X8_UNORM,          Z24_UNORM_S8_UINT, WZYX),
+       _TC(X24S8_UINT,           8_8_8_8_UINT,      WZYX),
+       _TC(Z24_UNORM_S8_UINT,    Z24_UNORM_S8_UINT, WZYX),
+       _TC(Z32_FLOAT,            32_FLOAT,          WZYX),
+       _TC(Z32_FLOAT_S8X24_UINT, 32_FLOAT,          WZYX),
+       _TC(X32_S8X24_UINT,       8_UINT,            WZYX),
 
        /* special format for blits: */
-       _T(Z24_UNORM_S8_UINT_AS_R8G8B8A8, Z24_UNORM_S8_UINT,  Z24_UNORM_S8_UINT_AS_R8G8B8A8,   WZYX),
+       _TC(Z24_UNORM_S8_UINT_AS_R8G8B8A8, Z24_UNORM_S8_UINT, WZYX),
 
        /* 48-bit */
-       V_(R16G16B16_UNORM,   16_16_16_UNORM, NONE, WZYX),
-       V_(R16G16B16_SNORM,   16_16_16_SNORM, NONE, WZYX),
-       V_(R16G16B16_UINT,    16_16_16_UINT,  NONE, WZYX),
-       V_(R16G16B16_SINT,    16_16_16_SINT,  NONE, WZYX),
-       V_(R16G16B16_USCALED, 16_16_16_UINT,  NONE, WZYX),
-       V_(R16G16B16_SSCALED, 16_16_16_SINT,  NONE, WZYX),
-       V_(R16G16B16_FLOAT,   16_16_16_FLOAT, NONE, WZYX),
+       V__(R16G16B16_UNORM,   16_16_16_UNORM,       WZYX),
+       V__(R16G16B16_SNORM,   16_16_16_SNORM,       WZYX),
+       V__(R16G16B16_UINT,    16_16_16_UINT,        WZYX),
+       V__(R16G16B16_SINT,    16_16_16_SINT,        WZYX),
+       V__(R16G16B16_USCALED, 16_16_16_UINT,        WZYX),
+       V__(R16G16B16_SSCALED, 16_16_16_SINT,        WZYX),
+       V__(R16G16B16_FLOAT,   16_16_16_FLOAT,       WZYX),
 
        /* 64-bit */
-       VT(R16G16B16A16_UNORM,   16_16_16_16_UNORM, R16G16B16A16_UNORM, WZYX),
-       VT(R16G16B16X16_UNORM,   16_16_16_16_UNORM, R16G16B16A16_UNORM, WZYX),
-       VT(R16G16B16A16_SNORM,   16_16_16_16_SNORM, R16G16B16A16_SNORM, WZYX),
-       VT(R16G16B16X16_SNORM,   16_16_16_16_SNORM, R16G16B16A16_SNORM, WZYX),
-       VT(R16G16B16A16_UINT,    16_16_16_16_UINT,  R16G16B16A16_UINT,  WZYX),
-       VT(R16G16B16X16_UINT,    16_16_16_16_UINT,  R16G16B16A16_UINT,  WZYX),
-       VT(R16G16B16A16_SINT,    16_16_16_16_SINT,  R16G16B16A16_SINT,  WZYX),
-       VT(R16G16B16X16_SINT,    16_16_16_16_SINT,  R16G16B16A16_SINT,  WZYX),
-       VT(R16G16B16A16_USCALED, 16_16_16_16_UINT,  NONE,               WZYX),
-       VT(R16G16B16A16_SSCALED, 16_16_16_16_SINT,  NONE,               WZYX),
-       VT(R16G16B16A16_FLOAT,   16_16_16_16_FLOAT, R16G16B16A16_FLOAT, WZYX),
-       VT(R16G16B16X16_FLOAT,   16_16_16_16_FLOAT, R16G16B16A16_FLOAT, WZYX),
-
-       VT(R32G32_UINT,    32_32_UINT,  R32G32_UINT, WZYX),
-       VT(R32G32_SINT,    32_32_SINT,  R32G32_SINT, WZYX),
-       V_(R32G32_USCALED, 32_32_UINT,  NONE,        WZYX),
-       V_(R32G32_SSCALED, 32_32_SINT,  NONE,        WZYX),
-       VT(R32G32_FLOAT,   32_32_FLOAT, R32G32_FLOAT,WZYX),
-       V_(R32G32_FIXED,   32_32_FIXED, NONE,        WZYX),
-
-       _T(L32A32_UINT,    32_32_UINT,  NONE,        WZYX),
-       _T(L32A32_SINT,    32_32_SINT,  NONE,        WZYX),
+       VTC(R16G16B16A16_UNORM,   16_16_16_16_UNORM, WZYX),
+       VTC(R16G16B16X16_UNORM,   16_16_16_16_UNORM, WZYX),
+       VTC(R16G16B16A16_SNORM,   16_16_16_16_SNORM, WZYX),
+       VTC(R16G16B16X16_SNORM,   16_16_16_16_SNORM, WZYX),
+       VTC(R16G16B16A16_UINT,    16_16_16_16_UINT,  WZYX),
+       VTC(R16G16B16X16_UINT,    16_16_16_16_UINT,  WZYX),
+       VTC(R16G16B16A16_SINT,    16_16_16_16_SINT,  WZYX),
+       VTC(R16G16B16X16_SINT,    16_16_16_16_SINT,  WZYX),
+       VT_(R16G16B16A16_USCALED, 16_16_16_16_UINT,  WZYX),
+       VT_(R16G16B16A16_SSCALED, 16_16_16_16_SINT,  WZYX),
+       VTC(R16G16B16A16_FLOAT,   16_16_16_16_FLOAT, WZYX),
+       VTC(R16G16B16X16_FLOAT,   16_16_16_16_FLOAT, WZYX),
+
+       VTC(R32G32_UINT,    32_32_UINT,              WZYX),
+       VTC(R32G32_SINT,    32_32_SINT,              WZYX),
+       V__(R32G32_USCALED, 32_32_UINT,              WZYX),
+       V__(R32G32_SSCALED, 32_32_SINT,              WZYX),
+       VTC(R32G32_FLOAT,   32_32_FLOAT,             WZYX),
+       V__(R32G32_FIXED,   32_32_FIXED,             WZYX),
+
+       _T_(L32A32_UINT,    32_32_UINT,              WZYX),
+       _T_(L32A32_SINT,    32_32_SINT,              WZYX),
 
        /* 96-bit */
-       VT(R32G32B32_UINT,    32_32_32_UINT,  NONE, WZYX),
-       VT(R32G32B32_SINT,    32_32_32_SINT,  NONE, WZYX),
-       V_(R32G32B32_USCALED, 32_32_32_UINT,  NONE, WZYX),
-       V_(R32G32B32_SSCALED, 32_32_32_SINT,  NONE, WZYX),
-       VT(R32G32B32_FLOAT,   32_32_32_FLOAT, NONE, WZYX),
-       V_(R32G32B32_FIXED,   32_32_32_FIXED, NONE, WZYX),
+       VT_(R32G32B32_UINT,    32_32_32_UINT,        WZYX),
+       VT_(R32G32B32_SINT,    32_32_32_SINT,        WZYX),
+       V__(R32G32B32_USCALED, 32_32_32_UINT,        WZYX),
+       V__(R32G32B32_SSCALED, 32_32_32_SINT,        WZYX),
+       VT_(R32G32B32_FLOAT,   32_32_32_FLOAT,       WZYX),
+       V__(R32G32B32_FIXED,   32_32_32_FIXED,       WZYX),
 
        /* 128-bit */
-       VT(R32G32B32A32_UINT,    32_32_32_32_UINT,  R32G32B32A32_UINT,  WZYX),
-       _T(R32G32B32X32_UINT,    32_32_32_32_UINT,  R32G32B32A32_UINT,  WZYX),
-       VT(R32G32B32A32_SINT,    32_32_32_32_SINT,  R32G32B32A32_SINT,  WZYX),
-       _T(R32G32B32X32_SINT,    32_32_32_32_SINT,  R32G32B32A32_SINT,  WZYX),
-       V_(R32G32B32A32_USCALED, 32_32_32_32_UINT,  NONE,               WZYX),
-       V_(R32G32B32A32_SSCALED, 32_32_32_32_SINT,  NONE,               WZYX),
-       VT(R32G32B32A32_FLOAT,   32_32_32_32_FLOAT, R32G32B32A32_FLOAT, WZYX),
-       _T(R32G32B32X32_FLOAT,   32_32_32_32_FLOAT, R32G32B32A32_FLOAT, WZYX),
-       V_(R32G32B32A32_FIXED,   32_32_32_32_FIXED, NONE,               WZYX),
+       VTC(R32G32B32A32_UINT,    32_32_32_32_UINT,  WZYX),
+       _TC(R32G32B32X32_UINT,    32_32_32_32_UINT,  WZYX),
+       VTC(R32G32B32A32_SINT,    32_32_32_32_SINT,  WZYX),
+       _TC(R32G32B32X32_SINT,    32_32_32_32_SINT,  WZYX),
+       V__(R32G32B32A32_USCALED, 32_32_32_32_UINT,  WZYX),
+       V__(R32G32B32A32_SSCALED, 32_32_32_32_SINT,  WZYX),
+       VTC(R32G32B32A32_FLOAT,   32_32_32_32_FLOAT, WZYX),
+       _TC(R32G32B32X32_FLOAT,   32_32_32_32_FLOAT, WZYX),
+       V__(R32G32B32A32_FIXED,   32_32_32_32_FIXED, WZYX),
 
        /* compressed */
-       _T(ETC1_RGB8, ETC1, NONE, WZYX),
-       _T(ETC2_RGB8, ETC2_RGB8, NONE, WZYX),
-       _T(ETC2_SRGB8, ETC2_RGB8, NONE, WZYX),
-       _T(ETC2_RGB8A1, ETC2_RGB8A1, NONE, WZYX),
-       _T(ETC2_SRGB8A1, ETC2_RGB8A1, NONE, WZYX),
-       _T(ETC2_RGBA8, ETC2_RGBA8, NONE, WZYX),
-       _T(ETC2_SRGBA8, ETC2_RGBA8, NONE, WZYX),
-       _T(ETC2_R11_UNORM, ETC2_R11_UNORM, NONE, WZYX),
-       _T(ETC2_R11_SNORM, ETC2_R11_SNORM, NONE, WZYX),
-       _T(ETC2_RG11_UNORM, ETC2_RG11_UNORM, NONE, WZYX),
-       _T(ETC2_RG11_SNORM, ETC2_RG11_SNORM, NONE, WZYX),
-
-       _T(DXT1_RGB,   DXT1, NONE, WZYX),
-       _T(DXT1_SRGB,  DXT1, NONE, WZYX),
-       _T(DXT1_RGBA,  DXT1, NONE, WZYX),
-       _T(DXT1_SRGBA, DXT1, NONE, WZYX),
-       _T(DXT3_RGBA,  DXT3, NONE, WZYX),
-       _T(DXT3_SRGBA, DXT3, NONE, WZYX),
-       _T(DXT5_RGBA,  DXT5, NONE, WZYX),
-       _T(DXT5_SRGBA, DXT5, NONE, WZYX),
-
-       _T(BPTC_RGBA_UNORM, BPTC,        NONE, WZYX),
-       _T(BPTC_SRGBA,      BPTC,        NONE, WZYX),
-       _T(BPTC_RGB_FLOAT,  BPTC_FLOAT,  NONE, WZYX),
-       _T(BPTC_RGB_UFLOAT, BPTC_UFLOAT, NONE, WZYX),
-
-       _T(RGTC1_UNORM, RGTC1_UNORM, NONE, WZYX),
-       _T(RGTC1_SNORM, RGTC1_SNORM, NONE, WZYX),
-       _T(RGTC2_UNORM, RGTC2_UNORM, NONE, WZYX),
-       _T(RGTC2_SNORM, RGTC2_SNORM, NONE, WZYX),
-       _T(LATC1_UNORM, RGTC1_UNORM, NONE, WZYX),
-       _T(LATC1_SNORM, RGTC1_SNORM, NONE, WZYX),
-       _T(LATC2_UNORM, RGTC2_UNORM, NONE, WZYX),
-       _T(LATC2_SNORM, RGTC2_SNORM, NONE, WZYX),
-
-       _T(ASTC_4x4,   ASTC_4x4,   NONE, WZYX),
-       _T(ASTC_5x4,   ASTC_5x4,   NONE, WZYX),
-       _T(ASTC_5x5,   ASTC_5x5,   NONE, WZYX),
-       _T(ASTC_6x5,   ASTC_6x5,   NONE, WZYX),
-       _T(ASTC_6x6,   ASTC_6x6,   NONE, WZYX),
-       _T(ASTC_8x5,   ASTC_8x5,   NONE, WZYX),
-       _T(ASTC_8x6,   ASTC_8x6,   NONE, WZYX),
-       _T(ASTC_8x8,   ASTC_8x8,   NONE, WZYX),
-       _T(ASTC_10x5,  ASTC_10x5,  NONE, WZYX),
-       _T(ASTC_10x6,  ASTC_10x6,  NONE, WZYX),
-       _T(ASTC_10x8,  ASTC_10x8,  NONE, WZYX),
-       _T(ASTC_10x10, ASTC_10x10, NONE, WZYX),
-       _T(ASTC_12x10, ASTC_12x10, NONE, WZYX),
-       _T(ASTC_12x12, ASTC_12x12, NONE, WZYX),
-
-       _T(ASTC_4x4_SRGB,   ASTC_4x4,   NONE, WZYX),
-       _T(ASTC_5x4_SRGB,   ASTC_5x4,   NONE, WZYX),
-       _T(ASTC_5x5_SRGB,   ASTC_5x5,   NONE, WZYX),
-       _T(ASTC_6x5_SRGB,   ASTC_6x5,   NONE, WZYX),
-       _T(ASTC_6x6_SRGB,   ASTC_6x6,   NONE, WZYX),
-       _T(ASTC_8x5_SRGB,   ASTC_8x5,   NONE, WZYX),
-       _T(ASTC_8x6_SRGB,   ASTC_8x6,   NONE, WZYX),
-       _T(ASTC_8x8_SRGB,   ASTC_8x8,   NONE, WZYX),
-       _T(ASTC_10x5_SRGB,  ASTC_10x5,  NONE, WZYX),
-       _T(ASTC_10x6_SRGB,  ASTC_10x6,  NONE, WZYX),
-       _T(ASTC_10x8_SRGB,  ASTC_10x8,  NONE, WZYX),
-       _T(ASTC_10x10_SRGB, ASTC_10x10, NONE, WZYX),
-       _T(ASTC_12x10_SRGB, ASTC_12x10, NONE, WZYX),
-       _T(ASTC_12x12_SRGB, ASTC_12x12, NONE, WZYX),
+       _T_(ETC1_RGB8, ETC1,                         WZYX),
+       _T_(ETC2_RGB8, ETC2_RGB8,                    WZYX),
+       _T_(ETC2_SRGB8, ETC2_RGB8,                   WZYX),
+       _T_(ETC2_RGB8A1, ETC2_RGB8A1,                WZYX),
+       _T_(ETC2_SRGB8A1, ETC2_RGB8A1,               WZYX),
+       _T_(ETC2_RGBA8, ETC2_RGBA8,                  WZYX),
+       _T_(ETC2_SRGBA8, ETC2_RGBA8,                 WZYX),
+       _T_(ETC2_R11_UNORM, ETC2_R11_UNORM,          WZYX),
+       _T_(ETC2_R11_SNORM, ETC2_R11_SNORM,          WZYX),
+       _T_(ETC2_RG11_UNORM, ETC2_RG11_UNORM,        WZYX),
+       _T_(ETC2_RG11_SNORM, ETC2_RG11_SNORM,        WZYX),
+
+       _T_(DXT1_RGB,   DXT1,                        WZYX),
+       _T_(DXT1_SRGB,  DXT1,                        WZYX),
+       _T_(DXT1_RGBA,  DXT1,                        WZYX),
+       _T_(DXT1_SRGBA, DXT1,                        WZYX),
+       _T_(DXT3_RGBA,  DXT3,                        WZYX),
+       _T_(DXT3_SRGBA, DXT3,                        WZYX),
+       _T_(DXT5_RGBA,  DXT5,                        WZYX),
+       _T_(DXT5_SRGBA, DXT5,                        WZYX),
+
+       _T_(BPTC_RGBA_UNORM, BPTC,                   WZYX),
+       _T_(BPTC_SRGBA,      BPTC,                   WZYX),
+       _T_(BPTC_RGB_FLOAT,  BPTC_FLOAT,             WZYX),
+       _T_(BPTC_RGB_UFLOAT, BPTC_UFLOAT,            WZYX),
+
+       _T_(RGTC1_UNORM, RGTC1_UNORM,                WZYX),
+       _T_(RGTC1_SNORM, RGTC1_SNORM,                WZYX),
+       _T_(RGTC2_UNORM, RGTC2_UNORM,                WZYX),
+       _T_(RGTC2_SNORM, RGTC2_SNORM,                WZYX),
+       _T_(LATC1_UNORM, RGTC1_UNORM,                WZYX),
+       _T_(LATC1_SNORM, RGTC1_SNORM,                WZYX),
+       _T_(LATC2_UNORM, RGTC2_UNORM,                WZYX),
+       _T_(LATC2_SNORM, RGTC2_SNORM,                WZYX),
+
+       _T_(ASTC_4x4,   ASTC_4x4,                    WZYX),
+       _T_(ASTC_5x4,   ASTC_5x4,                    WZYX),
+       _T_(ASTC_5x5,   ASTC_5x5,                    WZYX),
+       _T_(ASTC_6x5,   ASTC_6x5,                    WZYX),
+       _T_(ASTC_6x6,   ASTC_6x6,                    WZYX),
+       _T_(ASTC_8x5,   ASTC_8x5,                    WZYX),
+       _T_(ASTC_8x6,   ASTC_8x6,                    WZYX),
+       _T_(ASTC_8x8,   ASTC_8x8,                    WZYX),
+       _T_(ASTC_10x5,  ASTC_10x5,                   WZYX),
+       _T_(ASTC_10x6,  ASTC_10x6,                   WZYX),
+       _T_(ASTC_10x8,  ASTC_10x8,                   WZYX),
+       _T_(ASTC_10x10, ASTC_10x10,                  WZYX),
+       _T_(ASTC_12x10, ASTC_12x10,                  WZYX),
+       _T_(ASTC_12x12, ASTC_12x12,                  WZYX),
+
+       _T_(ASTC_4x4_SRGB,   ASTC_4x4,               WZYX),
+       _T_(ASTC_5x4_SRGB,   ASTC_5x4,               WZYX),
+       _T_(ASTC_5x5_SRGB,   ASTC_5x5,               WZYX),
+       _T_(ASTC_6x5_SRGB,   ASTC_6x5,               WZYX),
+       _T_(ASTC_6x6_SRGB,   ASTC_6x6,               WZYX),
+       _T_(ASTC_8x5_SRGB,   ASTC_8x5,               WZYX),
+       _T_(ASTC_8x6_SRGB,   ASTC_8x6,               WZYX),
+       _T_(ASTC_8x8_SRGB,   ASTC_8x8,               WZYX),
+       _T_(ASTC_10x5_SRGB,  ASTC_10x5,              WZYX),
+       _T_(ASTC_10x6_SRGB,  ASTC_10x6,              WZYX),
+       _T_(ASTC_10x8_SRGB,  ASTC_10x8,              WZYX),
+       _T_(ASTC_10x10_SRGB, ASTC_10x10,             WZYX),
+       _T_(ASTC_12x10_SRGB, ASTC_12x10,             WZYX),
+       _T_(ASTC_12x12_SRGB, ASTC_12x12,             WZYX),
 };
 
 /* convert pipe format to vertex buffer format: */
-enum a6xx_vtx_fmt
+enum a6xx_format
 fd6_pipe2vtx(enum pipe_format format)
 {
        if (!formats[format].present)
@@ -354,7 +338,7 @@ fd6_pipe2vtx(enum pipe_format format)
 }
 
 /* convert pipe format to texture sampler format: */
-enum a6xx_tex_fmt
+enum a6xx_format
 fd6_pipe2tex(enum pipe_format format)
 {
        if (!formats[format].present)
@@ -363,7 +347,7 @@ fd6_pipe2tex(enum pipe_format format)
 }
 
 /* convert pipe format to MRT / copydest format used for render-target: */
-enum a6xx_color_fmt
+enum a6xx_format
 fd6_pipe2color(enum pipe_format format)
 {
        if (!formats[format].present)
index 5f84f9958d6021bdbc84c5453ebe94050ad6499c..ef8818f233f165f61557d722ac295b47a4343a16 100644 (file)
@@ -33,9 +33,9 @@
 
 #include "a6xx.xml.h"
 
-enum a6xx_vtx_fmt fd6_pipe2vtx(enum pipe_format format);
-enum a6xx_tex_fmt fd6_pipe2tex(enum pipe_format format);
-enum a6xx_color_fmt fd6_pipe2color(enum pipe_format format);
+enum a6xx_format fd6_pipe2vtx(enum pipe_format format);
+enum a6xx_format fd6_pipe2tex(enum pipe_format format);
+enum a6xx_format fd6_pipe2color(enum pipe_format format);
 enum a3xx_color_swap fd6_pipe2swap(enum pipe_format format);
 enum a6xx_tex_fetchsize fd6_pipe2fetchsize(enum pipe_format format);
 enum a6xx_depth_format fd6_pipe2depth(enum pipe_format format);
@@ -51,67 +51,67 @@ uint32_t fd6_tex_const_0(struct pipe_resource *prsc,
                                          unsigned swizzle_b, unsigned swizzle_a);
 
 static inline enum a6xx_2d_ifmt
-fd6_ifmt(enum a6xx_color_fmt fmt)
+fd6_ifmt(enum a6xx_format fmt)
 {
        switch (fmt) {
-       case RB6_A8_UNORM:
-       case RB6_R8_UNORM:
-       case RB6_R8_SNORM:
-       case RB6_R8G8_UNORM:
-       case RB6_R8G8_SNORM:
-       case RB6_R8G8B8A8_UNORM:
-       case RB6_R8G8B8X8_UNORM:
-       case RB6_R8G8B8A8_SNORM:
+       case FMT6_A8_UNORM:
+       case FMT6_8_UNORM:
+       case FMT6_8_SNORM:
+       case FMT6_8_8_UNORM:
+       case FMT6_8_8_SNORM:
+       case FMT6_8_8_8_8_UNORM:
+       case FMT6_8_8_8_X8_UNORM:
+       case FMT6_8_8_8_8_SNORM:
                return R2D_UNORM8;
 
-       case RB6_R32_UINT:
-       case RB6_R32_SINT:
-       case RB6_R32G32_UINT:
-       case RB6_R32G32_SINT:
-       case RB6_R32G32B32A32_UINT:
-       case RB6_R32G32B32A32_SINT:
+       case FMT6_32_UINT:
+       case FMT6_32_SINT:
+       case FMT6_32_32_UINT:
+       case FMT6_32_32_SINT:
+       case FMT6_32_32_32_32_UINT:
+       case FMT6_32_32_32_32_SINT:
                return R2D_INT32;
 
-       case RB6_R16_UINT:
-       case RB6_R16_SINT:
-       case RB6_R16G16_UINT:
-       case RB6_R16G16_SINT:
-       case RB6_R16G16B16A16_UINT:
-       case RB6_R16G16B16A16_SINT:
+       case FMT6_16_UINT:
+       case FMT6_16_SINT:
+       case FMT6_16_16_UINT:
+       case FMT6_16_16_SINT:
+       case FMT6_16_16_16_16_UINT:
+       case FMT6_16_16_16_16_SINT:
                return R2D_INT16;
 
-       case RB6_R8_UINT:
-       case RB6_R8_SINT:
-       case RB6_R8G8_UINT:
-       case RB6_R8G8_SINT:
-       case RB6_R8G8B8A8_UINT:
-       case RB6_R8G8B8A8_SINT:
+       case FMT6_8_UINT:
+       case FMT6_8_SINT:
+       case FMT6_8_8_UINT:
+       case FMT6_8_8_SINT:
+       case FMT6_8_8_8_8_UINT:
+       case FMT6_8_8_8_8_SINT:
                return R2D_INT8;
 
-       case RB6_R16_UNORM:
-       case RB6_R16_SNORM:
-       case RB6_R16G16_UNORM:
-       case RB6_R16G16_SNORM:
-       case RB6_R16G16B16A16_UNORM:
-       case RB6_R16G16B16A16_SNORM:
-       case RB6_R32_FLOAT:
-       case RB6_R32G32_FLOAT:
-       case RB6_R32G32B32A32_FLOAT:
+       case FMT6_16_UNORM:
+       case FMT6_16_SNORM:
+       case FMT6_16_16_UNORM:
+       case FMT6_16_16_SNORM:
+       case FMT6_16_16_16_16_UNORM:
+       case FMT6_16_16_16_16_SNORM:
+       case FMT6_32_FLOAT:
+       case FMT6_32_32_FLOAT:
+       case FMT6_32_32_32_32_FLOAT:
                return R2D_FLOAT32;
 
-       case RB6_R16_FLOAT:
-       case RB6_R16G16_FLOAT:
-       case RB6_R16G16B16A16_FLOAT:
-       case RB6_R11G11B10_FLOAT:
+       case FMT6_16_FLOAT:
+       case FMT6_16_16_FLOAT:
+       case FMT6_16_16_16_16_FLOAT:
+       case FMT6_11_11_10_FLOAT:
                return R2D_FLOAT16;
 
-       case RB6_R10G10B10A2_UNORM:
-       case RB6_R4G4B4A4_UNORM:
-       case RB6_R5G5B5A1_UNORM:
-       case RB6_R5G6B5_UNORM:
-       case RB6_R10G10B10A2_UINT:
-       case RB6_Z24_UNORM_S8_UINT:
-       case RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8:
+       case FMT6_10_10_10_2_UNORM_DEST:
+       case FMT6_4_4_4_4_UNORM:
+       case FMT6_5_5_5_1_UNORM:
+       case FMT6_5_6_5_UNORM:
+       case FMT6_10_10_10_2_UINT:
+       case FMT6_Z24_UNORM_S8_UINT:
+       case FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8:
                return R2D_RAW;
        default:
                unreachable("bad format");
index 11dc37922163aa5c130f81cecb8e220563388db1..37820614da393380206eefb9e9ec7883fc742b33 100644 (file)
@@ -80,7 +80,7 @@ emit_mrt(struct fd_ringbuffer *ring, struct pipe_framebuffer_state *pfb,
        unsigned type = 0;
 
        for (i = 0; i < pfb->nr_cbufs; i++) {
-               enum a6xx_color_fmt format = 0;
+               enum a6xx_format format = 0;
                enum a3xx_color_swap swap = WZYX;
                bool sint = false, uint = false;
                struct fd_resource *rsc = NULL;
@@ -957,7 +957,7 @@ emit_blit(struct fd_batch *batch,
 
        debug_assert(psurf->u.tex.first_layer == psurf->u.tex.last_layer);
 
-       enum a6xx_color_fmt format = fd6_pipe2color(pfmt);
+       enum a6xx_format format = fd6_pipe2color(pfmt);
        uint32_t stride = slice->pitch * rsc->layout.cpp;
        uint32_t size = slice->size0;
        enum a3xx_color_swap swap = fd6_resource_swap(rsc, pfmt);
@@ -1134,7 +1134,7 @@ emit_clears(struct fd_batch *batch, struct fd_ringbuffer *ring)
                OUT_PKT4(ring, REG_A6XX_RB_BLIT_DST_INFO, 1);
                OUT_RING(ring, A6XX_RB_BLIT_DST_INFO_TILE_MODE(TILE6_LINEAR) |
                                 A6XX_RB_BLIT_DST_INFO_SAMPLES(samples) |
-                                A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT(RB6_R8_UINT));
+                                A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT(FMT6_8_UINT));
 
                OUT_PKT4(ring, REG_A6XX_RB_BLIT_INFO, 1);
                OUT_RING(ring, A6XX_RB_BLIT_INFO_GMEM |
index 4e87e2e9c6e130735f7ac25089432be6953ead4b..6ac3cc5c4c9dc111b5a6c706d8b39e7bffad632e 100644 (file)
@@ -38,7 +38,7 @@
 struct fd6_image {
        struct pipe_resource *prsc;
        enum pipe_format pfmt;
-       enum a6xx_tex_fmt fmt;
+       enum a6xx_format fmt;
        enum a6xx_tex_fetchsize fetchsize;
        enum a6xx_tex_type type;
        bool srgb;
index 70ae26491794eae098f375a52209d69edfc35696..2018c3afdd9686539090d1babec826606d96dc0c 100644 (file)
@@ -59,32 +59,32 @@ ok_ubwc_format(struct fd_resource *rsc, enum pipe_format pfmt)
                return false;
 
        switch (fd6_pipe2color(pfmt)) {
-       case RB6_R10G10B10A2_UINT:
-       case RB6_R10G10B10A2_UNORM:
-       case RB6_R11G11B10_FLOAT:
-       case RB6_R16_FLOAT:
-       case RB6_R16G16B16A16_FLOAT:
-       case RB6_R16G16B16A16_SINT:
-       case RB6_R16G16B16A16_UINT:
-       case RB6_R16G16_FLOAT:
-       case RB6_R16G16_SINT:
-       case RB6_R16G16_UINT:
-       case RB6_R16_SINT:
-       case RB6_R16_UINT:
-       case RB6_R32G32B32A32_SINT:
-       case RB6_R32G32B32A32_UINT:
-       case RB6_R32G32_SINT:
-       case RB6_R32G32_UINT:
-       case RB6_R5G6B5_UNORM:
-       case RB6_R8G8B8A8_SINT:
-       case RB6_R8G8B8A8_UINT:
-       case RB6_R8G8B8A8_UNORM:
-       case RB6_R8G8B8X8_UNORM:
-       case RB6_R8G8_SINT:
-       case RB6_R8G8_UINT:
-       case RB6_R8G8_UNORM:
-       case RB6_Z24_UNORM_S8_UINT:
-       case RB6_Z24_UNORM_S8_UINT_AS_R8G8B8A8:
+       case FMT6_10_10_10_2_UINT:
+       case FMT6_10_10_10_2_UNORM_DEST:
+       case FMT6_11_11_10_FLOAT:
+       case FMT6_16_FLOAT:
+       case FMT6_16_16_16_16_FLOAT:
+       case FMT6_16_16_16_16_SINT:
+       case FMT6_16_16_16_16_UINT:
+       case FMT6_16_16_FLOAT:
+       case FMT6_16_16_SINT:
+       case FMT6_16_16_UINT:
+       case FMT6_16_SINT:
+       case FMT6_16_UINT:
+       case FMT6_32_32_32_32_SINT:
+       case FMT6_32_32_32_32_UINT:
+       case FMT6_32_32_SINT:
+       case FMT6_32_32_UINT:
+       case FMT6_5_6_5_UNORM:
+       case FMT6_8_8_8_8_SINT:
+       case FMT6_8_8_8_8_UINT:
+       case FMT6_8_8_8_8_UNORM:
+       case FMT6_8_8_8_X8_UNORM:
+       case FMT6_8_8_SINT:
+       case FMT6_8_8_UINT:
+       case FMT6_8_8_UNORM:
+       case FMT6_Z24_UNORM_S8_UINT:
+       case FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8:
                return true;
        default:
                return false;
index bf1f9680c7c1ee92095e2bc7c195db9237457c97..20383d4ff48ea8b2dafb7a99cb96b2f754585ab1 100644 (file)
@@ -77,12 +77,12 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
                return false;
 
        if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
-                       (fd6_pipe2vtx(format) != (enum a6xx_vtx_fmt)~0)) {
+                       (fd6_pipe2vtx(format) != (enum a6xx_format)~0)) {
                retval |= PIPE_BIND_VERTEX_BUFFER;
        }
 
        if ((usage & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SHADER_IMAGE)) &&
-                       (fd6_pipe2tex(format) != (enum a6xx_tex_fmt)~0) &&
+                       (fd6_pipe2tex(format) != (enum a6xx_format)~0) &&
                        (target == PIPE_BUFFER ||
                         util_format_get_blocksize(format) != 12)) {
                retval |= usage & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SHADER_IMAGE);
@@ -93,8 +93,8 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
                                PIPE_BIND_SCANOUT |
                                PIPE_BIND_SHARED |
                                PIPE_BIND_COMPUTE_RESOURCE)) &&
-                       (fd6_pipe2color(format) != (enum a6xx_color_fmt)~0) &&
-                       (fd6_pipe2tex(format) != (enum a6xx_tex_fmt)~0)) {
+                       (fd6_pipe2color(format) != (enum a6xx_format)~0) &&
+                       (fd6_pipe2tex(format) != (enum a6xx_format)~0)) {
                retval |= usage & (PIPE_BIND_RENDER_TARGET |
                                PIPE_BIND_DISPLAY_TARGET |
                                PIPE_BIND_SCANOUT |
@@ -109,7 +109,7 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
 
        if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
                        (fd6_pipe2depth(format) != (enum a6xx_depth_format)~0) &&
-                       (fd6_pipe2tex(format) != (enum a6xx_tex_fmt)~0)) {
+                       (fd6_pipe2tex(format) != (enum a6xx_format)~0)) {
                retval |= PIPE_BIND_DEPTH_STENCIL;
        }