summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-specialize-buffer-load-arg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-specialize-buffer-load-arg.cpp')
-rw-r--r--source/slang/slang-ir-specialize-buffer-load-arg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-ir-specialize-buffer-load-arg.cpp b/source/slang/slang-ir-specialize-buffer-load-arg.cpp
index a5a3dd2d9..c473c6047 100644
--- a/source/slang/slang-ir-specialize-buffer-load-arg.cpp
+++ b/source/slang/slang-ir-specialize-buffer-load-arg.cpp
@@ -89,7 +89,7 @@ struct FuncBufferLoadSpecializationCondition : FunctionCallSpecializeCondition
a = argLoad->getPtr();
// We can safely defer a load to the callee if the source dest is immutable.
- if (isPointerToImmutableLocation(a))
+ if (isPointerToImmutableLocation(getRootAddr(a)))
continue;
// Otherwise, we check if there is no other instructions in between the load and the