aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_query.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2015-10-17 00:14:28 +0200
committerSamuel Pitoiset <[email protected]>2015-10-30 17:57:15 +0100
commit2e3fe0379edd4c0c2c6e87a53b077d77e5fff24e (patch)
treec31052a932a518931df479a9bd98ffba9640d570 /src/gallium/drivers/nouveau/nv50/nv50_query.h
parente7ed3963ed33134cc214f0a8b8e4b8cb6029887d (diff)
nv50: add a header file for nv50_query
Like for nvc0, this will allow to split different types of queries and to prepare the way for both global performance counters and MP counters. While we are at it, make use of nv50_query struct instead of pipe_query. Signed-off-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_query.h')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_query.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query.h b/src/gallium/drivers/nouveau/nv50/nv50_query.h
new file mode 100644
index 00000000000..722af0c4af7
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nv50/nv50_query.h
@@ -0,0 +1,40 @@
+#ifndef __NV50_QUERY_H__
+#define __NV50_QUERY_H__
+
+#include "pipe/p_context.h"
+
+#include "nouveau_context.h"
+#include "nouveau_mm.h"
+
+#define NVA0_QUERY_STREAM_OUTPUT_BUFFER_OFFSET (PIPE_QUERY_TYPES + 0)
+
+struct nv50_query {
+ uint32_t *data;
+ uint16_t type;
+ uint16_t index;
+ uint32_t sequence;
+ struct nouveau_bo *bo;
+ uint32_t base;
+ uint32_t offset; /* base + i * 32 */
+ uint8_t state;
+ bool is64bit;
+ int nesting; /* only used for occlusion queries */
+ struct nouveau_mm_allocation *mm;
+ struct nouveau_fence *fence;
+};
+
+static inline struct nv50_query *
+nv50_query(struct pipe_query *pipe)
+{
+ return (struct nv50_query *)pipe;
+}
+
+void nv50_init_query_functions(struct nv50_context *);
+void nv50_query_pushbuf_submit(struct nouveau_pushbuf *, uint16_t,
+ struct nv50_query *, unsigned result_offset);
+void nv84_query_fifo_wait(struct nouveau_pushbuf *, struct nv50_query *);
+void nva0_so_target_save_offset(struct pipe_context *,
+ struct pipe_stream_output_target *,
+ unsigned, bool);
+
+#endif