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

Author: Dawn Han <[email protected]>
Date:   Wed Aug 31 18:02:20 2022 +0000

Enable .VALVE_mutable_descriptor_type in physical_device

Signed-off-by: Dawn Han <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505>

---

 src/virtio/vulkan/vn_physical_device.c | 11 +++++++++++
 src/virtio/vulkan/vn_physical_device.h |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/src/virtio/vulkan/vn_physical_device.c 
b/src/virtio/vulkan/vn_physical_device.c
index 262d6faa1f8..71aa4c86744 100644
--- a/src/virtio/vulkan/vn_physical_device.c
+++ b/src/virtio/vulkan/vn_physical_device.c
@@ -197,6 +197,11 @@ vn_physical_device_init_features(struct vn_physical_device 
*physical_dev)
                        feats->ycbcr_2plane_444_formats,
                        YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT, features2);
 
+   /* vendor */
+   VN_ADD_EXT_TO_PNEXT(exts->VALVE_mutable_descriptor_type,
+                       feats->mutable_descriptor_type,
+                       MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE, features2);
+
    vn_call_vkGetPhysicalDeviceFeatures2(
       instance, vn_physical_device_to_handle(physical_dev), &features2);
 
@@ -1095,6 +1100,9 @@ vn_physical_device_get_passthrough_extensions(
       .EXT_conservative_rasterization = true,
       .EXT_custom_border_color = true,
       .EXT_depth_clip_enable = true,
+
+      /* vendor */
+      .VALVE_mutable_descriptor_type = true,
 #ifndef ANDROID
       .EXT_image_drm_format_modifier = true,
 #endif
@@ -1739,6 +1747,9 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice 
physicalDevice,
       CASE(ROBUSTNESS_2_FEATURES_EXT, robustness_2);
       CASE(TRANSFORM_FEEDBACK_FEATURES_EXT, transform_feedback);
       CASE(VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, vertex_attribute_divisor);
+
+      /* vendor */
+      CASE(MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE, mutable_descriptor_type);
       /* clang-format on */
 
       default:
diff --git a/src/virtio/vulkan/vn_physical_device.h 
b/src/virtio/vulkan/vn_physical_device.h
index 1df21560901..9dd08f86ae3 100644
--- a/src/virtio/vulkan/vn_physical_device.h
+++ b/src/virtio/vulkan/vn_physical_device.h
@@ -59,6 +59,9 @@ struct vn_physical_device_features {
    VkPhysicalDeviceTransformFeedbackFeaturesEXT transform_feedback;
    VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT vertex_attribute_divisor;
    VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ycbcr_2plane_444_formats;
+
+   /* vendor */
+   VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE mutable_descriptor_type;
 };
 
 struct vn_physical_device_properties {

Reply via email to