From b8f294445b998eadb9b09e2b91eb462b881eaf2e Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 24 Jan 2020 15:06:08 -0500 Subject: 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. --- source/slang/slang-emit-c-like.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang-emit-c-like.cpp') 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(type)) + { + type = baseTextureType->getElementType(); + } IRBasicType* underlyingType = nullptr; if (auto basicType = as(type)) -- cgit v1.2.3