1 #ifndef __NVC0_QUERY_SW_H__ 2 #define __NVC0_QUERY_SW_H__ 3 4 #include "nvc0_query.h" 5 6 struct nvc0_sw_query { 7 struct nvc0_query base; 8 uint64_t value; 9 }; 10 11 static inline struct nvc0_sw_query * 12 nvc0_sw_query(struct nvc0_query *q) 13 { 14 return (struct nvc0_sw_query *)q; 15 } 16 17 /* 18 * Driver statistics queries: 19 */ 20 #define NVC0_SW_QUERY_DRV_STAT(i) (PIPE_QUERY_DRIVER_SPECIFIC + 1024 + (i)) 21 #define NVC0_SW_QUERY_DRV_STAT_LAST NVC0_SW_QUERY_DRV_STAT(NVC0_SW_QUERY_DRV_STAT_COUNT - 1) 22 enum nvc0_sw_query_drv_stat 23 { 24 #ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS 25 NVC0_SW_QUERY_DRV_STAT_TEX_OBJECT_CURRENT_COUNT = 0, 26 NVC0_SW_QUERY_DRV_STAT_TEX_OBJECT_CURRENT_BYTES, 27 NVC0_SW_QUERY_DRV_STAT_BUF_OBJECT_CURRENT_COUNT, 28 NVC0_SW_QUERY_DRV_STAT_BUF_OBJECT_CURRENT_BYTES_VID, 29 NVC0_SW_QUERY_DRV_STAT_BUF_OBJECT_CURRENT_BYTES_SYS, 30 NVC0_SW_QUERY_DRV_STAT_TEX_TRANSFERS_READ, 31 NVC0_SW_QUERY_DRV_STAT_TEX_TRANSFERS_WRITE, 32 NVC0_SW_QUERY_DRV_STAT_TEX_COPY_COUNT, 33 NVC0_SW_QUERY_DRV_STAT_TEX_BLIT_COUNT, 34 NVC0_SW_QUERY_DRV_STAT_TEX_CACHE_FLUSH_COUNT, 35 NVC0_SW_QUERY_DRV_STAT_BUF_TRANSFERS_READ, 36 NVC0_SW_QUERY_DRV_STAT_BUF_TRANSFERS_WRITE, 37 NVC0_SW_QUERY_DRV_STAT_BUF_READ_BYTES_STAGING_VID, 38 NVC0_SW_QUERY_DRV_STAT_BUF_WRITE_BYTES_DIRECT, 39 NVC0_SW_QUERY_DRV_STAT_BUF_WRITE_BYTES_STAGING_VID, 40 NVC0_SW_QUERY_DRV_STAT_BUF_WRITE_BYTES_STAGING_SYS, 41 NVC0_SW_QUERY_DRV_STAT_BUF_COPY_BYTES, 42 NVC0_SW_QUERY_DRV_STAT_BUF_NON_KERNEL_FENCE_SYNC_COUNT, 43 NVC0_SW_QUERY_DRV_STAT_ANY_NON_KERNEL_FENCE_SYNC_COUNT, 44 NVC0_SW_QUERY_DRV_STAT_QUERY_SYNC_COUNT, 45 NVC0_SW_QUERY_DRV_STAT_GPU_SERIALIZE_COUNT, 46 NVC0_SW_QUERY_DRV_STAT_DRAW_CALLS_ARRAY, 47 NVC0_SW_QUERY_DRV_STAT_DRAW_CALLS_INDEXED, 48 NVC0_SW_QUERY_DRV_STAT_DRAW_CALLS_FALLBACK_COUNT, 49 NVC0_SW_QUERY_DRV_STAT_USER_BUFFER_UPLOAD_BYTES, 50 NVC0_SW_QUERY_DRV_STAT_CONSTBUF_UPLOAD_COUNT, 51 NVC0_SW_QUERY_DRV_STAT_CONSTBUF_UPLOAD_BYTES, 52 NVC0_SW_QUERY_DRV_STAT_PUSHBUF_COUNT, 53 NVC0_SW_QUERY_DRV_STAT_RESOURCE_VALIDATE_COUNT, 54 #endif 55 NVC0_SW_QUERY_DRV_STAT_COUNT 56 }; 57 58 struct nvc0_query * 59 nvc0_sw_create_query(struct nvc0_context *, unsigned, unsigned); 60 int 61 nvc0_sw_get_driver_query_info(struct nvc0_screen *, unsigned, 62 struct pipe_driver_query_info *); 63 64 #endif 65