aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_screen.h
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2016-07-22 15:28:30 -0500
committerEric Anholt <[email protected]>2016-07-26 13:47:50 -0700
commit9ace2c13550609dfe78164f104500d438821f383 (patch)
tree1b556d0fe722c7bb2603786ebdd1bf49a0ba8068 /src/gallium/drivers/vc4/vc4_screen.h
parentce8504d196291452b42ed755ed3830ecb16febcd (diff)
vc4: add hash table look-up for exported dmabufs
It is necessary to reuse existing BOs when dmabufs are imported. There are 2 cases that need to be handled. dmabufs can be created/exported and imported by the same process and can be imported multiple times. Copying other drivers, add a hash table to track exported BOs so the BOs get reused. v2: Whitespace fixup (by anholt) Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h
index 345b73ac1d8..1bbede25422 100644
--- a/src/gallium/drivers/vc4/vc4_screen.h
+++ b/src/gallium/drivers/vc4/vc4_screen.h
@@ -77,6 +77,9 @@ struct vc4_screen {
uint32_t bo_count;
} bo_cache;
+ struct util_hash_table *bo_handles;
+ pipe_mutex bo_handles_mutex;
+
uint32_t bo_size;
uint32_t bo_count;
bool has_control_flow;