From 4c78efd0c34442866f20e9d00bbb6908115c9a01 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 16 Nov 2023 14:32:33 -0800 Subject: Unify stdlib `Texture` types into one generic type. (#3327) * Unify Texture types in stdlib into 1 generic type. * Fixes. * Fix. * Fixes. * Fix reflection. * Fix binding reflection. * Add gather intrinsics. * Fix gather intrinsics. * Fix texture type toText. * Fix intrinsic. * fix cuda intrinsic. * Fix project files. * cleanup. * Fix. * Fix. * Fix sampler feedback test. * Fix getDimension intrinsics. * Fix spirv sample image intrinsics. * Fix test. * Fix GLSL intrinsic. * Cleanup. --------- Co-authored-by: Yong He --- source/slang/slang-reflection-api.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/slang/slang-reflection-api.cpp') diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp index 3a521589e..f0540deb3 100644 --- a/source/slang/slang-reflection-api.cpp +++ b/source/slang/slang-reflection-api.cpp @@ -1263,12 +1263,11 @@ namespace Slang SlangBindingType _calcResourceBindingType( Type* type) { - if(const auto combinedTextureSamplerType = as(type)) - { - return SLANG_BINDING_TYPE_COMBINED_TEXTURE_SAMPLER; - } - else if( auto resourceType = as(type) ) + if( auto resourceType = as(type) ) { + if (resourceType->isCombined()) + return SlangBindingType(SLANG_BINDING_TYPE_COMBINED_TEXTURE_SAMPLER); + auto shape = resourceType->getBaseShape(); auto access = resourceType->getAccess(); -- cgit v1.2.3