diff options
author | Jason Ekstrand <[email protected]> | 2017-10-02 18:19:44 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | 34c60ea02bdcb5ebea1459b71bc94eea3b7b6ac3 (patch) | |
tree | 4ccc529786d506ae00d16a682a4659a7a0a9d8c5 /src/compiler/nir/nir_intrinsics.h | |
parent | cc587ee9a7212633edb7f30268920eec7d8fceef (diff) |
nir: Add new SPIR-V ballot ALU intrinsics and lowering
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.h')
-rw-r--r-- | src/compiler/nir/nir_intrinsics.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h index ede29277876..b8a67355900 100644 --- a/src/compiler/nir/nir_intrinsics.h +++ b/src/compiler/nir/nir_intrinsics.h @@ -125,6 +125,25 @@ INTRINSIC(vote_any, 1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIM INTRINSIC(vote_all, 1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) INTRINSIC(vote_eq, 1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) +/** Ballot ALU operations from SPIR-V. + * + * These operations work like their ALU counterparts except that the operate + * on a uvec4 which is treated as a 128bit integer. Also, they are, in + * general, free to ignore any bits which are above the subgroup size. + */ +INTRINSIC(ballot_bitfield_extract, 2, ARR(4, 1), true, 1, 0, + 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) +INTRINSIC(ballot_bit_count_reduce, 1, ARR(4), true, 1, 0, + 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) +INTRINSIC(ballot_bit_count_inclusive, 1, ARR(4), true, 1, 0, + 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) +INTRINSIC(ballot_bit_count_exclusive, 1, ARR(4), true, 1, 0, + 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) +INTRINSIC(ballot_find_lsb, 1, ARR(4), true, 1, 0, + 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) +INTRINSIC(ballot_find_msb, 1, ARR(4), true, 1, 0, + 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE) + /** * Basic Geometry Shader intrinsics. * |