summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_query.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-11-07 23:20:31 -0500
committerRob Clark <[email protected]>2015-11-18 14:31:13 -0500
commitd69e557f2a2c39888d83c7b52244412ee2a5594e (patch)
treecf5b16e3436f091c70f80e9e4cc2205060cb5b70 /src/gallium/drivers/freedreno/freedreno_query.c
parent059da344ec17853bb503a7e4afa229c2e2a98c83 (diff)
freedreno: add support for conditional rendering, required for GL3.0
A smarter implementation would make it possible to attach this to emit state for the BY_REGION versions to avoid breaking the tiling. But this is a start. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_query.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_query.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_query.c b/src/gallium/drivers/freedreno/freedreno_query.c
index db2683c9b6f..b87e8250719 100644
--- a/src/gallium/drivers/freedreno/freedreno_query.c
+++ b/src/gallium/drivers/freedreno/freedreno_query.c
@@ -81,6 +81,16 @@ fd_get_query_result(struct pipe_context *pctx, struct pipe_query *pq,
return q->funcs->get_query_result(fd_context(pctx), q, wait, result);
}
+static void
+fd_render_condition(struct pipe_context *pctx, struct pipe_query *pq,
+ boolean condition, uint mode)
+{
+ struct fd_context *ctx = fd_context(pctx);
+ ctx->cond_query = pq;
+ ctx->cond_cond = condition;
+ ctx->cond_mode = mode;
+}
+
static int
fd_get_driver_query_info(struct pipe_screen *pscreen,
unsigned index, struct pipe_driver_query_info *info)
@@ -118,4 +128,5 @@ fd_query_context_init(struct pipe_context *pctx)
pctx->begin_query = fd_begin_query;
pctx->end_query = fd_end_query;
pctx->get_query_result = fd_get_query_result;
+ pctx->render_condition = fd_render_condition;
}