diff options
author | Rob Clark <[email protected]> | 2019-03-19 12:51:39 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-03-21 09:13:05 -0400 |
commit | 1088b788d8616f4cb835ceeeea969b9adcc02487 (patch) | |
tree | dfed096e6d31a00f29b316bd0d7c77c11c839348 /src/freedreno/ir3/ir3_legalize.c | |
parent | d4cbc946859f56f0a2a50cd8931a6fd29ab22db9 (diff) |
freedreno/ir3: find # of samplers from uniform vars
When we have indirect samplers, we cannot tell the max sampler
referenced. Instead just refer to the number of sampler uniforms.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_legalize.c')
-rw-r--r-- | src/freedreno/ir3/ir3_legalize.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c index b14a789efb2..f015c6fede8 100644 --- a/src/freedreno/ir3/ir3_legalize.c +++ b/src/freedreno/ir3/ir3_legalize.c @@ -41,7 +41,6 @@ struct ir3_legalize_ctx { struct ir3_compiler *compiler; - int num_samp; bool has_ssbo; int max_bary; }; @@ -218,14 +217,6 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block) regmask_set(&state->needs_ss, n->regs[0]); if (is_tex(n)) { - /* this ends up being the # of samp instructions.. but that - * is ok, everything else only cares whether it is zero or - * not. We do this here, rather than when we encounter a - * SAMP decl, because (especially in binning pass shader) - * the samp instruction(s) could get eliminated if the - * result is not used. - */ - ctx->num_samp = MAX2(ctx->num_samp, n->cat5.samp + 1); regmask_set(&state->needs_sy, n->regs[0]); } else if (n->opc == OPC_RESINFO) { regmask_set(&state->needs_ss, n->regs[0]); @@ -480,7 +471,7 @@ mark_convergence_points(struct ir3 *ir) } void -ir3_legalize(struct ir3 *ir, int *num_samp, bool *has_ssbo, int *max_bary) +ir3_legalize(struct ir3 *ir, bool *has_ssbo, int *max_bary) { struct ir3_legalize_ctx *ctx = rzalloc(ir, struct ir3_legalize_ctx); bool progress; @@ -501,7 +492,6 @@ ir3_legalize(struct ir3 *ir, int *num_samp, bool *has_ssbo, int *max_bary) } } while (progress); - *num_samp = ctx->num_samp; *has_ssbo = ctx->has_ssbo; *max_bary = ctx->max_bary; |