aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_query.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-05-10 13:45:54 -0400
committerRob Clark <[email protected]>2014-05-13 18:33:19 -0400
commitb8f78e18907be379415c8c804b634808349fc1d9 (patch)
tree6a8fe75487de633ad4329f30e49ed6f031c22652 /src/gallium/drivers/freedreno/freedreno_query.c
parent13a0cf4480b908aafa337c121cbdfc338318f088 (diff)
freedreno: add support for hw queries
Real GPU queries need some infrastructure to track samples per tile and accumulate the results. But fortunately this can be shared across GPU generation. See: https://github.com/freedreno/freedreno/wiki/Queries#hardware-queries 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_query.c b/src/gallium/drivers/freedreno/freedreno_query.c
index fb9908b39ee..8753a4b02c9 100644
--- a/src/gallium/drivers/freedreno/freedreno_query.c
+++ b/src/gallium/drivers/freedreno/freedreno_query.c
@@ -31,6 +31,7 @@
#include "freedreno_query.h"
#include "freedreno_query_sw.h"
+#include "freedreno_query_hw.h"
#include "freedreno_context.h"
#include "freedreno_util.h"
@@ -45,8 +46,8 @@ fd_create_query(struct pipe_context *pctx, unsigned query_type)
struct fd_query *q;
q = fd_sw_create_query(ctx, query_type);
- if (ctx->create_query && !q)
- q = ctx->create_query(ctx, query_type);
+ if (!q)
+ q = fd_hw_create_query(ctx, query_type);
return (struct pipe_query *) q;
}