From 39a9f6868564f89bd0b0c6346ba12efb12b68bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Thu, 25 Apr 2024 13:09:51 +0200 Subject: [PATCH] v3dv: enable VK_EXT_extended_dynamic_state2 Note that we don't support (and clarify on code why) two of the features of this extension: * extendedDynamicState2PatchControlPoints: as we don't support Tessellation Shaders * extendedDynamicState2LogicOp: as supporting it would need to allow compile shader variants after pipeline creation, that we try to avoid as much as possible (and it is not supported right now) Note that those two features are not mandatory for Vulkan 1.3. From spec: "Promotion to Vulkan 1.3 This extension has been partially promoted. The dynamic state enumerants VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT, and VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT; and the corresponding entry points in this extension are included in core Vulkan 1.3, with the EXT suffix omitted. The enumerants and entry points for dynamic logic operation and patch control points are not promoted, nor is the feature structure. Extension interfaces that were promoted remain available as aliases of the core functionality." Reviewed-by: Iago Toral Quiroga Part-of: --- docs/features.txt | 2 +- src/broadcom/vulkan/v3dv_device.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index ecbe52e16b9..351e799972a 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -486,7 +486,7 @@ Vulkan 1.3 -- all DONE: anv, lvp, nvk, radv, tu, vn VK_KHR_zero_initialize_workgroup_memory DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_4444_formats DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_extended_dynamic_state DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) - VK_EXT_extended_dynamic_state2 DONE (anv, hasvk, lvp, nvk, radv, tu, vn) + VK_EXT_extended_dynamic_state2 DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_inline_uniform_block DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_pipeline_creation_cache_control DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_pipeline_creation_feedback DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 001f1e084f3..355145515fe 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -202,6 +202,7 @@ get_device_extensions(const struct v3dv_physical_device *device, .EXT_load_store_op_none = true, .EXT_inline_uniform_block = true, .EXT_extended_dynamic_state = true, + .EXT_extended_dynamic_state2 = true, .EXT_external_memory_dma_buf = true, .EXT_host_query_reset = true, .EXT_image_drm_format_modifier = true, @@ -412,6 +413,17 @@ get_features(const struct v3dv_physical_device *physical_device, /* VK_EXT_extended_dynamic_state */ .extendedDynamicState = true, + /* VK_EXT_extended_dynamic_state2 */ + .extendedDynamicState2 = true, + /* We don't support extendedDynamicState2LogicOp as that would require + * compile shader variants after the pipeline creation. + */ + .extendedDynamicState2LogicOp = false, + /* We don't support extendedDynamicState2PatchControlPoints as we don't + * support Tessellation Shaders + */ + .extendedDynamicState2PatchControlPoints = false, + /* VK_KHR_pipeline_executable_properties */ .pipelineExecutableInfo = true,