diff options
author | Rob Clark <[email protected]> | 2019-08-01 14:22:46 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-08-13 08:11:26 -0700 |
commit | 4a188e421522f10af85e5bb8c42c60666d02e778 (patch) | |
tree | 0d05ba7747fb7b4a06f9ef136d62395fe069eb8e /src/gallium/drivers/freedreno | |
parent | 7f1e3391c6d2baae60dd797cd05aaff730ab5110 (diff) |
freedreno/ir3: track # of driver params
To avoid emitting unneeded const state.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_gallium.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index fb83d0e7e63..b72e6c754a6 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -532,6 +532,8 @@ ir3_emit_vs_driver_params(const struct ir3_shader_variant *v, vertex_params_size = ARRAY_SIZE(vertex_params); } + vertex_params_size = MAX2(vertex_params_size, const_state->num_driver_params); + bool needs_vtxid_base = ir3_find_sysval_regid(v, SYSTEM_VALUE_VERTEX_ID_ZERO_BASE) != regid(63, 0); @@ -656,7 +658,7 @@ ir3_emit_cs_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *rin [IR3_DP_LOCAL_GROUP_SIZE_Y] = info->block[1], [IR3_DP_LOCAL_GROUP_SIZE_Z] = info->block[2], }; - uint32_t size = MIN2(ARRAY_SIZE(compute_params), + uint32_t size = MIN2(const_state->num_driver_params, v->constlen * 4 - offset * 4); emit_const(ctx->screen, ring, v, offset * 4, 0, size, |