From 104ce1dbab44f8d11d5dcc90d3f1cc8c466893d8 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Mon, 2 Jan 2017 00:44:08 -0800 Subject: anv: Store depth stencil layouts Store the current and requested depth stencil layouts so that we can perform the appropriate HiZ resolves for a given transition while recording a render pass. Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_pass.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/intel/vulkan/anv_pass.c') diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index c1c149b48b5..ea86fa9ff28 100644 --- a/src/intel/vulkan/anv_pass.c +++ b/src/intel/vulkan/anv_pass.c @@ -74,6 +74,8 @@ VkResult anv_CreateRenderPass( att->load_op = pCreateInfo->pAttachments[i].loadOp; att->store_op = pCreateInfo->pAttachments[i].storeOp; att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp; + att->initial_layout = pCreateInfo->pAttachments[i].initialLayout; + att->final_layout = pCreateInfo->pAttachments[i].finalLayout; att->subpass_usage = usages; usages += pass->subpass_count; } @@ -161,6 +163,8 @@ VkResult anv_CreateRenderPass( if (desc->pDepthStencilAttachment) { uint32_t a = desc->pDepthStencilAttachment->attachment; subpass->depth_stencil_attachment = a; + subpass->depth_stencil_layout = + desc->pDepthStencilAttachment->layout; if (a != VK_ATTACHMENT_UNUSED) { pass->attachments[a].usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; @@ -168,6 +172,7 @@ VkResult anv_CreateRenderPass( } } else { subpass->depth_stencil_attachment = VK_ATTACHMENT_UNUSED; + subpass->depth_stencil_layout = VK_IMAGE_LAYOUT_UNDEFINED; } } -- cgit v1.2.3