tu: Count a whole push consts range in constlen for PREAMBLE push consts
Either none push consts are loaded via preamble or all of them even if
shader uses a single push const.
Fixes misrenderings with Zink. Zink unconditionally declares push
consts, regardless of whether they are actually used in the shader.
Fixes: a5f0f7d4b1
("turnip,ir3: Implement A7XX push consts load via preamble")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25638>
This commit is contained in:

committed by
Marge Bot

parent
f97b449e9e
commit
5ad78e61d0
@@ -2686,6 +2686,11 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr)
|
||||
load->push_consts.dst_base = nir_src_as_uint(intr->src[0]);
|
||||
load->push_consts.src_base = nir_intrinsic_base(intr);
|
||||
load->push_consts.src_size = nir_intrinsic_range(intr);
|
||||
|
||||
ctx->so->constlen =
|
||||
MAX2(ctx->so->constlen,
|
||||
DIV_ROUND_UP(
|
||||
load->push_consts.dst_base + load->push_consts.src_size, 4));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user