summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-util.cpp')
-rw-r--r--source/slang/slang-ir-util.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp
index 11eb4dfa0..4fb4d61ae 100644
--- a/source/slang/slang-ir-util.cpp
+++ b/source/slang/slang-ir-util.cpp
@@ -2749,6 +2749,7 @@ bool isPointerToImmutableLocation(IRInst* loc)
switch (loc->getOp())
{
case kIROp_GetStructuredBufferPtr:
+ case kIROp_RWStructuredBufferGetElementPtr:
case kIROp_ImageSubscript:
return isPointerToImmutableLocation(loc->getOperand(0));
default:
@@ -2784,6 +2785,8 @@ bool isPointerToImmutableLocation(IRInst* loc)
case AddressSpace::UniformConstant:
return true;
}
+ if (ptrType->getAccessQualifier() == AccessQualifier::Immutable)
+ return true;
}
return false;
}