aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_sfbd.c
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2019-09-01 10:30:39 +0200
committerBoris Brezillon <[email protected]>2019-09-13 16:25:06 +0200
commitaa851a62b964c1c73d699739ce07d6ba773605d7 (patch)
treebf960d4b95f9384a1109beba9d6d30bf02f2d02b /src/gallium/drivers/panfrost/pan_sfbd.c
parent07a68835a153c808a530a277396bd9f212e2bc06 (diff)
panfrost: Pass a batch to functions emitting FB descs
So we can emit such jobs to a batch that's not currently bound to the context. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_sfbd.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_sfbd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/panfrost/pan_sfbd.c b/src/gallium/drivers/panfrost/pan_sfbd.c
index 843e5632491..bf49ddfc1a0 100644
--- a/src/gallium/drivers/panfrost/pan_sfbd.c
+++ b/src/gallium/drivers/panfrost/pan_sfbd.c
@@ -130,19 +130,18 @@ panfrost_sfbd_set_zsbuf(
/* Creates an SFBD for the FRAGMENT section of the bound framebuffer */
mali_ptr
-panfrost_sfbd_fragment(struct panfrost_context *ctx, bool has_draws)
+panfrost_sfbd_fragment(struct panfrost_batch *batch, bool has_draws)
{
- struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
- struct mali_single_framebuffer fb = panfrost_emit_sfbd(ctx, has_draws);
+ struct mali_single_framebuffer fb = panfrost_emit_sfbd(batch, has_draws);
panfrost_sfbd_clear(batch, &fb);
/* SFBD does not support MRT natively; sanity check */
- assert(ctx->pipe_framebuffer.nr_cbufs == 1);
- panfrost_sfbd_set_cbuf(&fb, ctx->pipe_framebuffer.cbufs[0]);
+ assert(batch->key.nr_cbufs == 1);
+ panfrost_sfbd_set_cbuf(&fb, batch->key.cbufs[0]);
- if (ctx->pipe_framebuffer.zsbuf)
- panfrost_sfbd_set_zsbuf(&fb, ctx->pipe_framebuffer.zsbuf);
+ if (batch->key.zsbuf)
+ panfrost_sfbd_set_zsbuf(&fb, batch->key.zsbuf);
if (batch->requirements & PAN_REQ_MSAA)
fb.format |= MALI_FRAMEBUFFER_MSAA_A | MALI_FRAMEBUFFER_MSAA_B;