aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_context.c
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2019-08-02 19:18:40 +0200
committerBoris Brezillon <[email protected]>2019-08-02 21:52:56 +0200
commit20b00e1ff24f974bc99e7ca9a720518da0ce5b89 (patch)
tree07ed66573fc52d0dd0611dd3dddc553a95b8a883 /src/gallium/drivers/panfrost/pan_context.c
parent72e7b7a00b660240bed1029841ffbdaeedfaccfe (diff)
panfrost: Make ctx->job useful
ctx->job is supposed to serve as a cache to avoid an hash table lookup everytime we access the job attached to the currently bound FB, except it was never assigned to anything but NULL. Fix that by adding the missing assignment in panfrost_get_job_for_fbo(). Also add a missing NULL assignment in the ->set_framebuffer_state() path. While at it, add extra assert()s to make sure ctx->job is consistent. Fixes: 59c9623d0a75 ("panfrost: Import job data structures from v3d") Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_context.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 014f8f6a9d0..ba2df2ce66a 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -2372,6 +2372,11 @@ panfrost_set_framebuffer_state(struct pipe_context *pctx,
panfrost_flush(pctx, NULL, PIPE_FLUSH_END_OF_FRAME);
}
+ /* Invalidate the FBO job cache since we've just been assigned a new
+ * FB state.
+ */
+ ctx->job = NULL;
+
util_copy_framebuffer_state(&ctx->pipe_framebuffer, fb);
/* Given that we're rendering, we'd love to have compression */