panfrost: Move uniform_count to pan_assemble

Again, not Midgard specific.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
This commit is contained in:
Alyssa Rosenzweig 2020-04-08 14:44:31 -04:00 committed by Tomeu Vizoso
parent d10423989e
commit e30091bc51
3 changed files with 3 additions and 7 deletions

View File

@ -146,8 +146,6 @@ panfrost_shader_compile(struct panfrost_context *ctx,
util_dynarray_fini(&program.compiled);
/* Sysvals are prepended */
program.uniform_count += program.sysval_count;
state->sysval_count = program.sysval_count;
memcpy(state->sysval, program.sysvals, sizeof(state->sysval[0]) * state->sysval_count);
@ -193,8 +191,9 @@ panfrost_shader_compile(struct panfrost_context *ctx,
if (outputs_written)
*outputs_written = s->info.outputs_written;
/* Separate as primary uniform count is truncated */
state->uniform_count = program.uniform_count;
/* Separate as primary uniform count is truncated. Sysvals are prefix
* uniforms */
state->uniform_count = s->num_uniforms + program.sysval_count;
state->uniform_cutoff = program.uniform_cutoff;
state->work_reg_count = program.work_register_count;

View File

@ -2626,8 +2626,6 @@ midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_b
* (post-optimisation) */
panfrost_nir_assign_sysvals(&ctx->sysvals, nir);
program->uniform_count = nir->num_uniforms;
program->sysval_count = ctx->sysvals.sysval_count;
memcpy(program->sysvals, ctx->sysvals.sysvals, sizeof(ctx->sysvals.sysvals[0]) * ctx->sysvals.sysval_count);

View File

@ -84,7 +84,6 @@ panfrost_sysval_for_instr(nir_instr *instr, nir_dest *dest);
typedef struct {
int work_register_count;
int uniform_count;
int uniform_cutoff;
/* Prepended before uniforms, mapping to SYSVAL_ names for the