anv: fixup load_ubo lowering

Use ult like nir_lower_explicit_io.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 775f8ec105)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
This commit is contained in:
Lionel Landwerlin 2025-11-15 22:59:16 +02:00 committed by Dylan Baker
parent 1d97f7da0c
commit db8281fdbb
2 changed files with 3 additions and 3 deletions

View file

@ -1074,7 +1074,7 @@
"description": "anv: fixup load_ubo lowering",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -73,7 +73,7 @@ lower_ubo_load_instr(nir_builder *b, nir_intrinsic_instr *load,
aligned_offset + 64, aligned_offset + 80,
aligned_offset + 96, aligned_offset + 112);
nir_def* mask =
nir_bcsel(b, nir_ilt(b, offsets, bound),
nir_bcsel(b, nir_ult(b, offsets, bound),
nir_imm_int(b, 0xFFFFFFFF),
nir_imm_int(b, 0x00000000));
@ -102,7 +102,7 @@ lower_ubo_load_instr(nir_builder *b, nir_intrinsic_instr *load,
unsigned load_size = byte_size * load->num_components;
nir_def *in_bounds =
nir_ilt(b, nir_iadd_imm(b, offset, load_size - 1), bound);
nir_ult(b, nir_iadd_imm(b, offset, load_size - 1), bound);
nir_push_if(b, in_bounds);