nir: Add 1-bit Boolean opcodes
We also have to add support for 1-bit integers while we're here so we get 1-bit variants of iand, ior, and inot. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:

committed by
Jason Ekstrand

parent
615cc26b97
commit
191a1dce92
@@ -110,7 +110,8 @@ nir_op_matches_search_op(nir_op nop, uint16_t sop)
|
||||
|
||||
#define MATCH_BCONV_CASE(op) \
|
||||
case nir_search_op_##op: \
|
||||
return nop == nir_op_##op##32;
|
||||
return nop == nir_op_##op##1 || \
|
||||
nop == nir_op_##op##32;
|
||||
|
||||
switch (sop) {
|
||||
MATCH_FCONV_CASE(i2f)
|
||||
@@ -160,6 +161,7 @@ nir_op_for_search_op(uint16_t sop, unsigned bit_size)
|
||||
#define RET_BCONV_CASE(op) \
|
||||
case nir_search_op_##op: \
|
||||
switch (bit_size) { \
|
||||
case 1: return nir_op_##op##1; \
|
||||
case 32: return nir_op_##op##32; \
|
||||
default: unreachable("Invalid bit size"); \
|
||||
}
|
||||
|
Reference in New Issue
Block a user