Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2022-09-22 12:36:48 +0300
committerGitHub <noreply@github.com>2022-09-22 12:36:48 +0300
commit81ba8f78f6646e5635129bd738f25bb3f43bbdb9 (patch)
treeaaf9b8eccf1c3a0a1db1c3db20492a4fab87ca11
parentddaa2da6295c456e8f3b65e4a9e026a115e65627 (diff)
parent291def0793b3abea934f034742d60ad54f9036cb (diff)
Merge pull request #2025 from KhronosGroup/fix-2009
MSL: Block 64-bit atomics and fix some reserved keywords
-rw-r--r--spirv_msl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/spirv_msl.cpp b/spirv_msl.cpp
index dd80fbbc..d81a8189 100644
--- a/spirv_msl.cpp
+++ b/spirv_msl.cpp
@@ -9413,6 +9413,9 @@ void CompilerMSL::emit_atomic_func_op(uint32_t result_type, uint32_t result_id,
else if (opcode == OpAtomicSMax || opcode == OpAtomicSMin)
expected_type = to_signed_basetype(type.width);
+ if (type.width == 64)
+ SPIRV_CROSS_THROW("MSL currently does not support 64-bit atomics.");
+
auto remapped_type = type;
remapped_type.basetype = expected_type;
@@ -13734,6 +13737,8 @@ const std::unordered_set<std::string> &CompilerMSL::get_reserved_keyword_set()
"vertex",
"fragment",
"compute",
+ "constant",
+ "device",
"bias",
"level",
"gradient2d",
@@ -13860,6 +13865,8 @@ const std::unordered_set<std::string> &CompilerMSL::get_reserved_keyword_set()
"M_SQRT2",
"M_SQRT1_2",
"quad_broadcast",
+ "thread",
+ "threadgroup",
};
return keywords;