radv: Implement VK_EXT_4444_formats

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6160>
This commit is contained in:
Joshua Ashton
2020-07-15 11:21:23 +01:00
parent 3c2a1af660
commit 8efdd388e0
4 changed files with 11 additions and 1 deletions

View File

@@ -23,4 +23,4 @@ RADV now uses ACO per default as backend
RADV_DEBUG=llvm option to enable LLVM backend for RADV RADV_DEBUG=llvm option to enable LLVM backend for RADV
VK_EXT_image_robustness for ANV VK_EXT_image_robustness for ANV
VK_EXT_shader_atomic_float on ANV VK_EXT_shader_atomic_float on ANV
VK_EXT_4444_formats on ANV VK_EXT_4444_formats on ANV and RADV.

View File

@@ -1378,6 +1378,13 @@ void radv_GetPhysicalDeviceFeatures2(
features->sparseImageFloat32AtomicAdd = false; features->sparseImageFloat32AtomicAdd = false;
break; break;
} }
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: {
VkPhysicalDevice4444FormatsFeaturesEXT *features =
(VkPhysicalDevice4444FormatsFeaturesEXT *)ext;
features->formatA4R4G4B4 = true;
features->formatA4B4G4R4 = true;
break;
}
default: default:
break; break;
} }

View File

@@ -187,6 +187,7 @@ EXTENSIONS = [
Extension('VK_GOOGLE_hlsl_functionality1', 1, True), Extension('VK_GOOGLE_hlsl_functionality1', 1, True),
Extension('VK_GOOGLE_user_type', 1, True), Extension('VK_GOOGLE_user_type', 1, True),
Extension('VK_NV_compute_shader_derivatives', 1, True), Extension('VK_NV_compute_shader_derivatives', 1, True),
Extension('VK_EXT_4444_formats', 1, True),
] ]
MAX_API_VERSION = VkVersion('0.0.0') MAX_API_VERSION = VkVersion('0.0.0')

View File

@@ -5,6 +5,8 @@ VK_FORMAT_UNDEFINED , plain, 1, 1, u8 , , , , x001
VK_FORMAT_R4G4_UNORM_PACK8 , plain, 1, 1, un4 , un4 , , , xy01, rgb VK_FORMAT_R4G4_UNORM_PACK8 , plain, 1, 1, un4 , un4 , , , xy01, rgb
VK_FORMAT_R4G4B4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wzyx, rgb VK_FORMAT_R4G4B4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wzyx, rgb
VK_FORMAT_B4G4R4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wxyz, rgb VK_FORMAT_B4G4R4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wxyz, rgb
VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT , plain, 1, 1, un4 , un4 , un4 , un4 , xyzw, rgb
VK_FORMAT_R5G6B5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb VK_FORMAT_R5G6B5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
VK_FORMAT_B5G6R5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , xyz1, rgb VK_FORMAT_B5G6R5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , xyz1, rgb
VK_FORMAT_R5G5B5A1_UNORM_PACK16 , plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb VK_FORMAT_R5G5B5A1_UNORM_PACK16 , plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb
1 /* this is pretty much taken from the gallium one. */
5 VK_FORMAT_B4G4R4A4_UNORM_PACK16 , plain, 1, 1, un4 , un4 , un4 , un4 , wxyz, rgb
6 VK_FORMAT_R5G6B5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
7 VK_FORMAT_B5G6R5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , xyz1, rgb VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT , plain, 1, 1, un4 , un4 , un4 , un4 , xyzw, rgb
8 VK_FORMAT_R5G6B5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
9 VK_FORMAT_B5G6R5_UNORM_PACK16 , plain, 1, 1, un5 , un6 , un5 , , xyz1, rgb
10 VK_FORMAT_R5G5B5A1_UNORM_PACK16 , plain, 1, 1, un1 , un5 , un5 , un5 , wzyx, rgb
11 VK_FORMAT_B5G5R5A1_UNORM_PACK16 , plain, 1, 1, un1 , un5 , un5 , un5 , wxyz, rgb
12 VK_FORMAT_A1R5G5B5_UNORM_PACK16 , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb