freedreno: Don't tell the blitter what it can't do
authorKristian H. Kristensen <hoegsberg@chromium.org>
Fri, 1 Feb 2019 23:20:05 +0000 (15:20 -0800)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Mon, 11 Feb 2019 20:26:21 +0000 (12:26 -0800)
Call ctx->blit() and let it reject blits it can't do instead of giving
up on stencil blits and blits u_blitter can't do.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/gallium/drivers/freedreno/freedreno_blitter.c

index c8f034759a93c2f631e199ecf4e65c8ea3ee1ad9..f779f0fefb2bc83bcd7f7e7a21d420ae6be3504d 100644 (file)
@@ -258,6 +258,9 @@ fd_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info)
        if (info.render_condition_enable && !fd_render_condition_check(pctx))
                return;
 
+       if (ctx->blit && ctx->blit(ctx, &info))
+               return;
+
        if (info.mask & PIPE_MASK_S) {
                DBG("cannot blit stencil, skipping");
                info.mask &= ~PIPE_MASK_S;
@@ -270,8 +273,7 @@ fd_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info)
                return;
        }
 
-       if (!(ctx->blit && ctx->blit(ctx, &info)))
-               fd_blitter_blit(ctx, &info);
+       fd_blitter_blit(ctx, &info);
 }
 
 /**