Views on samplers of eglimage-backed rgb* textures cause unintended
red/blue channel-swapping due to the lack of an internalformat that
specifically for BGR* ordering. Since we have control over the
sampler's swizzle parameters, we can still use the texture view to get
automatic colorspace conversion, but need to compensate for the
unintended swizzle with our own to swizzle back. If the view intended
to swap the channels, we just leave the swizzle parameters alone.
With this approach, no shader augmentation is necessary.
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>