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/open-gl/render-gl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/gfx/open-gl/render-gl.cpp') diff --git a/tools/gfx/open-gl/render-gl.cpp b/tools/gfx/open-gl/render-gl.cpp index 057828d58..16f2b0045 100644 --- a/tools/gfx/open-gl/render-gl.cpp +++ b/tools/gfx/open-gl/render-gl.cpp @@ -1594,6 +1594,7 @@ public: R8G8B8A8_UNORM, D32_FLOAT, D_Unorm24_S8, + D32_FLOAT_S8, CountOf, }; @@ -1660,6 +1661,8 @@ public: { case Format::R8G8B8A8_UNORM: return GlPixelFormat::R8G8B8A8_UNORM; case Format::D32_FLOAT: return GlPixelFormat::D32_FLOAT; + //case Format::D24_UNORM_S8_UINT: return GlPixelFormat::D_Unorm24_S8; + case Format::D32_FLOAT_S8_UINT: return GlPixelFormat::D32_FLOAT_S8; default: return GlPixelFormat::Unknown; } @@ -1672,6 +1675,7 @@ public: { GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE }, // GlPixelFormat::R8G8B8A8_UNORM { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE}, // GlPixelFormat::D32_FLOAT { GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_BYTE}, // GlPixelFormat::D_Unorm24_S8 + { GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV}, // GlPixelFormat::D32_FLOAT_S8 }; -- cgit v1.2.3