On Thu, Jul 12, 2018 at 10:28 AM Caio Marcelo de Oliveira Filho <
caio.olive...@intel.com> wrote:

> > > Question: earlier in the code we call
> > >
> > >    populate_wm_prog_key(pipeline, info, &key);
> > >
> > > which does
> > >
> > >    key->nr_color_regions = pipeline->subpass->color_count;
> > >
> > >    key->replicate_alpha = key->nr_color_regions > 1 &&
> > >                           info->pMultisampleState &&
> > >
>  info->pMultisampleState->alphaToCoverageEnable;
> > >
> > > so key->replicate_alpha is calculated based on the old value. Should
> > > this be (re)calculated using the new value?
> > >
> >
> > We could but it would have no effect.  100% of the uses of
> replicate_alpha
> > in the back-end have it ANDed with inst->target > 0.
>
> If it's not effectful, maybe we could remove the
> "key->nr_color_regions > 1 &&" from the definition of replicate_alpha
> then?
>

We could but that might result in more cache misses.  By setting it to
false when nr_color_regions <= 1, we avoid extra cache misses of you
compile the same single-output shader twice once with alphaToCoverage and
once without.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to