diff options
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 12 |
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; } |
