nir/lower_bit_size: Pass a nir_instr to the callback
This way we can start supporting more than just ALU ops. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7482>
This commit is contained in:

committed by
Marge Bot

parent
15c6e05a72
commit
2c4b47184d
@@ -2948,11 +2948,15 @@ mem_vectorize_callback(unsigned align_mul, unsigned align_offset,
|
||||
}
|
||||
|
||||
static unsigned
|
||||
lower_bit_size_callback(const nir_alu_instr *alu, void *_)
|
||||
lower_bit_size_callback(const nir_instr *instr, void *_)
|
||||
{
|
||||
struct radv_device *device = _;
|
||||
enum chip_class chip = device->physical_device->rad_info.chip_class;
|
||||
|
||||
if (instr->type != nir_instr_type_alu)
|
||||
return 0;
|
||||
nir_alu_instr *alu = nir_instr_as_alu(instr);
|
||||
|
||||
if (alu->dest.dest.ssa.bit_size & (8 | 16)) {
|
||||
unsigned bit_size = alu->dest.dest.ssa.bit_size;
|
||||
switch (alu->op) {
|
||||
|
Reference in New Issue
Block a user