Mesa (main): venus: add VK_EXT_depth_clip_enable

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 9 17:33:00 UTC 2022


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Fri Mar  4 22:15:10 2022 -0800

venus: add VK_EXT_depth_clip_enable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15265>

---

 src/virtio/vulkan/vn_physical_device.c | 7 +++++++
 src/virtio/vulkan/vn_physical_device.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c
index 06e0cb6f407..9ab6b4799e4 100644
--- a/src/virtio/vulkan/vn_physical_device.c
+++ b/src/virtio/vulkan/vn_physical_device.c
@@ -136,6 +136,8 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev)
    VN_ADD_EXT_TO_PNEXT(exts->EXT_custom_border_color,
                        feats->custom_border_color,
                        CUSTOM_BORDER_COLOR_FEATURES_EXT, features2);
+   VN_ADD_EXT_TO_PNEXT(exts->EXT_depth_clip_enable, feats->depth_clip_enable,
+                       DEPTH_CLIP_ENABLE_FEATURES_EXT, features2);
    VN_ADD_EXT_TO_PNEXT(exts->EXT_line_rasterization,
                        feats->line_rasterization,
                        LINE_RASTERIZATION_FEATURES_EXT, features2);
@@ -934,6 +936,7 @@ vn_physical_device_get_passthrough_extensions(
       /* EXT */
       .EXT_conservative_rasterization = true,
       .EXT_custom_border_color = true,
+      .EXT_depth_clip_enable = true,
 #ifndef ANDROID
       .EXT_image_drm_format_modifier = true,
 #endif
@@ -1660,6 +1663,7 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
 
       /* EXT */
       VkPhysicalDeviceCustomBorderColorFeaturesEXT *custom_border_color;
+      VkPhysicalDeviceDepthClipEnableFeaturesEXT *depth_clip_enable;
       VkPhysicalDeviceLineRasterizationFeaturesEXT *line_rasterization;
       VkPhysicalDeviceProvokingVertexFeaturesEXT *provoking_vertex;
       VkPhysicalDeviceTransformFeedbackFeaturesEXT *transform_feedback;
@@ -1842,6 +1846,9 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT:
          *u.custom_border_color = feats->custom_border_color;
          break;
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT:
+         *u.depth_clip_enable = feats->depth_clip_enable;
+         break;
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT:
          *u.line_rasterization = feats->line_rasterization;
          break;
diff --git a/src/virtio/vulkan/vn_physical_device.h b/src/virtio/vulkan/vn_physical_device.h
index 113e0d4ee09..1a73179b344 100644
--- a/src/virtio/vulkan/vn_physical_device.h
+++ b/src/virtio/vulkan/vn_physical_device.h
@@ -31,6 +31,7 @@ struct vn_physical_device_features {
 
    /* EXT */
    VkPhysicalDeviceCustomBorderColorFeaturesEXT custom_border_color;
+   VkPhysicalDeviceDepthClipEnableFeaturesEXT depth_clip_enable;
    VkPhysicalDeviceLineRasterizationFeaturesEXT line_rasterization;
    VkPhysicalDeviceProvokingVertexFeaturesEXT provoking_vertex;
    VkPhysicalDeviceTransformFeedbackFeaturesEXT transform_feedback;



More information about the mesa-commit mailing list