Module: Mesa
Branch: main
Commit: 5ca8390e5f18f68ff5eef357b600db415429eaae
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ca8390e5f18f68ff5eef357b600db415429eaae

Author: Joshua Ashton <[email protected]>
Date:   Wed Jun 28 18:35:06 2023 +0100

radv: Advertise VK_EXT_pipeline_robustness

Signed-off-by: Joshua Ashton <[email protected]>
Reviewed-by: Friedrich Vock <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23912>

---

 docs/relnotes/new_features.txt        |  1 +
 src/amd/vulkan/radv_physical_device.c | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index cd73147b1a7..691dfb6b8ea 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -8,3 +8,4 @@ VK_KHR_fragment_shader_barycentric on RADV/GFX10.3+
 VK_KHR_ray_tracing_pipeline on RADV/GFX10.3+
 VK_EXT_depth_bias_control on RADV
 VK_EXT_fragment_shader_interlock on RADV/GFX9+
+VK_EXT_pipeline_robustness on RADV
diff --git a/src/amd/vulkan/radv_physical_device.c 
b/src/amd/vulkan/radv_physical_device.c
index 1c45c748fec..a312548657c 100644
--- a/src/amd/vulkan/radv_physical_device.c
+++ b/src/amd/vulkan/radv_physical_device.c
@@ -514,6 +514,7 @@ radv_physical_device_get_supported_extensions(const struct 
radv_physical_device
       .EXT_pipeline_creation_cache_control = true,
       .EXT_pipeline_creation_feedback = true,
       .EXT_pipeline_library_group_handles = radv_enable_rt(device, true),
+      .EXT_pipeline_robustness = !device->use_llvm,
       .EXT_post_depth_coverage = device->rad_info.gfx_level >= GFX10,
       .EXT_primitive_topology_list_restart = true,
       .EXT_primitives_generated_query = true,
@@ -1021,6 +1022,9 @@ radv_physical_device_get_features(const struct 
radv_physical_device *pdevice, st
       .fragmentShaderSampleInterlock = has_fragment_shader_interlock,
       .fragmentShaderPixelInterlock = has_fragment_shader_interlock,
       .fragmentShaderShadingRateInterlock = false,
+
+      /* VK_EXT_pipeline_robustness */
+      .pipelineRobustness = true,
    };
 }
 
@@ -1821,6 +1825,15 @@ radv_GetPhysicalDeviceProperties2(VkPhysicalDevice 
physicalDevice, VkPhysicalDev
          properties->triStripVertexOrderIndependentOfProvokingVertex = false;
          break;
       }
+      case 
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT: {
+         VkPhysicalDevicePipelineRobustnessPropertiesEXT *properties =
+            (VkPhysicalDevicePipelineRobustnessPropertiesEXT *)ext;
+         properties->defaultRobustnessStorageBuffers = 
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT;
+         properties->defaultRobustnessUniformBuffers = 
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT;
+         properties->defaultRobustnessVertexInputs = 
VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT;
+         properties->defaultRobustnessImages = 
VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT;
+         break;
+      }
       default:
          break;
       }

Reply via email to