Enable .VALVE_mutable_descriptor_type in physical_device
authorDawn Han <dawnhan@google.com>
Wed, 31 Aug 2022 18:02:20 +0000 (18:02 +0000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Sep 2022 21:15:43 +0000 (21:15 +0000)
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17505>

src/virtio/vulkan/vn_physical_device.c
src/virtio/vulkan/vn_physical_device.h

index 262d6fa..71aa4c8 100644 (file)
@@ -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:
index 1df2156..9dd08f8 100644 (file)
@@ -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 {