~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/panfrost/midgard/mir.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
484
484
void
485
485
mir_compute_temp_count(compiler_context *ctx)
486
486
{
487
 
   if (ctx->temp_count)
488
 
      return;
489
 
 
490
 
   unsigned max_dest = 0;
 
487
   unsigned max_index = 0;
491
488
 
492
489
   mir_foreach_instr_global(ctx, ins) {
493
490
      if (ins->dest < SSA_FIXED_MINIMUM)
494
 
         max_dest = MAX2(max_dest, ins->dest + 1);
 
491
         max_index = MAX2(max_index, ins->dest + 1);
495
492
   }
496
493
 
497
 
   ctx->temp_count = max_dest;
 
494
   if (ctx->blend_input != ~0)
 
495
      max_index = MAX2(max_index, ctx->blend_input + 1);
 
496
 
 
497
   if (ctx->blend_src1 != ~0)
 
498
      max_index = MAX2(max_index, ctx->blend_src1 + 1);
 
499
 
 
500
   ctx->temp_count = max_index;
498
501
}