pan/mdg: Fix 64-bit address arithmetic
Cc: mesa-stable Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19238>
This commit is contained in:

committed by
Marge Bot

parent
4a626d9829
commit
9e2ce225e6
@@ -256,9 +256,13 @@ mir_set_offset(compiler_context *ctx, midgard_instruction *ins, nir_src *offset,
|
|||||||
struct mir_address match = mir_match_offset(offset->ssa, first_free, true);
|
struct mir_address match = mir_match_offset(offset->ssa, first_free, true);
|
||||||
|
|
||||||
if (match.A.def) {
|
if (match.A.def) {
|
||||||
|
unsigned bitsize = match.A.def->bit_size;
|
||||||
|
assert(bitsize == 32 || bitsize == 64);
|
||||||
|
|
||||||
ins->src[1] = nir_ssa_index(match.A.def);
|
ins->src[1] = nir_ssa_index(match.A.def);
|
||||||
ins->swizzle[1][0] = match.A.comp;
|
ins->swizzle[1][0] = match.A.comp;
|
||||||
ins->src_types[1] = nir_type_uint | match.A.def->bit_size;
|
ins->src_types[1] = nir_type_uint | bitsize;
|
||||||
|
ins->load_store.bitsize_toggle = (bitsize == 64);
|
||||||
} else {
|
} else {
|
||||||
ins->load_store.bitsize_toggle = true;
|
ins->load_store.bitsize_toggle = true;
|
||||||
ins->load_store.arg_comp = seg & 0x3;
|
ins->load_store.arg_comp = seg & 0x3;
|
||||||
|
Reference in New Issue
Block a user