From fa3287fb6ec38127bad8fe948fbc190e7a3d54b2 Mon Sep 17 00:00:00 2001 From: Simon Kallweit <64953474+skallweitNV@users.noreply.github.com> Date: Thu, 17 Oct 2024 23:59:10 +0200 Subject: update slang-rhi (#5258) * update slang-rhi * update render-test to use new slang-rhi apis --------- Co-authored-by: Yong He --- tools/render-test/shader-input-layout.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tools/render-test/shader-input-layout.cpp') 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 - 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: -- cgit v1.2.3