[Mesa-dev] [PATCH 5/6] etnaviv: mask correct channel for RB swapped rendertargets

Lucas Stach dev at lynxeye.de
Mon Jun 5 19:09:42 UTC 2017


Am Sonntag, den 04.06.2017, 16:37 -0400 schrieb Ilia Mirkin:
> On Sun, Jun 4, 2017 at 3:06 PM, Lucas Stach <dev at lynxeye.de> wrote:
> > +   /* If the complete render target is written, set
> > full_overwrite:
> > +    * - The color mask is 1111
> > +    * - No blending is used
> > +    */
> > +   bool full_overwrite = (rt0->colormask == 0xf) && !blend-
> > >enable;
> > +   blend->PE_COLOR_FORMAT =
> > +            VIVS_PE_COLOR_FORMAT_COMPONENTS(colormask) |
> > +            COND(full_overwrite, VIVS_PE_COLOR_FORMAT_OVERWRITE);
> 
> [I realize you're just shuffling logic around, so this comment isn't
> about the patch specifically but rather about the driver.]
> 
> Presumably there's some benefit to flipping on this overwrite,
> otherwise it wouldn't exist. It should be safe to flip this on when
> the colormask is e.g. 0x7 and it's a RGB surface. You can instead use
> util_format_colormask_full() to determine if it's a full colormask
> for
> the RT format in question.

Yes, that occurred to me as well, but wanted to keep things as is for
the fixes series. Thanks for the hint, though.

Regards,
Lucas


More information about the etnaviv mailing list