diff --git a/.pick_status.json b/.pick_status.json index dd92393df80..65deefd26e0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2284,7 +2284,7 @@ "description": "ir3: Don't reset immediate count to 0 after lowering", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "86f3c0c4c2c0044e3b75bcb68079bbf7b5e77243", "notes": null diff --git a/src/freedreno/ir3/ir3_preamble.c b/src/freedreno/ir3/ir3_preamble.c index 70400a8dadc..475d77c792d 100644 --- a/src/freedreno/ir3/ir3_preamble.c +++ b/src/freedreno/ir3/ir3_preamble.c @@ -47,6 +47,5 @@ ir3_imm_const_to_preamble(struct ir3 *ir, struct ir3_shader_variant *so) ir3_store_const(so, &build, src, dst); } - imms->count = 0; return true; } diff --git a/src/freedreno/vulkan/tu_shader.cc b/src/freedreno/vulkan/tu_shader.cc index ac0bae6bda9..0347db46acd 100644 --- a/src/freedreno/vulkan/tu_shader.cc +++ b/src/freedreno/vulkan/tu_shader.cc @@ -1576,7 +1576,8 @@ tu_xs_get_immediates_packet_size_dwords(const struct ir3_shader_variant *xs) const struct ir3_const_state *const_state = ir3_const_state(xs); uint32_t base = const_state->allocs.max_const_offset_vec4; const struct ir3_imm_const_state *imm_state = &xs->imm_state; - int32_t size = DIV_ROUND_UP(imm_state->count, 4); + int32_t size = xs->compiler->info->props.load_shader_consts_via_preamble ? + 0 : DIV_ROUND_UP(imm_state->count, 4); /* truncate size to avoid writing constants that shader * does not use: diff --git a/src/gallium/drivers/freedreno/ir3/ir3_const.h b/src/gallium/drivers/freedreno/ir3/ir3_const.h index 2d42e21a27a..c9081f65333 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_const.h +++ b/src/gallium/drivers/freedreno/ir3/ir3_const.h @@ -302,7 +302,8 @@ ir3_emit_immediates(const struct ir3_shader_variant *v, { const struct ir3_const_state *const_state = ir3_const_state(v); uint32_t base = const_state->allocs.max_const_offset_vec4; - int size = DIV_ROUND_UP(v->imm_state.count, 4); + int size = v->compiler->info->props.load_shader_consts_via_preamble ? 0 : + DIV_ROUND_UP(v->imm_state.count, 4); /* truncate size to avoid writing constants that shader * does not use: