nv50: do not create an invalid HW query type
[mesa.git] / src / gallium / drivers / nouveau / nv50 / nv50_query_hw.h
1 #ifndef __NV50_QUERY_HW_H__
2 #define __NV50_QUERY_HW_H__
3
4 #include "nouveau_fence.h"
5 #include "nouveau_mm.h"
6
7 #include "nv50_query.h"
8
9 #define NVA0_HW_QUERY_STREAM_OUTPUT_BUFFER_OFFSET (PIPE_QUERY_TYPES + 0)
10
11 struct nv50_hw_query {
12 struct nv50_query base;
13 uint32_t *data;
14 uint32_t sequence;
15 struct nouveau_bo *bo;
16 uint32_t base_offset;
17 uint32_t offset; /* base + i * rotate */
18 uint8_t state;
19 bool is64bit;
20 uint8_t rotate;
21 int nesting; /* only used for occlusion queries */
22 struct nouveau_mm_allocation *mm;
23 struct nouveau_fence *fence;
24 };
25
26 static inline struct nv50_hw_query *
27 nv50_hw_query(struct nv50_query *q)
28 {
29 return (struct nv50_hw_query *)q;
30 }
31
32 struct nv50_query *
33 nv50_hw_create_query(struct nv50_context *, unsigned, unsigned);
34 void
35 nv50_hw_query_pushbuf_submit(struct nouveau_pushbuf *, uint16_t,
36 struct nv50_query *, unsigned);
37 void
38 nv84_hw_query_fifo_wait(struct nouveau_pushbuf *, struct nv50_query *);
39
40 #endif