radv: Implement VK_EXT_4444_formats
authorJoshua Ashton <joshua@froggi.es>
Wed, 15 Jul 2020 10:21:23 +0000 (11:21 +0100)
committerJoshua Ashton <joshua@froggi.es>
Mon, 3 Aug 2020 18:27:37 +0000 (19:27 +0100)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6160>

docs/relnotes/new_features.txt
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/vk_format_layout.csv

index 363ffbb0299944a335b60917827b961fd8cffc4d..6c93106a527d77d215ea39f258de93e87d523527 100644 (file)
@@ -23,4 +23,4 @@ RADV now uses ACO per default as backend
 RADV_DEBUG=llvm option to enable LLVM backend for RADV
 VK_EXT_image_robustness for ANV
 VK_EXT_shader_atomic_float on ANV
-VK_EXT_4444_formats on ANV
+VK_EXT_4444_formats on ANV and RADV.
index 2e9cf32aa4b11f992667b998c497f7b35b173c45..a237a1a19bb64897f8b7f0bf2f061fd7fb6cbeb1 100644 (file)
@@ -1378,6 +1378,13 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->sparseImageFloat32AtomicAdd = false;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: {
+                       VkPhysicalDevice4444FormatsFeaturesEXT *features =
+                               (VkPhysicalDevice4444FormatsFeaturesEXT *)ext;
+                       features->formatA4R4G4B4 = true;
+                       features->formatA4B4G4R4 = true;
+                       break;
+               }
                default:
                        break;
                }
index 2a3e995e309db84c81a47796de51a0cd50344f35..0e683af52c6641f52c9757836537f32203f3f997 100644 (file)
@@ -187,6 +187,7 @@ EXTENSIONS = [
     Extension('VK_GOOGLE_hlsl_functionality1',            1, True),
     Extension('VK_GOOGLE_user_type',                      1, True),
     Extension('VK_NV_compute_shader_derivatives',         1, True),
+    Extension('VK_EXT_4444_formats',                      1, True),
 ]
 
 MAX_API_VERSION = VkVersion('0.0.0')
index 8a36144b52ca9c5c3ae268311f7b1a4a6a706ca6..1d170218a5067204a9345ccc31ef6b7afc97e214 100644 (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_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_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_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