diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-08 14:44:31 -0400 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2020-04-10 16:53:53 +0200 |
commit | e30091bc5162e560320e46abf23be8748cb269ae (patch) | |
tree | c9f2ef313c9e2764f92d4babe5e70e5f2c59b561 /src | |
parent | d10423989ebace442cdbd8016188b44c663883c3 (diff) |
panfrost: Move uniform_count to pan_assemble
Again, not Midgard specific.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_assemble.c | 7 | ||||
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 2 | ||||
-rw-r--r-- | src/panfrost/util/pan_ir.h | 1 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c index 513c55f08e7..4f8e14b105e 100644 --- a/src/gallium/drivers/panfrost/pan_assemble.c +++ b/src/gallium/drivers/panfrost/pan_assemble.c @@ -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; diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index d23d53bec91..1dc021a2fb0 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -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); diff --git a/src/panfrost/util/pan_ir.h b/src/panfrost/util/pan_ir.h index 72f282163a7..16d2a2b2f67 100644 --- a/src/panfrost/util/pan_ir.h +++ b/src/panfrost/util/pan_ir.h @@ -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 |