intel: get depth/stencil layout from VkRenderPassCreateInfo
We will not be able to tell RT and DS from VkFramebufferCreateInfo after an
upcoming header change.
diff --git a/icd/intel/fb.c b/icd/intel/fb.c
index 30ec8dc..1fd9678 100644
--- a/icd/intel/fb.c
+++ b/icd/intel/fb.c
@@ -97,19 +97,8 @@
}
fb->ds = ds;
-
- switch (att->layout) {
- case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
- case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
- fb->optimal_ds = true;
- break;
- default:
- fb->optimal_ds = false;
- break;
- }
} else {
fb->ds = NULL;
- fb->optimal_ds = false;
}
fb->width = width;
@@ -173,6 +162,16 @@
rp->depthStencilLayout = info->depthStencilLayout;
rp->depthStencilFormat = info->depthStencilFormat;
+ switch (info->depthStencilLayout) {
+ case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
+ case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
+ rp->optimal_ds = true;
+ break;
+ default:
+ rp->optimal_ds = false;
+ break;
+ }
+
/* TODO: MSAA resolves if/when we support MSAA. */
for (i = 0; i < info->colorAttachmentCount; i++)
assert(info->pColorStoreOps[i] != VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA);