summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_query.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2014-07-05 12:46:03 +0200
committerMartin Peres <[email protected]>2015-05-06 00:03:36 +0300
commit96f164f6f047833091eb98a73aa80c31dc94f962 (patch)
tree1d6eff6ab916eb590752012102f50b706f4a36ea /src/gallium/drivers/r300/r300_query.c
parent546ec980f850fee067fd1dddad19a8dfd6b7e672 (diff)
gallium: make pipe_context::begin_query return a boolean
GL_AMD_performance_monitor must return an error when a monitoring session cannot be started. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_query.c')
-rw-r--r--src/gallium/drivers/r300/r300_query.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index 2364f3d2d74..01b83b87fcf 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -85,24 +85,25 @@ void r300_resume_query(struct r300_context *r300,
r300_mark_atom_dirty(r300, &r300->query_start);
}
-static void r300_begin_query(struct pipe_context* pipe,
- struct pipe_query* query)
+static boolean r300_begin_query(struct pipe_context* pipe,
+ struct pipe_query* query)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_query* q = r300_query(query);
if (q->type == PIPE_QUERY_GPU_FINISHED)
- return;
+ return true;
if (r300->query_current != NULL) {
fprintf(stderr, "r300: begin_query: "
"Some other query has already been started.\n");
assert(0);
- return;
+ return false;
}
q->num_results = 0;
r300_resume_query(r300, q);
+ return true;
}
void r300_stop_query(struct r300_context *r300)