After cleaning up many of the previous BGRA hacks, it is clear now that
we must manually reorder all bgr* data en-route to/from the guest, but
only for GLES hosts.
GL hosts instead enjoy the use of the GL_BGRA pixel transfer format,
prompting the host driver to the the reordering internally, and only
when it deems it necessary.
Trying to use GL_BGRA_EXT for GLES hosts is somewhat possible with the
new GL_MESA_bgra extension, but it still struggles when multisampled
textures are involved. It is more robust to use the GL_RGBA pixel
transfer format for GLES hosts instead and handle reordering ourselves.
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/725>