mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
pan: use imm-helpers
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855>
This commit is contained in:
parent
80212172e4
commit
45e7e16222
2 changed files with 6 additions and 8 deletions
|
|
@ -262,7 +262,7 @@ midgard_nir_lower_global_load_instr(nir_builder *b, nir_instr *instr,
|
|||
comps[ncomps++] = nir_channel(b, load, i);
|
||||
|
||||
totalsz -= loadsz;
|
||||
addr = nir_iadd(b, addr, nir_imm_intN_t(b, loadsz / 8, addr->bit_size));
|
||||
addr = nir_iadd_imm(b, addr, loadsz / 8);
|
||||
}
|
||||
|
||||
assert(ncomps == nir_dest_num_components(intr->dest));
|
||||
|
|
|
|||
|
|
@ -266,14 +266,12 @@ pan_pack_unorm_1010102(nir_builder *b, nir_ssa_def *v)
|
|||
|
||||
nir_ssa_def *bottom2 = nir_iand(b, s, nir_imm_ivec4(b, 0x3, 0x3, 0x3, 0x3));
|
||||
|
||||
nir_ssa_def *top = nir_ior(
|
||||
b,
|
||||
nir_ssa_def *top =
|
||||
nir_ior(b,
|
||||
nir_ishl(b, nir_channel(b, bottom2, 0), nir_imm_int(b, 24 + 0)),
|
||||
nir_ishl(b, nir_channel(b, bottom2, 1), nir_imm_int(b, 24 + 2))),
|
||||
nir_ior(b,
|
||||
nir_ishl(b, nir_channel(b, bottom2, 2), nir_imm_int(b, 24 + 4)),
|
||||
nir_ishl(b, nir_channel(b, bottom2, 3), nir_imm_int(b, 24 + 6))));
|
||||
nir_ior(b, nir_ishl_imm(b, nir_channel(b, bottom2, 0), 24 + 0),
|
||||
nir_ishl_imm(b, nir_channel(b, bottom2, 1), 24 + 2)),
|
||||
nir_ior(b, nir_ishl_imm(b, nir_channel(b, bottom2, 2), 24 + 4),
|
||||
nir_ishl_imm(b, nir_channel(b, bottom2, 3), 24 + 6)));
|
||||
|
||||
nir_ssa_def *p = nir_ior(b, top, top8_rgb);
|
||||
return nir_replicate(b, p, 4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue