diff options
author | Chip Davis <cdavis@codeweavers.com> | 2021-02-21 20:14:38 +0300 |
---|---|---|
committer | Chip Davis <cdavis@codeweavers.com> | 2021-07-21 08:25:09 +0300 |
commit | 03ad13bae68da4999c2a268e2a62a5bb0e092041 (patch) | |
tree | 35b2c57bff4c0eb8acd9c1081e5df0236f215aaa /spirv_msl.cpp | |
parent | 6196e3b029689add4d34e011e5edd8f6247da348 (diff) |
MSL: Simplify spvSubgroupBallot().
A bitcast to `uint2` will do just fine. I honestly don't know why I
didn't do it this way earlier.
Diffstat (limited to 'spirv_msl.cpp')
-rw-r--r-- | spirv_msl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spirv_msl.cpp b/spirv_msl.cpp index 98de7cad..76c55652 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -5383,9 +5383,7 @@ void CompilerMSL::emit_custom_functions() statement("// SPIR-V callers expect a uint4. We must convert."); statement("// FIXME: This won't include higher bits if Apple ever supports"); statement("// 128 lanes in an SIMD-group."); - statement( - "return uint4((uint)((simd_vote::vote_t)vote & 0xFFFFFFFF), (uint)(((simd_vote::vote_t)vote >> " - "32) & 0xFFFFFFFF), 0, 0);"); + statement("return uint4(as_type<uint2>((simd_vote::vote_t)vote), 0, 0);"); } end_scope(); statement(""); |