summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-01-24 15:06:08 -0500
committerGitHub <noreply@github.com>2020-01-24 15:06:08 -0500
commitb8f294445b998eadb9b09e2b91eb462b881eaf2e (patch)
tree8607e5d2f6c2c2b4b7545a721d6d58e6e557e5c0 /source/slang/slang-emit-c-like.cpp
parent394983d61efa2bf99ba96aa68a47df8927a8a634 (diff)
Texture Sample available in CUDA (#1176)
* WIP: Trying to figure out how texturing will work with CUDA. * WIP: Fixes for CUDA layout. Initial CUDA texture test. * WIP: Outputs something compilable by CUDA for TextureND.Sample * 2d texture working with CUDA. * Fix how binding for SamplerState occurs in CUDA. * Small tidy up of comments.
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))