[Mesa-dev] [PATCH 5/6] etnaviv: mask correct channel for RB swapped rendertargets
Ilia Mirkin
imirkin at alum.mit.edu
Sun Jun 4 20:37:55 UTC 2017
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.
Cheers,
-ilia
More information about the mesa-dev
mailing list