intel: Add support for depth/stencil clears via render pass load op
I want to get the demos to stop issuing explicit image clears entirely
before I change their semantics to require being outside the renderpass.
Color clears were already supported -- this just adds plumbing for
depth/stencil.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
diff --git a/icd/intel/fb.c b/icd/intel/fb.c
index 470b01e..30ec8dc 100644
--- a/icd/intel/fb.c
+++ b/icd/intel/fb.c
@@ -166,9 +166,12 @@
}
}
- /* TODO: depth/stencil clear load ops */
- assert(info->depthLoadOp != VK_ATTACHMENT_LOAD_OP_CLEAR);
- assert(info->stencilLoadOp != VK_ATTACHMENT_LOAD_OP_CLEAR);
+ rp->depthLoadOp = info->depthLoadOp;
+ rp->depthLoadClearValue = info->depthLoadClearValue;
+ rp->stencilLoadOp = info->stencilLoadOp;
+ rp->stencilLoadClearValue = info->stencilLoadClearValue;
+ rp->depthStencilLayout = info->depthStencilLayout;
+ rp->depthStencilFormat = info->depthStencilFormat;
/* TODO: MSAA resolves if/when we support MSAA. */
for (i = 0; i < info->colorAttachmentCount; i++)