summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 10790567e..8e0c64d1a 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -1250,6 +1250,10 @@ void CLikeSourceEmitter::emitIntrinsicCallExprImpl(
SLANG_RELEASE_ASSERT(argCount > argIndex);
IRType* type = args[argIndex].get()->getDataType();
+ if (auto baseTextureType = as<IRTextureType>(type))
+ {
+ type = baseTextureType->getElementType();
+ }
IRBasicType* underlyingType = nullptr;
if (auto basicType = as<IRBasicType>(type))