summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/ilo
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-04-20 09:22:48 -0500
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-04-21 22:32:50 -0500
commit32214e0c6837a24ad82152e9971baa3926992498 (patch)
tree8a455e6552f76440dd71d85c0e5381a6526428fc /src/gallium/drivers/ilo
parent6a0d036483caf87d43ebe2edd1905873446c9589 (diff)
gallium: add bool return to pipe_context::end_query
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 <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r--src/gallium/drivers/ilo/ilo_query.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_query.c b/src/gallium/drivers/ilo/ilo_query.c
index 8a42f58a87f..3088c969787 100644
--- a/src/gallium/drivers/ilo/ilo_query.c
+++ b/src/gallium/drivers/ilo/ilo_query.c
@@ -128,7 +128,7 @@ ilo_begin_query(struct pipe_context *pipe, struct pipe_query *query)
return true;
}
-static void
+static bool
ilo_end_query(struct pipe_context *pipe, struct pipe_query *query)
{
struct ilo_query *q = ilo_query(query);
@@ -136,7 +136,7 @@ ilo_end_query(struct pipe_context *pipe, struct pipe_query *query)
if (!q->active) {
/* require ilo_begin_query() first */
if (q->in_pairs)
- return;
+ return false;
ilo_begin_query(pipe, query);
}
@@ -144,6 +144,8 @@ ilo_end_query(struct pipe_context *pipe, struct pipe_query *query)
q->active = false;
ilo_query_table[q->type].end(ilo_context(pipe), q);
+
+ return true;
}
/**