summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_screen.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-04-14 22:42:44 +0000
committerAlyssa Rosenzweig <[email protected]>2019-04-19 22:50:20 +0000
commite008d4f011b62c38be3e1401315dabc0df7e5b29 (patch)
treefde722ecb415063c74caa2ec029165a621eac947 /src/gallium/drivers/panfrost/pan_screen.h
parenta151500dd1ab1a75ba1f63e7361fed1e3411780c (diff)
panfrost: Track BO lifetime with jobs and reference counts
This (fairly large) patch continues work surrounding the panfrost_job abstraction to improve job lifetime management. In particular, we add infrastructure to track which BOs are used by a particular job (currently limited to the vertex buffer BOs), to reference count these BOs, and to automatically manage the BOs memory based on the reference count. This set of changes serves as a code cleanup, as a way of future proofing for allowing flushing BOs, and immediately as a bugfix to workaround the missing reference counting for vertex buffer BOs. Meanwhile, there are a few cleanups to vertex buffer handling code itself, so in the short-term, this allows us to remove the costly VBO staging workaround, since this patch addresses the underlying causes. v2: Use pipe_reference for BO reference counting, rather than managing it ourselves. Don't duplicate hash-table key removal. Fix vertex buffer counting. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_screen.h')
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index cbadf813675..4e5efa91f22 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -92,8 +92,11 @@ struct panfrost_screen {
/* TODO: Where? */
struct panfrost_resource *display_target;
- int last_fragment_id;
+ /* While we're busy building up the job for frame N, the GPU is
+ * still busy executing frame N-1. So hold a reference to
+ * yesterjob */
int last_fragment_flushed;
+ struct panfrost_job *last_job;
};
#endif /* PAN_SCREEN_H */