From 33e15236c6fd8623bc516a194ca65e8810f1f855 Mon Sep 17 00:00:00 2001 From: kopaka1822 Date: Fri, 19 May 2023 18:38:49 +0200 Subject: added D32_S8 format (#2885) * added D32_S8 format * fixed isTypelessDepthFormat format for DXGI_FORMAT_R32G8X24_TYPELESS * added R32_FLOAT_X32_TYPELESS format to allow (depth component only) shader resource views for the D32_FLOAT_S8_UINT format. - unsure about the changed in the vk-util.cpp: No matching VK_Format? --------- Co-authored-by: Yong He Co-authored-by: jsmall-nvidia --- tools/gfx/d3d12/d3d12-helper-functions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/gfx/d3d12/d3d12-helper-functions.cpp') diff --git a/tools/gfx/d3d12/d3d12-helper-functions.cpp b/tools/gfx/d3d12/d3d12-helper-functions.cpp index 9e5201ea5..077645b95 100644 --- a/tools/gfx/d3d12/d3d12-helper-functions.cpp +++ b/tools/gfx/d3d12/d3d12-helper-functions.cpp @@ -95,6 +95,10 @@ DXGI_FORMAT getTypelessFormatFromDepthFormat(Format format) return DXGI_FORMAT_R16_TYPELESS; case Format::D32_FLOAT: return DXGI_FORMAT_R32_TYPELESS; + case Format::D32_FLOAT_S8_UINT: + return DXGI_FORMAT_R32G8X24_TYPELESS; + //case Format::D24_UNORM_S8_UINT: + // return DXGI_FORMAT_R24G8_TYPELESS; default: return D3DUtil::getMapFormat(format); } @@ -106,6 +110,8 @@ bool isTypelessDepthFormat(DXGI_FORMAT format) { case DXGI_FORMAT_R16_TYPELESS: case DXGI_FORMAT_R32_TYPELESS: + case DXGI_FORMAT_R32G8X24_TYPELESS: + case DXGI_FORMAT_R24G8_TYPELESS: return true; default: return false; -- cgit v1.2.3