Skip to content

panfrost: use RGB1 component ordering for R5G6B5 pixel formats

panfrost: use RGB1 component ordering for R5G6B5 pixel formats

For some purposes (e.g. advanced blending) we need a non-zero alpha
value returned from reads. This is only guaranteed on Bifrost if
we explicitly request RGB1 component ordering. The default is to use
RGBA component ordering, which for R5G6B5 causes 0 to be read for
alpha.

A complication is that the Mali fixed function hardware requires
four components (RGBA rather than RGB1). If fixed function blending
is in use, we modify the pixel format back to RGBA when building the
blend descriptor.

This fixes failures in KHR-GLES31.core.blend_equation_advanced.* when
an R5G6B5 configuration is chosen.

Cc: mesa-stable
Edited by Eric Smith

Merge request reports