summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-expr.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-09-20 15:11:23 -0700
committerGitHub <noreply@github.com>2024-09-20 15:11:23 -0700
commit490834924cc390cb812713c225b9a8227c66cf1f (patch)
tree5644e2a18cb085692d5fe9625f42582db07447be /source/slang/slang-check-expr.cpp
parentb4c851fb1419f869bddaa08487f58376bc0a7144 (diff)
Initial `Atomic<T>` type implementation. (#5125)
* Initial Atomic<T> type implementation. * Update design doc. * Fix. * Add test. * Fixes and add tests. * Fix WGSL. * Fix glsl. * Fix metal. * experiemnt with github metal. * experiment github metal 2 * github metal experiment 3 * experiment with github metal 4. * experiment with metal 5. * experiment 7. * metal experiment 8. * Fix metal tests. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
-rw-r--r--source/slang/slang-check-expr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index 5233008fd..1b9725a8c 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -2274,10 +2274,14 @@ namespace Slang
expr->left = maybeOpenRef(expr->left);
auto type = expr->left->type;
+ if (auto atomicType = as<AtomicType>(type))
+ {
+ type = atomicType->getElementType();
+ }
auto right = maybeOpenRef(expr->right);
expr->right = coerce(CoercionSite::Assignment, type, right);
- if (!type.isLeftValue)
+ if (!expr->left->type.isLeftValue)
{
if (as<ErrorType>(type))
{