mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 22:30:12 +01:00
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> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38477>
This commit is contained in:
parent
4a2df9127f
commit
775f8ec105
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ lower_ubo_load_instr(nir_builder *b, nir_intrinsic_instr *load,
|
||||||
aligned_offset + 64, aligned_offset + 80,
|
aligned_offset + 64, aligned_offset + 80,
|
||||||
aligned_offset + 96, aligned_offset + 112);
|
aligned_offset + 96, aligned_offset + 112);
|
||||||
nir_def* mask =
|
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, 0xFFFFFFFF),
|
||||||
nir_imm_int(b, 0x00000000));
|
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;
|
unsigned load_size = byte_size * load->num_components;
|
||||||
nir_def *in_bounds =
|
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);
|
nir_push_if(b, in_bounds);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue