Fix game startup resource lifetime and D32S8 depth-plane interop
This commit is contained in:
1 parent
19d859e43d
commit
5d33bddcd0
17 files changed
+539
-11
No files matched your search
@@ -26,6 +26,9 @@ inline PixelSpec pixel_spec(unsigned plane, DXGI_FORMAT format) {
|
||||
case DXGI_FORMAT_R16G16_UNORM: return {rg16unorm, 4, false};
|
||||
case DXGI_FORMAT_R32_FLOAT: case DXGI_FORMAT_R32_TYPELESS: case DXGI_FORMAT_D32_FLOAT:
|
||||
return {r32f, 4, plane == depth || plane == exposure};
|
||||
case DXGI_FORMAT_R32G8X24_TYPELESS: case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
|
||||
if (plane != depth) throw std::runtime_error("Depth/stencil resources are supported only for the depth input");
|
||||
return {r32f, 4, true}; // D3D12 subresource 0 is the R32 depth plane.
|
||||
case DXGI_FORMAT_R16_FLOAT: return {r16f, 2, false};
|
||||
case DXGI_FORMAT_D24_UNORM_S8_UINT: case DXGI_FORMAT_R24G8_TYPELESS: case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:
|
||||
return {depth24, 4, false};
|
||||
|
||||
Reference in new issue
Block a user