From 32214e0c6837a24ad82152e9971baa3926992498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 20 Apr 2016 09:22:48 -0500 Subject: gallium: add bool return to pipe_context::end_query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even when begin_query succeeds, there can still be failures in query handling. For example for radeon, additional buffers may have to be allocated when queries span multiple command buffers. Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/gallium/drivers/rbug/rbug_context.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/rbug') diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c index 1280c45..38dee74 100644 --- a/src/gallium/drivers/rbug/rbug_context.c +++ b/src/gallium/drivers/rbug/rbug_context.c @@ -178,17 +178,20 @@ rbug_begin_query(struct pipe_context *_pipe, return ret; } -static void +static bool rbug_end_query(struct pipe_context *_pipe, struct pipe_query *query) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; + bool ret; pipe_mutex_lock(rb_pipe->call_mutex); - pipe->end_query(pipe, - query); + ret = pipe->end_query(pipe, + query); pipe_mutex_unlock(rb_pipe->call_mutex); + + return ret; } static boolean -- cgit v1.1