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

Author: Eric Engestrom <[email protected]>
Date:   Sun Jul  3 14:35:50 2022 +0100

v3dv: implement VK_EXT_shader_module_identifier

Passes `dEQP-VK.*.shader_module_identifier.*`

Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18458>

---

 docs/features.txt                 |  2 +-
 src/broadcom/vulkan/v3dv_device.c | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/docs/features.txt b/docs/features.txt
index 0f0c12780a2..90526fbf119 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -582,7 +582,7 @@ Khronos extensions that are not part of any Vulkan version:
   VK_EXT_shader_stencil_export                          DONE (anv/gen9+, lvp, 
radv, tu, vn)
   VK_EXT_shader_subgroup_ballot                         DONE (anv, lvp, radv)
   VK_EXT_shader_subgroup_vote                           DONE (anv, lvp, radv)
-  VK_EXT_shader_module_identifier                       DONE (anv, radv, tu)
+  VK_EXT_shader_module_identifier                       DONE (anv, radv, tu, 
v3dv)
   VK_EXT_transform_feedback                             DONE (anv, lvp, radv, 
tu, vn)
   VK_EXT_vertex_attribute_divisor                       DONE (anv, dzn, panvk, 
radv, lvp, tu, v3dv, vn)
   VK_EXT_vertex_input_dynamic_state                     DONE (lvp, radv, tu)
diff --git a/src/broadcom/vulkan/v3dv_device.c 
b/src/broadcom/vulkan/v3dv_device.c
index 181f80be245..ec0fc4ed6f9 100644
--- a/src/broadcom/vulkan/v3dv_device.c
+++ b/src/broadcom/vulkan/v3dv_device.c
@@ -181,6 +181,7 @@ get_device_extensions(const struct v3dv_physical_device 
*device,
       .EXT_private_data                     = true,
       .EXT_provoking_vertex                 = true,
       .EXT_separate_stencil_usage           = true,
+      .EXT_shader_module_identifier         = true,
       .EXT_texel_buffer_alignment           = true,
       .EXT_tooling_info                     = true,
       .EXT_vertex_attribute_divisor         = true,
@@ -1306,6 +1307,13 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice 
physicalDevice,
          break;
       }
 
+      case 
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT: {
+         VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT *features =
+            (VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT *)ext;
+         features->shaderModuleIdentifier = true;
+         break;
+      }
+
       default:
          v3dv_debug_ignored_stype(ext->sType);
          break;
@@ -1703,6 +1711,16 @@ v3dv_GetPhysicalDeviceProperties2(VkPhysicalDevice 
physicalDevice,
          props->uniformTexelBufferOffsetSingleTexelAlignment = false;
          break;
       }
+      case 
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT: {
+         VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT *props =
+            (VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT *)ext;
+         STATIC_ASSERT(sizeof(vk_shaderModuleIdentifierAlgorithmUUID) ==
+                       sizeof(props->shaderModuleIdentifierAlgorithmUUID));
+         memcpy(props->shaderModuleIdentifierAlgorithmUUID,
+                vk_shaderModuleIdentifierAlgorithmUUID,
+                sizeof(props->shaderModuleIdentifierAlgorithmUUID));
+         break;
+      }
       default:
          v3dv_debug_ignored_stype(ext->sType);
          break;

Reply via email to