summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_screen.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-12 13:55:45 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-12 15:31:48 -0700
commitba02cf0e75226cc49058672034b61764a30eaecf (patch)
tree734671d812510105bd87f14c2c0aedd46d2244f5 /src/gallium/drivers/panfrost/pan_screen.h
parent330cd057adb04a7e579e8e9ba7e3952b448928a8 (diff)
panfrost: Add pan_bo_for_screen helper
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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index ab39da6d2a1..71536798663 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -96,6 +96,16 @@ pan_screen(struct pipe_screen *p)
return (struct panfrost_screen *)p;
}
+/* Get a transient BO off the screen given a
+ * particular index */
+
+static inline struct panfrost_bo *
+pan_bo_for_index(struct panfrost_screen *screen, unsigned index)
+{
+ return *(util_dynarray_element(&screen->transient_bo,
+ struct panfrost_bo *, index));
+}
+
void
panfrost_drm_allocate_slab(struct panfrost_screen *screen,
struct panfrost_memory *mem,