summaryrefslogtreecommitdiff
path: root/source/slang/core.meta.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-10-17 20:14:22 -0700
committerGitHub <noreply@github.com>2024-10-17 20:14:22 -0700
commita618b8c5e249b0f20e6c0c95f9da1b5cbfdbf08b (patch)
treed583c373d574a265fefe7f288a96c4b382e259b8 /source/slang/core.meta.slang
parent11e1ecafa09396a3559fe245d729b40ce4f25d52 (diff)
Cleanup atomic intrinsics. (#5324)
* Cleanup atomic intrinsics. * Fix. * Fix glsl. * Remove hacky intrinsic expansion logic for glsl image atomics. * Fix all tests. * Fix. * Add `InterlockedAddF16Emulated`. * Fix glsl intrinsic. * Fix.
Diffstat (limited to 'source/slang/core.meta.slang')
-rw-r--r--source/slang/core.meta.slang20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang
index 084654d0f..67ec91cf6 100644
--- a/source/slang/core.meta.slang
+++ b/source/slang/core.meta.slang
@@ -299,6 +299,18 @@ interface __BuiltinSignedArithmeticType : __BuiltinArithmeticType {}
interface __BuiltinIntegerType : __BuiltinArithmeticType, IInteger
{}
+/// Represent a `int` or `uint` type.
+[sealed]
+[builtin]
+interface __BuiltinInt32Type : __BuiltinIntegerType
+{}
+
+/// Represent a `int64_t` or `uint64_t` type.
+[sealed]
+[builtin]
+interface __BuiltinInt64Type : __BuiltinIntegerType
+{}
+
/// Represent builtin types that can represent a real number.
[sealed]
[builtin]
@@ -603,6 +615,14 @@ ${{{{
, __BuiltinArithmeticType
, __BuiltinIntegerType
${{{{
+ if (kBaseTypes[tt].tag == BaseType::Int || kBaseTypes[tt].tag == BaseType::UInt)
+}}}}
+ , __BuiltinInt32Type
+${{{{
+ if (kBaseTypes[tt].tag == BaseType::Int64 || kBaseTypes[tt].tag == BaseType::UInt64)
+}}}}
+ , __BuiltinInt64Type
+${{{{
; // fall through
case BaseType::Bool:
}}}}