1 #ifndef __NV50_QUERY_HW_H__
2 #define __NV50_QUERY_HW_H__
4 #include "nouveau_fence.h"
5 #include "nouveau_mm.h"
7 #include "nv50_query.h"
9 #define NVA0_HW_QUERY_STREAM_OUTPUT_BUFFER_OFFSET (PIPE_QUERY_TYPES + 0)
13 struct nv50_hw_query_funcs
{
14 void (*destroy_query
)(struct nv50_context
*, struct nv50_hw_query
*);
15 boolean (*begin_query
)(struct nv50_context
*, struct nv50_hw_query
*);
16 void (*end_query
)(struct nv50_context
*, struct nv50_hw_query
*);
17 boolean (*get_query_result
)(struct nv50_context
*, struct nv50_hw_query
*,
18 boolean
, union pipe_query_result
*);
21 struct nv50_hw_query
{
22 struct nv50_query base
;
23 const struct nv50_hw_query_funcs
*funcs
;
26 struct nouveau_bo
*bo
;
28 uint32_t offset
; /* base + i * rotate */
32 int nesting
; /* only used for occlusion queries */
33 struct nouveau_mm_allocation
*mm
;
34 struct nouveau_fence
*fence
;
37 static inline struct nv50_hw_query
*
38 nv50_hw_query(struct nv50_query
*q
)
40 return (struct nv50_hw_query
*)q
;
44 nv50_hw_create_query(struct nv50_context
*, unsigned, unsigned);
46 nv50_hw_get_driver_query_info(struct nv50_screen
*, unsigned,
47 struct pipe_driver_query_info
*);
49 nv50_hw_query_allocate(struct nv50_context
*, struct nv50_query
*, int);
51 nv50_hw_query_pushbuf_submit(struct nouveau_pushbuf
*, uint16_t,
52 struct nv50_query
*, unsigned);
54 nv84_hw_query_fifo_wait(struct nouveau_pushbuf
*, struct nv50_query
*);