radv: advertise VK_EXT_robustness2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 15 Apr 2020 09:39:28 +0000 (11:39 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 07:29:54 +0000 (07:29 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4775>

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

index 79bb65a02ebef58248af9a7e2067ec28f5ab2d9f..aec782bc549e603ab7410f8b9f2dac4c06fa9a47 100644 (file)
@@ -13,4 +13,4 @@ VK_KHR_8bit_storage for ACO on GFX8+
 VK_KHR_16bit_storage for ACO on GFX8+ (storageInputOutput16 is still unsupported)
 shaderInt16 for ACO on GFX9+
 VK_KHR_shader_float16_int8 for ACO on GFX8+ (shaderFloat16 is still unsupported)
-VK_EXT_robustness2 on Intel
+VK_EXT_robustness2 on Intel, RADV.
index 10571531621e9342bd0f83fff8002ed0a89de222..734d3cee515a28bc07b9c6187f4f8d06cfab3002 100644 (file)
@@ -1255,6 +1255,14 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->overallocationBehavior = true;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
+                       VkPhysicalDeviceRobustness2FeaturesEXT *features =
+                               (VkPhysicalDeviceRobustness2FeaturesEXT *)ext;
+                       features->robustBufferAccess2 = true;
+                       features->robustImageAccess2 = true;
+                       features->nullDescriptor = true;
+                       break;
+               }
                default:
                        break;
                }
@@ -1886,6 +1894,13 @@ void radv_GetPhysicalDeviceProperties2(
                        props->lineSubPixelPrecisionBits = 4;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT: {
+                       VkPhysicalDeviceRobustness2PropertiesEXT *properties =
+                               (VkPhysicalDeviceRobustness2PropertiesEXT *)ext;
+                       properties->robustStorageBufferAccessSizeAlignment = 4;
+                       properties->robustUniformBufferAccessSizeAlignment = 4;
+                       break;
+               }
                default:
                        break;
                }
index b647e0aa95a742c99e4d01fd7d9df79ba7dc9a4e..f181c1333649eb3f07fec4b62855f43ab6958491 100644 (file)
@@ -137,6 +137,7 @@ EXTENSIONS = [
     Extension('VK_EXT_pipeline_creation_feedback',        1, True),
     Extension('VK_EXT_post_depth_coverage',               1, 'device->rad_info.chip_class >= GFX10'),
     Extension('VK_EXT_queue_family_foreign',              1, True),
+    Extension('VK_EXT_robustness2',                       1, True),
     # Disable sample locations on GFX10 until the CTS failures have been resolved.
     Extension('VK_EXT_sample_locations',                  1, 'device->rad_info.chip_class < GFX10'),
     Extension('VK_EXT_sampler_filter_minmax',             1, True),