summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-reflection-api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-reflection-api.cpp')
-rw-r--r--source/slang/slang-reflection-api.cpp9
1 files changed, 4 insertions, 5 deletions
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<TextureSamplerType>(type))
- {
- return SLANG_BINDING_TYPE_COMBINED_TEXTURE_SAMPLER;
- }
- else if( auto resourceType = as<ResourceType>(type) )
+ if( auto resourceType = as<ResourceType>(type) )
{
+ if (resourceType->isCombined())
+ return SlangBindingType(SLANG_BINDING_TYPE_COMBINED_TEXTURE_SAMPLER);
+
auto shape = resourceType->getBaseShape();
auto access = resourceType->getAccess();