diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-09 11:00:42 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-13 10:26:35 -0500 |
commit | b0e915b4e657e83e251d21a429037ebdfb5c614a (patch) | |
tree | bff113b6aab0d3d940eff460c0009f80f9ee105a /src/gallium/drivers/panfrost/pan_job.c | |
parent | 7597015b851db366824355bd42a59c1a67b1343c (diff) |
panfrost: Emit SFBD/MFBD after a batch, instead of before
The size of the scratchpad (as well as some tiler details) depend on the
contents of the batch, so we need to wait to defer filling out the FBD
until after all draws are queued.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_job.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_job.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index dbea56d2d6b..a36edae2a26 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -957,6 +957,20 @@ panfrost_batch_submit(struct panfrost_batch *batch) panfrost_batch_draw_wallpaper(batch); + /* Now that all draws are in, we can finally prepare the + * FBD for the batch */ + + if (batch->framebuffer.gpu) { + struct panfrost_context *ctx = batch->ctx; + struct pipe_context *gallium = (struct pipe_context *) ctx; + struct panfrost_screen *screen = pan_screen(gallium->screen); + + if (screen->quirks & MIDGARD_SFBD) + panfrost_attach_sfbd(batch, ~0); + else + panfrost_attach_mfbd(batch, ~0); + } + panfrost_scoreboard_link_batch(batch); ret = panfrost_batch_submit_jobs(batch); |