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);
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;
* (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);