}
panfrost_batch_union_scissor(batch, minx, miny, maxx, maxy);
+ batch->scissor_culls_everything = (minx >= maxx || miny >= maxy);
+
return T.gpu;
}
batch->indirect_draw_job_id : 0,
0, vertex_job, false);
- if (ctx->rasterizer->base.rasterizer_discard)
+ if (ctx->rasterizer->base.rasterizer_discard || batch->scissor_culls_everything)
return;
panfrost_add_job(&batch->pool, &batch->scoreboard,
#undef DEFINE_CASE
-static bool
-panfrost_scissor_culls_everything(struct panfrost_context *ctx)
-{
- const struct pipe_scissor_state *ss = &ctx->scissor;
-
- /* Check if we're scissoring at all */
-
- if (!ctx->rasterizer->base.scissor)
- return false;
-
- return (ss->minx == ss->maxx) || (ss->miny == ss->maxy);
-}
-
/* Count generated primitives (when there is no geom/tess shaders) for
* transform feedback */
struct panfrost_context *ctx = pan_context(pipe);
struct panfrost_device *dev = pan_device(pipe->screen);
- /* First of all, check the scissor to see if anything is drawn at all.
- * If it's not, we drop the draw (mostly a conformance issue;
- * well-behaved apps shouldn't hit this) */
-
- if (panfrost_scissor_culls_everything(ctx))
- return;
-
if (!panfrost_render_condition_check(ctx))
return;