summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/spirv_to_nir.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-04-28 04:45:50 -0700
committerJason Ekstrand <[email protected]>2018-03-07 12:13:47 -0800
commitadc077797aa8abb74a7aa539b1601e405f150f5f (patch)
treeb6685a0671698e4a00ba03ccf496b91447a39def /src/compiler/spirv/spirv_to_nir.c
parent5162a1d88428c9a89454c17bc7d12539d7d5714d (diff)
spirv: Add initial subgroup support
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 98fdd700b0b..4d2c1533d24 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3292,6 +3292,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(multiview, cap);
break;
+ case SpvCapabilityGroupNonUniform:
+ spv_check_supported(subgroup_basic, cap);
+ break;
+
case SpvCapabilityVariablePointersStorageBuffer:
case SpvCapabilityVariablePointers:
spv_check_supported(variable_pointers, cap);
@@ -3873,6 +3877,43 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode,
vtn_handle_barrier(b, opcode, w, count);
break;
+ case SpvOpGroupNonUniformElect:
+ case SpvOpGroupNonUniformAll:
+ case SpvOpGroupNonUniformAny:
+ case SpvOpGroupNonUniformAllEqual:
+ case SpvOpGroupNonUniformBroadcast:
+ case SpvOpGroupNonUniformBroadcastFirst:
+ case SpvOpGroupNonUniformBallot:
+ case SpvOpGroupNonUniformInverseBallot:
+ case SpvOpGroupNonUniformBallotBitExtract:
+ case SpvOpGroupNonUniformBallotBitCount:
+ case SpvOpGroupNonUniformBallotFindLSB:
+ case SpvOpGroupNonUniformBallotFindMSB:
+ case SpvOpGroupNonUniformShuffle:
+ case SpvOpGroupNonUniformShuffleXor:
+ case SpvOpGroupNonUniformShuffleUp:
+ case SpvOpGroupNonUniformShuffleDown:
+ case SpvOpGroupNonUniformIAdd:
+ case SpvOpGroupNonUniformFAdd:
+ case SpvOpGroupNonUniformIMul:
+ case SpvOpGroupNonUniformFMul:
+ case SpvOpGroupNonUniformSMin:
+ case SpvOpGroupNonUniformUMin:
+ case SpvOpGroupNonUniformFMin:
+ case SpvOpGroupNonUniformSMax:
+ case SpvOpGroupNonUniformUMax:
+ case SpvOpGroupNonUniformFMax:
+ case SpvOpGroupNonUniformBitwiseAnd:
+ case SpvOpGroupNonUniformBitwiseOr:
+ case SpvOpGroupNonUniformBitwiseXor:
+ case SpvOpGroupNonUniformLogicalAnd:
+ case SpvOpGroupNonUniformLogicalOr:
+ case SpvOpGroupNonUniformLogicalXor:
+ case SpvOpGroupNonUniformQuadBroadcast:
+ case SpvOpGroupNonUniformQuadSwap:
+ vtn_handle_subgroup(b, opcode, w, count);
+ break;
+
default:
vtn_fail("Unhandled opcode");
}