panvk: Don't define push_constant range/base when we don't have to
We just removed a lowering pass making use of these because base/range are not updated by some other lowering passes, so let's not encourage future use of base/range by keeping them set to zero. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
This commit is contained in:

committed by
Marge Bot

parent
3e473a9d4c
commit
22bbc8f87b
@@ -38,10 +38,9 @@ lower_load_blend_const(nir_builder *b, nir_instr *instr, UNUSED void *data)
|
||||
|
||||
unsigned offset = offsetof(struct panvk_graphics_sysvals, blend.constants);
|
||||
nir_def *blend_consts = nir_load_push_constant(
|
||||
b, intr->def.num_components, intr->def.bit_size, nir_imm_int(b, 0),
|
||||
b, intr->def.num_components, intr->def.bit_size,
|
||||
/* Push constants are placed first, and then come the sysvals. */
|
||||
.base = offset + SYSVALS_PUSH_CONST_BASE,
|
||||
.range = intr->def.num_components * intr->def.bit_size / 8);
|
||||
nir_imm_int(b, SYSVALS_PUSH_CONST_BASE + offset));
|
||||
|
||||
nir_def_rewrite_uses(&intr->def, blend_consts);
|
||||
return true;
|
||||
|
@@ -83,8 +83,7 @@ static nir_def *
|
||||
get_layer_id(nir_builder *b)
|
||||
{
|
||||
#if PAN_ARCH <= 7
|
||||
return nir_load_push_constant(b, 1, 32, nir_imm_int(b, 0), .base = 0,
|
||||
.range = 4);
|
||||
return nir_load_push_constant(b, 1, 32, nir_imm_int(b, 0));
|
||||
#else
|
||||
return nir_load_layer_id(b);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user