mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
panfrost: Extract panfrost_batch_skip_rasterization
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14154>
This commit is contained in:
parent
3a49f4798c
commit
f5412409db
3 changed files with 18 additions and 1 deletions
|
|
@ -2325,7 +2325,7 @@ panfrost_emit_vertex_tiler_jobs(struct panfrost_batch *batch,
|
|||
batch->indirect_draw_job_id : 0,
|
||||
0, vertex_job, false);
|
||||
|
||||
if (ctx->rasterizer->base.rasterizer_discard || batch->scissor_culls_everything)
|
||||
if (panfrost_batch_skip_rasterization(batch))
|
||||
return;
|
||||
|
||||
panfrost_add_job(&batch->pool.base, &batch->scoreboard,
|
||||
|
|
|
|||
|
|
@ -901,3 +901,17 @@ panfrost_batch_union_scissor(struct panfrost_batch *batch,
|
|||
batch->maxx = MAX2(batch->maxx, maxx);
|
||||
batch->maxy = MAX2(batch->maxy, maxy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if rasterization should be skipped. If not, a TILER job must be
|
||||
* created for each draw, or the IDVS flow must be used.
|
||||
*/
|
||||
bool
|
||||
panfrost_batch_skip_rasterization(struct panfrost_batch *batch)
|
||||
{
|
||||
struct panfrost_context *ctx = batch->ctx;
|
||||
struct pipe_rasterizer_state *rast = (void *) ctx->rasterizer;
|
||||
|
||||
return (rast->rasterizer_discard ||
|
||||
batch->scissor_culls_everything);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,4 +195,7 @@ panfrost_batch_union_scissor(struct panfrost_batch *batch,
|
|||
unsigned minx, unsigned miny,
|
||||
unsigned maxx, unsigned maxy);
|
||||
|
||||
bool
|
||||
panfrost_batch_skip_rasterization(struct panfrost_batch *batch);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue