vrend: partial revert to fix bgra sampling regression

Backtracks on one change from commit 5304e7d3 ("vrend: add
vrend_resource_needs_redblue_swizzle() to fix arcvm deqp"), that
incorrectly inverted the behavior for setting swizzle parameters for a
sampler of eglimage-backed bgra resources.

Fixes: 5304e7d3 ("vrend: add vrend_resource_needs_redblue_swizzle() to fix arcvm deqp")
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/755>
macos/master
Ryan Neph 3 years ago committed by Marge Bot
parent ab03587b64
commit c6723745fe
  1. 3
      src/vrend_renderer.c

@ -2370,7 +2370,8 @@ int vrend_create_sampler_view(struct vrend_context *ctx,
* back, and still benefit from automatic srgb decoding.
* If the red/blue swap is intended, we just let it happen and don't
* need to explicit change to the sampler's swizzle parameters. */
if (vrend_resource_needs_redblue_swizzle(view->texture, view->format)) {
if (!vrend_resource_supports_view(view->texture, view->format) &&
vrend_format_is_bgra(view->format)) {
VREND_DEBUG(dbg_tex, ctx, "texture view with red/blue swizzle created for EGL-backed texture sampler"
" (format: %s; view: %s)\n",
util_format_name(view->texture->base.format),

Loading…
Cancel
Save