freedreno/a4xx: move where we deal w/ binning FS
[mesa.git] / src / gallium / drivers / freedreno / freedreno_draw.c
index 6831a58749cbc5a6fa3a6e1aa6c924f550976db9..bf803cc77bc6137ec109530a8fcadc2ef2285a0c 100644 (file)
@@ -88,6 +88,10 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
                return;
        }
 
+       /* TODO: push down the region versions into the tiles */
+       if (!fd_render_condition_check(pctx))
+               return;
+
        /* emulate unsupported primitives: */
        if (!fd_supported_prim(ctx, info->mode)) {
                if (ctx->streamout.num_targets > 0)
@@ -187,6 +191,9 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
        for (i = 0; i < ctx->streamout.num_targets; i++)
                ctx->streamout.offsets[i] += prims;
 
+       if (fd_mesa_debug & FD_DBG_DDRAW)
+               ctx->dirty = 0xffffffff;
+
        /* if an app (or, well, piglit test) does many thousands of draws
         * without flush (or anything which implicitly flushes, like
         * changing render targets), we can exceed the ringbuffer size.
@@ -217,6 +224,10 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
        unsigned cleared_buffers;
        int i;
 
+       /* TODO: push down the region versions into the tiles */
+       if (!fd_render_condition_check(pctx))
+               return;
+
        /* for bookkeeping about which buffers have been cleared (and thus
         * can fully or partially skip mem2gmem) we need to ignore buffers
         * that have already had a draw, in case apps do silly things like