summaryrefslogtreecommitdiffstats
path: root/tools/render-test/shader-input-layout.cpp
diff options
context:
space:
mode:
authorSimon Kallweit <64953474+skallweitNV@users.noreply.github.com>2024-09-19 17:16:48 +0200
committerGitHub <noreply@github.com>2024-09-19 23:16:48 +0800
commit3861be7ce5bd3ffc1bc60f2c3f7f41647145d575 (patch)
treeb473120fa3745c6b33f2d5f7e3df17b45a6412be /tools/render-test/shader-input-layout.cpp
parentfe71eafcb6e11a420ab537f257e6b8971d31d9de (diff)
refactor render test to use latest slang-rhi (#5119)
* refactor render test to use latest slang-rhi * update slang-rhi * update slang-rhi * update slang-rhi * update slang-rhi
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
-rw-r--r--tools/render-test/shader-input-layout.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp
index 97b82e1e9..61951db50 100644
--- a/tools/render-test/shader-input-layout.cpp
+++ b/tools/render-test/shader-input-layout.cpp
@@ -19,9 +19,15 @@ namespace renderer_test
Format _getFormatFromName(const UnownedStringSlice& slice)
{
-#define SLANG_FORMAT_CASE(name, blockSizeInBytes, pixelsPerBlock) if (slice == #name) return Format::name; else
-
- SLANG_RHI_FORMAT(SLANG_FORMAT_CASE)
+ for (int i = 0; i < int(Format::_Count); ++i)
+ {
+ FormatInfo info;
+ rhiGetFormatInfo(Format(i), &info);
+ if (slice == info.name)
+ {
+ return Format(i);
+ }
+ }
return Format::Unknown;
}