summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-08-09 00:35:39 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-09 00:35:39 +0000
commitf3cd5069e32a7621019f3c40d87b4809c31cc21d (patch)
tree7da176859092527439199f5362e3bbe7a68cf0f0 /Graphics/GraphicsEngineD3D12
parentFixed RESOURCE_STATE_GENERIC_READ enum value; few updates in D3D12 backend (diff)
downloadDiligentCore-f3cd5069e32a7621019f3c40d87b4809c31cc21d.tar.gz
DiligentCore-f3cd5069e32a7621019f3c40d87b4809c31cc21d.zip
D3D12 backend: fixed load op for depth-stencil attachments
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index 1902ff45..7750c4be 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -1184,6 +1184,11 @@ void DeviceContextD3D12Impl::CommitSubpassRenderTargets()
RenderPassDS.DepthBeginningAccess.Type = AttachmentLoadOpToD3D12BeginningAccessType(DSAttachmentDesc.LoadOp);
RenderPassDS.StencilBeginningAccess.Type = AttachmentLoadOpToD3D12BeginningAccessType(DSAttachmentDesc.StencilLoadOp);
}
+ else
+ {
+ RenderPassDS.DepthBeginningAccess.Type = D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE;
+ RenderPassDS.StencilBeginningAccess.Type = D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE;
+ }
if (RenderPassDS.DepthBeginningAccess.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR)
{