X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fv3d%2Fv3d_screen.h;h=586b3925065c9bc24f70c693b10c781cd0ae076a;hb=76f9eae7bb2b503e46ebe2847619bba1cec393b6;hp=975bfe01a75920c85175aadcf7be1a1591e06aff;hpb=8c47ebbd232704ab048eab2572e2b2a44f38957a;p=mesa.git diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h index 975bfe01a75..586b3925065 100644 --- a/src/gallium/drivers/v3d/v3d_screen.h +++ b/src/gallium/drivers/v3d/v3d_screen.h @@ -25,20 +25,15 @@ #define VC5_SCREEN_H #include "pipe/p_screen.h" +#include "renderonly/renderonly.h" #include "os/os_thread.h" -#include "state_tracker/drm_driver.h" +#include "frontend/drm_driver.h" #include "util/list.h" #include "util/slab.h" #include "broadcom/common/v3d_debug.h" #include "broadcom/common/v3d_device_info.h" -struct vc5_bo; - -#define VC5_MAX_MIP_LEVELS 12 -#define VC5_MAX_TEXTURE_SAMPLERS 32 -#define VC5_MAX_SAMPLES 4 -#define VC5_MAX_DRAW_BUFFERS 4 -#define VC5_MAX_ATTRIBUTES 16 +struct v3d_bo; /* These are tunable parameters in the HW design, but all the V3D * implementations agree. @@ -51,10 +46,11 @@ struct vc5_bo; #define VC5_UIFBLOCK_SIZE (4 * VC5_UBLOCK_SIZE) #define VC5_UIFBLOCK_ROW_SIZE (4 * VC5_UIFBLOCK_SIZE) -struct vc5_simulator_file; +struct v3d_simulator_file; -struct vc5_screen { +struct v3d_screen { struct pipe_screen base; + struct renderonly *ro; int fd; struct v3d_device_info devinfo; @@ -63,39 +59,42 @@ struct vc5_screen { struct slab_parent_pool transfer_pool; - struct vc5_bo_cache { - /** List of struct vc5_bo freed, by age. */ + struct v3d_bo_cache { + /** List of struct v3d_bo freed, by age. */ struct list_head time_list; - /** List of struct vc5_bo freed, per size, by age. */ + /** List of struct v3d_bo freed, per size, by age. */ struct list_head *size_list; uint32_t size_list_size; mtx_t lock; - - uint32_t bo_size; - uint32_t bo_count; } bo_cache; const struct v3d_compiler *compiler; - struct util_hash_table *bo_handles; + struct hash_table *bo_handles; mtx_t bo_handles_mutex; uint32_t bo_size; uint32_t bo_count; - struct vc5_simulator_file *sim_file; + bool has_csd; + bool has_cache_flush; + bool nonmsaa_texture_size_limit; + + struct v3d_simulator_file *sim_file; }; -static inline struct vc5_screen * -vc5_screen(struct pipe_screen *screen) +static inline struct v3d_screen * +v3d_screen(struct pipe_screen *screen) { - return (struct vc5_screen *)screen; + return (struct v3d_screen *)screen; } -struct pipe_screen *v3d_screen_create(int fd); +struct pipe_screen *v3d_screen_create(int fd, + const struct pipe_screen_config *config, + struct renderonly *ro); void -vc5_fence_init(struct vc5_screen *screen); +v3d_fence_init(struct v3d_screen *screen); #endif /* VC5_SCREEN_H */