Fix D3D12 depth format and stencil barrier issues in Render Graph

This commit is contained in:
2026-04-01 15:28:25 +09:00
parent a00cb27529
commit 3157596b5d
8 changed files with 65 additions and 10 deletions

View File

@@ -144,11 +144,13 @@ internal sealed class RenderGraphExecutor
? nativePass.depthAttachment.storeOp
: AttachmentStoreOp.DontCare,
StencilLoadOp = nativePass.hasDepthAttachment
? nativePass.depthAttachment.loadOp
? nativePass.depthAttachment.stencilLoadOp
: AttachmentLoadOp.DontCare,
StencilStoreOp = nativePass.hasDepthAttachment
? nativePass.depthAttachment.storeOp
: AttachmentStoreOp.DontCare
? nativePass.depthAttachment.stencilStoreOp
: AttachmentStoreOp.DontCare,
HasStencil = nativePass.hasDepthAttachment &&
(_resources.GetResource(nativePass.depthAttachment.texture).rgTextureDesc.format == TextureFormat.D24_UNorm_S8_UInt)
};
commandBuffer.BeginRenderPass(new Span<PassRenderTargetDesc>(pPassRTDescs, nativePass.colorAttachmentCount), depthDesc);