Path: blob/21.2-virgl/src/gallium/drivers/nouveau/nv50/nv50_query_hw.h
4574 views
#ifndef __NV50_QUERY_HW_H__1#define __NV50_QUERY_HW_H__23#include "nouveau_fence.h"4#include "nouveau_mm.h"56#include "nv50_query.h"78#define NV50_HW_QUERY_STATE_READY 09#define NV50_HW_QUERY_STATE_ACTIVE 110#define NV50_HW_QUERY_STATE_ENDED 211#define NV50_HW_QUERY_STATE_FLUSHED 31213#define NVA0_HW_QUERY_STREAM_OUTPUT_BUFFER_OFFSET (PIPE_QUERY_TYPES + 0)1415struct nv50_hw_query;1617struct nv50_hw_query_funcs {18void (*destroy_query)(struct nv50_context *, struct nv50_hw_query *);19bool (*begin_query)(struct nv50_context *, struct nv50_hw_query *);20void (*end_query)(struct nv50_context *, struct nv50_hw_query *);21bool (*get_query_result)(struct nv50_context *, struct nv50_hw_query *,22bool, union pipe_query_result *);23};2425struct nv50_hw_query {26struct nv50_query base;27const struct nv50_hw_query_funcs *funcs;28uint32_t *data;29uint32_t sequence;30struct nouveau_bo *bo;31uint32_t base_offset;32uint32_t offset; /* base + i * rotate */33uint8_t state;34bool is64bit;35uint8_t rotate;36struct nouveau_mm_allocation *mm;37struct nouveau_fence *fence;38};3940static inline struct nv50_hw_query *41nv50_hw_query(struct nv50_query *q)42{43return (struct nv50_hw_query *)q;44}4546struct nv50_query *47nv50_hw_create_query(struct nv50_context *, unsigned, unsigned);48int49nv50_hw_get_driver_query_info(struct nv50_screen *, unsigned,50struct pipe_driver_query_info *);51bool52nv50_hw_query_allocate(struct nv50_context *, struct nv50_query *, int);53void54nv50_hw_query_pushbuf_submit(struct nouveau_pushbuf *, uint16_t,55struct nv50_query *, unsigned);56void57nv84_hw_query_fifo_wait(struct nouveau_pushbuf *, struct nv50_query *);5859#endif606162