summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-expr.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-08 18:29:32 -0800
committerGitHub <noreply@github.com>2024-02-08 18:29:32 -0800
commitf44da6cc5c0f211c13bd1eb0743d79c7861ea64e (patch)
tree3ad4edb5e7806c41003280ebf60fd6419a742105 /source/slang/slang-check-expr.cpp
parenta16f712bb99e426519c9a556b17b54bcc4d1d22d (diff)
Support pointers in SPIRV. (#3561)
* Support pointers in SPIRV. * Fix test. * Enhance test. * Fix test. * Cleanup.
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
-rw-r--r--source/slang/slang-check-expr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index f9adcc91a..2f4906826 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -479,7 +479,10 @@ namespace Slang
derefExpr->base = base;
derefExpr->type = QualType(elementType);
- derefExpr->type.isLeftValue = base->type.isLeftValue;
+ if (as<PtrType>(base->type))
+ derefExpr->type.isLeftValue = true;
+ else
+ derefExpr->type.isLeftValue = base->type.isLeftValue;
return derefExpr;
}