diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index d4136deeff0..50448b7bd0c 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -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)); diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c index 9317613f8c7..f2154cde97a 100644 --- a/src/panfrost/util/pan_lower_framebuffer.c +++ b/src/panfrost/util/pan_lower_framebuffer.c @@ -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);