summaryrefslogtreecommitdiff
path: root/source/slang/slang-type-layout.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-type-layout.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-type-layout.cpp')
-rw-r--r--source/slang/slang-type-layout.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp
index 2447f5787..57635122e 100644
--- a/source/slang/slang-type-layout.cpp
+++ b/source/slang/slang-type-layout.cpp
@@ -4427,6 +4427,10 @@ static TypeLayoutResult _createTypeLayout(
{
return createArrayLikeTypeLayout(context, arrayType, arrayType->getElementType(), arrayType->getElementCount());
}
+ else if (auto atomicType = as<AtomicType>(type))
+ {
+ return _createTypeLayout(context, atomicType->getElementType());
+ }
else if (auto ptrType = as<PtrTypeBase>(type))
{
RefPtr<PointerTypeLayout> ptrLayout = new PointerTypeLayout();