Module: Mesa Branch: main Commit: 1442d77bc5d19ab45f3160053232b1c76ed57c4b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1442d77bc5d19ab45f3160053232b1c76ed57c4b
Author: Iago Toral Quiroga <[email protected]> Date: Thu May 5 09:54:38 2022 +0200 v3dv: trivially implement VK_KHR_separate_depth_stencil_layouts We don't currently benefit from seeing barriers and layout transitions that affect just the depth or stencil aspects, so we don't expose this feature. Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16344> --- docs/features.txt | 2 +- src/broadcom/vulkan/v3dv_device.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index 653a547d10b..19955a80c51 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -454,7 +454,7 @@ Vulkan 1.2 -- all DONE: anv, vn VK_KHR_image_format_list DONE (anv, lvp, radv, tu, v3dv, vn) VK_KHR_imageless_framebuffer DONE (anv, lvp, radv, tu, v3dv, vn) VK_KHR_sampler_mirror_clamp_to_edge DONE (anv, lvp, radv, tu, v3dv, vn) - VK_KHR_separate_depth_stencil_layouts DONE (anv, lvp, radv, vn, tu) + VK_KHR_separate_depth_stencil_layouts DONE (anv, lvp, radv, vn, v3dv, tu) VK_KHR_shader_atomic_int64 DONE (anv/gen9+, lvp, radv, vn) VK_KHR_shader_float16_int8 DONE (anv/gen8+, lvp, radv, tu, vn) VK_KHR_shader_float_controls DONE (anv/gen8+, lvp, radv, tu, vn) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index c5e52fd48e2..70e5958222b 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -137,6 +137,7 @@ get_device_extensions(const struct v3dv_physical_device *device, .KHR_maintenance2 = true, .KHR_maintenance3 = true, .KHR_multiview = true, + .KHR_separate_depth_stencil_layouts = true, .KHR_shader_non_semantic_info = true, .KHR_sampler_mirror_clamp_to_edge = true, .KHR_storage_buffer_storage_class = true, @@ -1169,6 +1170,21 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, * not lead to best performance so let's just not support it. */ .scalarBlockLayout = false, + /* This tells applications 2 things: + * + * 1. If they can select just one aspect for barriers. For us barriers + * decide if we need to split a job and we don't care if it is only + * for one of the aspects of the image or both, so we don't really + * benefit from seeing barriers that select just one aspect. + * + * 2. If they can program different layouts for each aspect. We + * generally don't care about layouts, so again, we don't get any + * benefits from this to limit the scope of image layout transitions. + * + * Since we cannot offer any advantages to applications that use separate + * layouts for D/S, don't expose the feature. + */ + .separateDepthStencilLayouts = false, .storageBuffer8BitAccess = true, .storagePushConstant8 = true, .imagelessFramebuffer = true,
