summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a3xx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_context.c5
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_query.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_context.c b/src/gallium/drivers/freedreno/a3xx/fd3_context.c
index dac59418df0..b432f593e0f 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_context.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_context.c
@@ -26,6 +26,7 @@
* Rob Clark <[email protected]>
*/
+#include "freedreno_query_hw.h"
#include "fd3_context.h"
#include "fd3_blend.h"
@@ -51,6 +52,8 @@ fd3_context_destroy(struct pipe_context *pctx)
u_upload_destroy(fd3_ctx->border_color_uploader);
+ fd_hw_query_fini(pctx);
+
fd_context_destroy(pctx);
}
@@ -95,6 +98,8 @@ fd3_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
if (!pctx)
return NULL;
+ fd_hw_query_init(pctx);
+
fd3_ctx->vs_pvt_mem = fd_bo_new(screen->dev, 0x2000,
DRM_FREEDRENO_GEM_TYPE_KMEM);
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_query.c b/src/gallium/drivers/freedreno/a3xx/fd3_query.c
index cce165c0410..cde42c37313 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_query.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_query.c
@@ -133,6 +133,13 @@ static const struct fd_hw_sample_provider occlusion_predicate = {
void fd3_query_context_init(struct pipe_context *pctx)
{
+ struct fd_context *ctx = fd_context(pctx);
+
+ ctx->create_query = fd_hw_create_query;
+ ctx->query_prepare = fd_hw_query_prepare;
+ ctx->query_prepare_tile = fd_hw_query_prepare_tile;
+ ctx->query_set_stage = fd_hw_query_set_stage;
+
fd_hw_query_register_provider(pctx, &occlusion_counter);
fd_hw_query_register_provider(pctx, &occlusion_predicate);
}