X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_screen.h;h=03f76b257e3578f7327b0c0b9767f2ae713a3eef;hb=48d743c5019076056739561f979e7101c04acf21;hp=ba07490fc9462456b72dc8c76c5dd50939573c5f;hpb=21577571b37e68edc0422fbf80932588a4614abc;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h index ba07490fc94..03f76b257e3 100644 --- a/src/gallium/drivers/vc4/vc4_screen.h +++ b/src/gallium/drivers/vc4/vc4_screen.h @@ -25,7 +25,9 @@ #define VC4_SCREEN_H #include "pipe/p_screen.h" +#include "os/os_thread.h" #include "state_tracker/drm_driver.h" +#include "util/list.h" struct vc4_bo; @@ -37,6 +39,9 @@ struct vc4_bo; #define VC4_DEBUG_PERF 0x0020 #define VC4_DEBUG_NORAST 0x0040 #define VC4_DEBUG_ALWAYS_FLUSH 0x0080 +#define VC4_DEBUG_ALWAYS_SYNC 0x0100 +#define VC4_DEBUG_NIR 0x0200 +#define VC4_DEBUG_DUMP 0x0400 #define VC4_MAX_MIP_LEVELS 12 #define VC4_MAX_TEXTURE_SAMPLERS 16 @@ -54,6 +59,22 @@ struct vc4_screen { * if we know the job's already done. */ uint64_t finished_seqno; + + struct vc4_bo_cache { + /** List of struct vc4_bo freed, by age. */ + struct list_head time_list; + /** List of struct vc4_bo freed, per size, by age. */ + struct list_head *size_list; + uint32_t size_list_size; + + pipe_mutex lock; + + uint32_t bo_size; + uint32_t bo_count; + } bo_cache; + + uint32_t bo_size; + uint32_t bo_count; }; static inline struct vc4_screen * @@ -69,8 +90,7 @@ boolean vc4_screen_bo_get_handle(struct pipe_screen *pscreen, struct winsys_handle *whandle); struct vc4_bo * vc4_screen_bo_from_handle(struct pipe_screen *pscreen, - struct winsys_handle *whandle, - unsigned *out_stride); + struct winsys_handle *whandle); extern uint32_t vc4_debug;