summaryrefslogtreecommitdiffstats
path: root/tools/gfx/renderer-shared.cpp
diff options
context:
space:
mode:
authorkopaka1822 <felixbruell@live.de>2023-05-19 18:38:49 +0200
committerGitHub <noreply@github.com>2023-05-19 12:38:49 -0400
commit33e15236c6fd8623bc516a194ca65e8810f1f855 (patch)
tree62ab185bd921d7a64b170b88fe51981211f9b217 /tools/gfx/renderer-shared.cpp
parent81451fb48a0dbb60cd1d9c806c4cf25085ee5e2a (diff)
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 <yonghe@outlook.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'tools/gfx/renderer-shared.cpp')
-rw-r--r--tools/gfx/renderer-shared.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp
index c32cc3d90..99188233a 100644
--- a/tools/gfx/renderer-shared.cpp
+++ b/tools/gfx/renderer-shared.cpp
@@ -1259,6 +1259,18 @@ bool isDepthFormat(Format format)
{
case Format::D16_UNORM:
case Format::D32_FLOAT:
+ case Format::D32_FLOAT_S8_UINT:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool isStencilFormat(Format format)
+{
+ switch (format)
+ {
+ case Format::D32_FLOAT_S8_UINT:
return true;
default:
return false;