turnip: Enable VK_KHR_separate_depth_stencil_layouts
We now start handling depth/stencil layouts separately when adding implicit subpass dependancies. Signed-off-by: Hyunjun Ko <zzoon@igalia.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13057>
This commit is contained in:
parent
e257344a82
commit
ddb3d30d47
|
@ -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, 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)
|
||||
VK_KHR_separate_depth_stencil_layouts DONE (anv, lvp, radv, vn, 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)
|
||||
|
|
|
@ -155,6 +155,7 @@ get_device_extensions(const struct tu_physical_device *device,
|
|||
.KHR_variable_pointers = true,
|
||||
.KHR_vulkan_memory_model = true,
|
||||
.KHR_driver_properties = true,
|
||||
.KHR_separate_depth_stencil_layouts = true,
|
||||
#ifndef TU_USE_KGSL
|
||||
.KHR_timeline_semaphore = true,
|
||||
#endif
|
||||
|
@ -556,7 +557,7 @@ tu_get_physical_device_features_1_2(struct tu_physical_device *pdevice,
|
|||
features->imagelessFramebuffer = true;
|
||||
features->uniformBufferStandardLayout = true;
|
||||
features->shaderSubgroupExtendedTypes = true;
|
||||
features->separateDepthStencilLayouts = false;
|
||||
features->separateDepthStencilLayouts = true;
|
||||
features->hostQueryReset = true;
|
||||
features->timelineSemaphore = true;
|
||||
features->bufferDeviceAddress = false;
|
||||
|
|
|
@ -208,9 +208,17 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
|
||||
for (unsigned j = 0; j < subpass->inputAttachmentCount; j++) {
|
||||
uint32_t a = subpass->pInputAttachments[j].attachment;
|
||||
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].initialLayout != subpass->pInputAttachments[j].layout &&
|
||||
|
||||
uint32_t stencil_layout = vk_format_has_stencil(att[a].format) ?
|
||||
vk_att_ref_stencil_layout(&subpass->pInputAttachments[j], att) :
|
||||
VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
uint32_t stencil_initial_layout = vk_att_desc_stencil_layout(&att[a], false);
|
||||
|
||||
if ((att[a].initialLayout != subpass->pInputAttachments[j].layout ||
|
||||
stencil_initial_layout != stencil_layout) &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
|
@ -229,9 +237,14 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
if (subpass->pDepthStencilAttachment &&
|
||||
subpass->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = subpass->pDepthStencilAttachment->attachment;
|
||||
if (att[a].initialLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
uint32_t stencil_layout = vk_att_ref_stencil_layout(subpass->pDepthStencilAttachment, att);
|
||||
uint32_t stencil_initial_layout = vk_att_desc_stencil_layout(&att[a], false);
|
||||
|
||||
if ((att[a].initialLayout != subpass->pDepthStencilAttachment->layout ||
|
||||
stencil_initial_layout != stencil_layout) &&
|
||||
!att_used[a] && !has_external_src[i]) {
|
||||
src_implicit_dep = true;
|
||||
}
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
||||
|
@ -253,8 +266,12 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
if (ds_resolve && ds_resolve->pDepthStencilResolveAttachment &&
|
||||
ds_resolve->pDepthStencilResolveAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = ds_resolve->pDepthStencilResolveAttachment->attachment;
|
||||
if (att[a].initialLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
uint32_t stencil_layout = vk_att_ref_stencil_layout(ds_resolve->pDepthStencilResolveAttachment, att);
|
||||
uint32_t stencil_initial_layout = vk_att_desc_stencil_layout(&att[a], false);
|
||||
|
||||
if ((att[a].initialLayout != subpass->pDepthStencilAttachment->layout ||
|
||||
stencil_initial_layout != stencil_layout) &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
src_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
@ -286,7 +303,14 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
uint32_t a = subpass->pInputAttachments[j].attachment;
|
||||
if (a == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
if (att[a].finalLayout != subpass->pInputAttachments[j].layout &&
|
||||
|
||||
uint32_t stencil_layout = vk_format_has_stencil(att[a].format) ?
|
||||
vk_att_ref_stencil_layout(&subpass->pInputAttachments[j], att) :
|
||||
VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
uint32_t stencil_final_layout = vk_att_desc_stencil_layout(&att[a], true);
|
||||
|
||||
if ((att[a].finalLayout != subpass->pInputAttachments[j].layout ||
|
||||
stencil_final_layout != stencil_layout) &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
|
@ -305,9 +329,14 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
if (subpass->pDepthStencilAttachment &&
|
||||
subpass->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = subpass->pDepthStencilAttachment->attachment;
|
||||
if (att[a].finalLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
uint32_t stencil_layout = vk_att_ref_stencil_layout(subpass->pDepthStencilAttachment, att);
|
||||
uint32_t stencil_final_layout = vk_att_desc_stencil_layout(&att[a], true);
|
||||
|
||||
if ((att[a].finalLayout != subpass->pDepthStencilAttachment->layout ||
|
||||
stencil_final_layout != stencil_layout) &&
|
||||
!att_used[a] && !has_external_dst[i]) {
|
||||
dst_implicit_dep = true;
|
||||
}
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
||||
|
@ -329,8 +358,12 @@ tu_render_pass_add_implicit_deps(struct tu_render_pass *pass,
|
|||
if (ds_resolve && ds_resolve->pDepthStencilResolveAttachment &&
|
||||
ds_resolve->pDepthStencilResolveAttachment->attachment != VK_ATTACHMENT_UNUSED) {
|
||||
uint32_t a = ds_resolve->pDepthStencilResolveAttachment->attachment;
|
||||
if (att[a].finalLayout != subpass->pDepthStencilAttachment->layout &&
|
||||
!att_used[a] && !has_external_dst[i])
|
||||
uint32_t stencil_layout = vk_att_ref_stencil_layout(ds_resolve->pDepthStencilResolveAttachment, att);
|
||||
uint32_t stencil_final_layout = vk_att_desc_stencil_layout(&att[a], true);
|
||||
|
||||
if ((att[a].finalLayout != subpass->pDepthStencilAttachment->layout ||
|
||||
stencil_final_layout != stencil_layout) &&
|
||||
!att_used[a] && !has_external_src[i])
|
||||
dst_implicit_dep = true;
|
||||
att_used[a] = true;
|
||||
}
|
||||
|
|
|
@ -94,6 +94,7 @@ typedef uint32_t xcb_window_t;
|
|||
#include "tu_entrypoints.h"
|
||||
|
||||
#include "vk_format.h"
|
||||
#include "vk_image.h"
|
||||
#include "vk_command_buffer.h"
|
||||
#include "vk_queue.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue