broadcom/vc4: Prefer blit via rendering to the software fallback.
authorEric Anholt <eric@anholt.net>
Mon, 24 Jul 2017 19:34:23 +0000 (12:34 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 25 Jul 2017 21:44:52 +0000 (14:44 -0700)
I don't know how I managed to leave this here for so long.  Found when
working on a 1:1 overlapping blit extension for X11.

Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/vc4/vc4_blit.c

index 1e056568acb6bc2edd6ad4841447b2fb20a4499c..0e4ab5bfa0cbef3209bbeb35114c70685e0c6112 100644 (file)
@@ -212,14 +212,16 @@ vc4_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info)
         if (vc4_tile_blit(pctx, blit_info))
                 return;
 
-        if (util_try_blit_via_copy_region(pctx, &info)) {
-                return; /* done */
-        }
-
         if (info.mask & PIPE_MASK_S) {
-                fprintf(stderr, "cannot blit stencil, skipping\n");
+                if (util_try_blit_via_copy_region(pctx, &info))
+                        return;
+
                 info.mask &= ~PIPE_MASK_S;
+                fprintf(stderr, "cannot blit stencil, skipping\n");
         }
 
-        vc4_render_blit(pctx, &info);
+        if (vc4_render_blit(pctx, &info))
+                return;
+
+        fprintf(stderr, "Unsupported blit\n");
 }