vrend: don't make texture view when blit base/view formats are equal

When performing blits, a texture view is not necessary if the
base format and view format of either the source or dest
resource are equal. with this change, unnecessary views will
be avoided on the source and destination resources.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Ryan Neph 4 years ago
parent 738db75c66
commit 58e56151b3
  1. 2
      src/vrend_renderer.c

@ -8910,7 +8910,7 @@ static void vrend_renderer_blit_int(struct vrend_context *ctx,
else if (vrend_blit_needs_swizzle(info->dst.format, info->src.format))
use_gl = true;
if (has_feature(feat_texture_view))
if ((src_res->base.format != info->src.format) && has_feature(feat_texture_view))
blitter_views[0] = vrend_make_view(src_res, info->src.format);
if ((dst_res->base.format != info->dst.format) && has_feature(feat_texture_view))

Loading…
Cancel
Save