Skip to content

Commit a018741

Browse files
committed
Fixed an issue that SwapChainDesc.DepthBufferFormat = TEX_FORMAT_R24G8_TYPELESS was not supported in D3D12 with error -> D3D12_CLEAR_VALUE::Format cannot be a typeless format. A fully qualified format must be supplied. Format = R24G8_TYPELESS. [ STATE_CREATION ERROR #817: ]
1 parent 5a08125 commit a018741

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void SwapChainD3D12Impl::InitBuffersAndViews()
112112
DepthBufferDesc.Usage = USAGE_DEFAULT;
113113
DepthBufferDesc.BindFlags = BIND_DEPTH_STENCIL;
114114

115-
DepthBufferDesc.ClearValue.Format = DepthBufferDesc.Format;
115+
DepthBufferDesc.ClearValue.Format = TEX_FORMAT_UNKNOWN;
116116
DepthBufferDesc.ClearValue.DepthStencil.Depth = m_SwapChainDesc.DefaultDepthValue;
117117
DepthBufferDesc.ClearValue.DepthStencil.Stencil = m_SwapChainDesc.DefaultStencilValue;
118118
DepthBufferDesc.Name = "Main depth buffer";

0 commit comments

Comments
 (0)