summaryrefslogtreecommitdiff
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-ir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index e624ef1fd..92da981ad 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -4690,6 +4690,11 @@ namespace Slang
{
type = getVectorType(matrixType->getElementType(), matrixType->getColumnCount());
}
+ else if (auto basicType = as<IRBasicType>(basePtrType->getValueType()))
+ {
+ // HLSL support things like float.x, in which case we just return the base pointer.
+ return basePtr;
+ }
SLANG_RELEASE_ASSERT(type);
auto inst = createInst<IRGetElementPtr>(
this,