summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-12-11 01:29:48 -0800
committerKenneth Graunke <[email protected]>2014-12-16 15:39:50 -0800
commited8edd71759043ec433bcde599bb9cd28a477273 (patch)
treea7d8c59c044d7561ba67f6731803942bfe1c2a16 /src
parent1f0e1060503e9e700c22a07fa050c47ef5257a40 (diff)
i965/query: Set Ready flag in gen6_queryobj_get_results().
q->Ready means that the results are in, and core Mesa is free to return them to the application. gen6_queryobj_get_results() is a natural place to set that flag; doing so means callers don't have to. The older non-hardware-context aware code couldn't do this, because we had to call brw_queryobj_get_results() to gather intermediate results when we ran out of space for snapshots in the query buffer. We only gather complete results in the Gen6+ code, however. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_queryobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
index 130236e2f96..3013513b9c2 100644
--- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
+++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
@@ -195,6 +195,8 @@ gen6_queryobj_get_results(struct gl_context *ctx,
*/
drm_intel_bo_unreference(query->bo);
query->bo = NULL;
+
+ query->Base.Ready = true;
}
/**
@@ -305,7 +307,6 @@ static void gen6_wait_query(struct gl_context *ctx, struct gl_query_object *q)
struct brw_query_object *query = (struct brw_query_object *)q;
gen6_queryobj_get_results(ctx, query);
- query->Base.Ready = true;
}
/**
@@ -331,7 +332,6 @@ static void gen6_check_query(struct gl_context *ctx, struct gl_query_object *q)
if (query->bo == NULL || !drm_intel_bo_busy(query->bo)) {
gen6_queryobj_get_results(ctx, query);
- query->Base.Ready = true;
}
}