diff options
| author | Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> | 2024-10-17 23:59:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-17 14:59:10 -0700 |
| commit | fa3287fb6ec38127bad8fe948fbc190e7a3d54b2 (patch) | |
| tree | 6644ad1ddcdecfb5323c34423bd3056bc705936d /tools/render-test/shader-input-layout.cpp | |
| parent | ee11a45ab672c57ad98092e29a10d3aba4efb6c6 (diff) | |
update slang-rhi (#5258)
* update slang-rhi
* update render-test to use new slang-rhi apis
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index 61951db50..07711d712 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -21,8 +21,7 @@ namespace renderer_test { for (int i = 0; i < int(Format::_Count); ++i) { - FormatInfo info; - rhiGetFormatInfo(Format(i), &info); + const FormatInfo& info = getFormatInfo(Format(i)); if (slice == info.name) { return Format(i); @@ -1161,7 +1160,7 @@ namespace renderer_test // T for type to return, F for function pointer to operate on uint8->T template<typename T, typename F> - void generateTextureDataWithTargetTStorage(TextureData& output, const InputTextureDesc& desc, rhi::FormatInfo& formatInfo, F loadUint8ToT) + void generateTextureDataWithTargetTStorage(TextureData& output, const InputTextureDesc& desc, const rhi::FormatInfo& formatInfo, F loadUint8ToT) { // the following function assumes input of 0 or 1 since our testing framework only tests with 0 or 1 TextureData work; @@ -1235,8 +1234,7 @@ namespace renderer_test } void generateTextureData(TextureData& output, const InputTextureDesc& desc) { - rhi::FormatInfo formatInfo; - rhiGetFormatInfo(desc.format, &formatInfo); + const FormatInfo& formatInfo = getFormatInfo(desc.format); switch (desc.format) { @@ -1354,8 +1352,7 @@ namespace renderer_test kFloat, }; SimpleScalarType type; - rhi::FormatInfo formatInfo; - rhiGetFormatInfo(inputDesc.format, &formatInfo); + const rhi::FormatInfo& formatInfo = getFormatInfo(inputDesc.format); switch (formatInfo.channelType) { case SLANG_SCALAR_TYPE_UINT64: |
