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>2021-03-08 14:52:03 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2021-03-08 14:52:03 +0300
commitd6c2c1b39a7d313620edea172e75872a02f5692a (patch)
treef34b8b1f6db0eecf95fb83b1347b4d0d6e0eab0f /spirv_hlsl.cpp
parent5570043af3bfb7729f1bb8462d401f1fdf95e4cd (diff)
HLSL: Support logical subgroup ops.
Diffstat (limited to 'spirv_hlsl.cpp')
-rw-r--r--spirv_hlsl.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp
index 04e380e5..c0b6d1d9 100644
--- a/spirv_hlsl.cpp
+++ b/spirv_hlsl.cpp
@@ -4635,12 +4635,8 @@ void CompilerHLSL::emit_subgroup_op(const Instruction &i)
break;
case OpGroupNonUniformAllEqual:
- {
- auto &type = get<SPIRType>(result_type);
- emit_unary_func_op(result_type, id, ops[3],
- type.basetype == SPIRType::Boolean ? "WaveActiveAllEqualBool" : "WaveActiveAllEqual");
+ emit_unary_func_op(result_type, id, ops[3], "WaveActiveAllEqual");
break;
- }
// clang-format off
#define HLSL_GROUP_OP(op, hlsl_op, supports_scan) \
@@ -4688,6 +4684,9 @@ case OpGroupNonUniform##op: \
HLSL_GROUP_OP(BitwiseAnd, BitAnd, false)
HLSL_GROUP_OP(BitwiseOr, BitOr, false)
HLSL_GROUP_OP(BitwiseXor, BitXor, false)
+ HLSL_GROUP_OP_CAST(LogicalAnd, BitAnd, uint_type)
+ HLSL_GROUP_OP_CAST(LogicalOr, BitOr, uint_type)
+ HLSL_GROUP_OP_CAST(LogicalXor, BitXor, uint_type)
#undef HLSL_GROUP_OP
#undef HLSL_GROUP_OP_CAST