pan/mdg: Model zero/sign extension for 8/16-bit loads

The destinations are packed as if 32-bit even for 8/16-bit loads, so the mask
needs to be constructed accordingly.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14888>
This commit is contained in:
Alyssa Rosenzweig 2022-02-04 17:36:27 -05:00 committed by Marge Bot
parent ff970767a3
commit 8d949ecd3a

View file

@ -1199,7 +1199,9 @@ mir_set_intr_mask(nir_instr *instr, midgard_instruction *ins, bool is_read)
if (is_read) {
nir_mask = mask_of(nir_intrinsic_dest_components(intr));
dsize = nir_dest_bit_size(intr->dest);
/* Extension is mandatory for 8/16-bit loads */
dsize = nir_dest_bit_size(intr->dest) == 64 ? 64 : 32;
} else {
nir_mask = nir_intrinsic_write_mask(intr);
dsize = OP_IS_COMMON_STORE(ins->op) ?