diff options
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 733c64b1807..fe685e1767d 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -291,6 +291,14 @@ struct fd_context { /* indirect-branch emit: */ void (*emit_ib)(struct fd_ringbuffer *ring, struct fd_ringbuffer *target); + /* query: */ + struct fd_query * (*create_query)(struct fd_context *ctx, unsigned query_type); + void (*query_prepare)(struct fd_batch *batch, uint32_t num_tiles); + void (*query_prepare_tile)(struct fd_batch *batch, uint32_t n, + struct fd_ringbuffer *ring); + void (*query_set_stage)(struct fd_batch *batch, + struct fd_ringbuffer *ring, enum fd_render_stage stage); + /* * Common pre-cooked VBO state (used for a3xx and later): */ @@ -368,6 +376,15 @@ fd_supported_prim(struct fd_context *ctx, unsigned prim) return (1 << prim) & ctx->primtype_mask; } +static inline void +fd_batch_set_stage(struct fd_batch *batch, + struct fd_ringbuffer *ring, enum fd_render_stage stage) +{ + struct fd_context *ctx = batch->ctx; + if (ctx->query_set_stage) + ctx->query_set_stage(batch, ring, stage); +} + void fd_context_setup_common_vbos(struct fd_context *ctx); void fd_context_cleanup_common_vbos(struct fd_context *ctx); |