From e027f2afc100e62beca9ef2b218cc6999d4a0ed8 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Sun, 16 Feb 2025 17:06:54 -0800 Subject: [PATCH] venus: support VK_EXT_pipeline_protected_access Signed-off-by: Yiwei Zhang Part-of: --- docs/features.txt | 2 +- src/virtio/vulkan/vn_physical_device.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index 5e673506a05..5e8561c9251 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -525,7 +525,7 @@ Vulkan 1.4 -- all DONE: anv, lvp, nvk, radv/gfx8+, tu/a7xx+ VK_KHR_shader_subgroup_rotate DONE (anv, lvp, nvk, radv, tu, vn) VK_KHR_vertex_attribute_divisor DONE (anv, lvp, nvk, panvk, radv, tu, v3dv, vn) VK_EXT_host_image_copy DONE (anv, lvp, nvk/Turing+, tu) - VK_EXT_pipeline_protected_access DONE (anv/gfx12+) + VK_EXT_pipeline_protected_access DONE (anv/gfx12+, vn) VK_EXT_pipeline_robustness DONE (anv, lvp, nvk, panvk, radv, v3dv, tu) Khronos extensions that are not part of any Vulkan version: diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index 619ded53a19..f463619931f 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -164,6 +164,8 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) VkPhysicalDeviceIndexTypeUint8Features index_type_uint8; VkPhysicalDeviceLineRasterizationFeatures line_rasterization; VkPhysicalDeviceMaintenance5Features maintenance5; + VkPhysicalDevicePipelineProtectedAccessFeatures + pipeline_protected_access; VkPhysicalDeviceShaderExpectAssumeFeatures shader_expect_assume; VkPhysicalDeviceShaderFloatControls2Features shader_float_controls_2; VkPhysicalDeviceShaderSubgroupRotateFeatures shader_subgroup_rotate; @@ -275,6 +277,7 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev) VN_ADD_PNEXT_EXT(feats2, INDEX_TYPE_UINT8_FEATURES, local_feats.index_type_uint8, exts->KHR_index_type_uint8 || exts->EXT_index_type_uint8); VN_ADD_PNEXT_EXT(feats2, LINE_RASTERIZATION_FEATURES, local_feats.line_rasterization, exts->KHR_line_rasterization || exts->EXT_line_rasterization); VN_ADD_PNEXT_EXT(feats2, MAINTENANCE_5_FEATURES, local_feats.maintenance5, exts->KHR_maintenance5); + VN_ADD_PNEXT_EXT(feats2, PIPELINE_PROTECTED_ACCESS_FEATURES, local_feats.pipeline_protected_access, exts->EXT_pipeline_protected_access); VN_ADD_PNEXT_EXT(feats2, SHADER_EXPECT_ASSUME_FEATURES, local_feats.shader_expect_assume, exts->KHR_shader_expect_assume); VN_ADD_PNEXT_EXT(feats2, SHADER_FLOAT_CONTROLS_2_FEATURES, local_feats.shader_float_controls_2, exts->KHR_shader_float_controls2); VN_ADD_PNEXT_EXT(feats2, SHADER_SUBGROUP_ROTATE_FEATURES, local_feats.shader_subgroup_rotate, exts->KHR_shader_subgroup_rotate); @@ -1101,6 +1104,7 @@ vn_physical_device_get_passthrough_extensions( .KHR_shader_float_controls2 = true, .KHR_shader_subgroup_rotate = true, .KHR_vertex_attribute_divisor = true, + .EXT_pipeline_protected_access = true, /* KHR */ .KHR_calibrated_timestamps = true,