panfrost: Make ctx->job useful
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 2 Aug 2019 17:18:40 +0000 (19:18 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 2 Aug 2019 19:52:56 +0000 (21:52 +0200)
commit20b00e1ff24f974bc99e7ca9a720518da0ce5b89
tree07ed66573fc52d0dd0611dd3dddc553a95b8a883
parent72e7b7a00b660240bed1029841ffbdaeedfaccfe
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 <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_job.c