From 96f164f6f047833091eb98a73aa80c31dc94f962 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Sat, 5 Jul 2014 12:46:03 +0200 Subject: gallium: make pipe_context::begin_query return a boolean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GL_AMD_performance_monitor must return an error when a monitoring session cannot be started. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák Reviewed-by: Martin Peres --- src/gallium/drivers/r300/r300_query.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/r300/r300_query.c') 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) -- cgit v1.2.3