ac/nir: properly handle large global access constant offsets
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 61ac5acca3 ("radv,ac/nir: lower global access to _amd global access intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6321
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15951>
This commit is contained in:
@@ -144,8 +144,10 @@ process_instr(nir_builder *b, nir_instr *instr, void *_)
|
||||
|
||||
b->cursor = nir_before_instr(&intrin->instr);
|
||||
|
||||
if (off_const > UINT32_MAX)
|
||||
if (off_const > UINT32_MAX) {
|
||||
addr = nir_iadd_imm(b, addr, off_const);
|
||||
off_const = 0;
|
||||
}
|
||||
|
||||
nir_intrinsic_instr *new_intrin = nir_intrinsic_instr_create(b->shader, op);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user