diff options
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3_legalize.c')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_legalize.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_legalize.c b/src/gallium/drivers/freedreno/ir3/ir3_legalize.c index 8c012106bf8..18bdc6ceb1f 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_legalize.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_legalize.c @@ -40,7 +40,7 @@ */ struct ir3_legalize_ctx { - bool has_samp; + int num_samp; bool has_ssbo; int max_bary; }; @@ -214,7 +214,7 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block) * the samp instruction(s) could get eliminated if the * result is not used. */ - ctx->has_samp = true; + 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]); @@ -463,7 +463,7 @@ mark_convergence_points(struct ir3 *ir) } void -ir3_legalize(struct ir3 *ir, bool *has_samp, bool *has_ssbo, int *max_bary) +ir3_legalize(struct ir3 *ir, int *num_samp, bool *has_ssbo, int *max_bary) { struct ir3_legalize_ctx *ctx = rzalloc(ir, struct ir3_legalize_ctx); bool progress; @@ -483,7 +483,7 @@ ir3_legalize(struct ir3 *ir, bool *has_samp, bool *has_ssbo, int *max_bary) } } while (progress); - *has_samp = ctx->has_samp; + *num_samp = ctx->num_samp; *has_ssbo = ctx->has_ssbo; *max_bary = ctx->max_bary; |