agx: enable bitfield lowering for cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
This commit is contained in:
@@ -3341,6 +3341,14 @@ lower_bit_size_callback(const nir_instr *instr, UNUSED void *_)
|
||||
* implemented natively.
|
||||
*/
|
||||
nir_alu_instr *alu = nir_instr_as_alu(instr);
|
||||
|
||||
switch (alu->op) {
|
||||
case nir_op_bitfield_reverse:
|
||||
return alu->def.bit_size < 32 ? 32 : 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (alu->def.bit_size == 8 && !is_conversion_to_8bit(alu->op))
|
||||
return 16;
|
||||
else if (alu->def.bit_size == 1 && alu->src[0].src.ssa->bit_size == 8)
|
||||
|
||||
@@ -335,6 +335,8 @@ static const nir_shader_compiler_options agx_nir_options = {
|
||||
.lower_flrp32 = true,
|
||||
.lower_fpow = true,
|
||||
.lower_fmod = true,
|
||||
.lower_bitfield_extract8 = true,
|
||||
.lower_bitfield_extract16 = true,
|
||||
.lower_bitfield_insert = true,
|
||||
.lower_ifind_msb = true,
|
||||
.lower_find_lsb = true,
|
||||
|
||||
Reference in New Issue
Block a user