From 58e56151b3f124e6702dd58a39e96204e43f7214 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Fri, 11 Jun 2021 12:42:43 -0700 Subject: [PATCH] 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 Reviewed-by: Gert Wollny --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index ac2a7a9..110d234 100644 --- a/src/vrend_renderer.c +++ b/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))