From ba02cf0e75226cc49058672034b61764a30eaecf Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 12 Jul 2019 13:55:45 -0700 Subject: panfrost: Add pan_bo_for_screen helper Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_screen.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gallium/drivers/panfrost') 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, -- cgit v1.2.3