diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-06-25 22:07:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-25 22:07:41 -0700 |
| commit | 969dd4cc7246bfe89103efcb00f399606e804e98 (patch) | |
| tree | 6b44527d72a08f4b39848bf5cc2efe03ed5e6c90 /source/slang/slang-emit-c-like.cpp | |
| parent | 63e0064bd3a2007adf17a35d3c58894d90ddc04a (diff) | |
Support atomic intrinsics for Metal (#4473)
* Support atomic intrinsics for Metal
This commit adds a support for the atomic intrinsics in Metal.
The atomic member functions for buffers is not implemented yet.
Metal requires the first argument for the atomic functions to be an
atomic data type. This implementation rely on the fact that we can do a
C-style type casting from a regular data type to an atomic data type.
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index e9ab58bca..6062875b3 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -2889,6 +2889,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst) case kIROp_AtomicCounterIncrement: case kIROp_AtomicCounterDecrement: case kIROp_StructuredBufferGetDimensions: + case kIROp_MetalAtomicCast: emitInstStmt(inst); break; |
