X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr300%2Fr300_screen.h;h=b28de008304a70b5c2f026b876901e27394f2093;hb=d2f8105b606269c0e71cd599f57997279385d300;hp=82b2068e7a08ea5b62d8498a4a22d5167dda5528;hpb=f8e6d19f3f40931be741b44d3edf210c38e13f0f;p=mesa.git diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 82b2068e7a0..b28de008304 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -25,9 +25,11 @@ #define R300_SCREEN_H #include "r300_chipset.h" -#include "../../winsys/radeon/drm/radeon_winsys.h" +#include "radeon/radeon_winsys.h" #include "pipe/p_screen.h" -#include "util/u_slab.h" +#include "util/disk_cache.h" +#include "util/slab.h" +#include "os/os_thread.h" #include struct r300_screen { @@ -40,25 +42,25 @@ struct r300_screen { struct radeon_info info; struct r300_capabilities caps; - /* Memory pools. */ - struct util_slab_mempool pool_buffers; - /** Combination of DBG_xxx flags */ unsigned debug; - /* The number of created contexts to know whether we have multiple - * contexts or not. */ - int num_contexts; - pipe_mutex num_contexts_mutex; + struct disk_cache *disk_shader_cache; + + struct slab_parent_pool pool_transfers; + + /* The MSAA texture with CMASK access; */ + struct pipe_resource *cmask_resource; + mtx_t cmask_mutex; }; /* Convenience cast wrappers. */ -static INLINE struct r300_screen* r300_screen(struct pipe_screen* screen) { +static inline struct r300_screen* r300_screen(struct pipe_screen* screen) { return (struct r300_screen*)screen; } -static INLINE struct radeon_winsys * +static inline struct radeon_winsys * radeon_winsys(struct pipe_screen *screen) { return r300_screen(screen)->rws; } @@ -91,6 +93,7 @@ radeon_winsys(struct pipe_screen *screen) { #define DBG_HYPERZ (1 << 11) #define DBG_SCISSOR (1 << 12) #define DBG_INFO (1 << 13) +#define DBG_MSAA (1 << 14) /* Features. */ #define DBG_ANISOHQ (1 << 16) #define DBG_NO_TILING (1 << 17) @@ -99,16 +102,17 @@ radeon_winsys(struct pipe_screen *screen) { #define DBG_NO_CBZB (1 << 20) #define DBG_NO_ZMASK (1 << 21) #define DBG_NO_HIZ (1 << 22) +#define DBG_NO_CMASK (1 << 23) /* Statistics. */ #define DBG_P_STAT (1 << 25) /*@}*/ -static INLINE boolean SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) +static inline boolean SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) { return (screen->debug & flags) ? TRUE : FALSE; } -static INLINE void SCREEN_DBG(struct r300_screen * screen, unsigned flags, +static inline void SCREEN_DBG(struct r300_screen * screen, unsigned flags, const char * fmt, ...) { if (SCREEN_DBG_ON(screen, flags)) {