Mesa (master): etnaviv: change begin_query(..) to a void function
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 10 12:53:03 UTC 2020
Module: Mesa
Branch: master
Commit: 7cb98e02e4e072389986b1f9461e76415e14531c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cb98e02e4e072389986b1f9461e76415e14531c
Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date: Sun Apr 5 21:33:26 2020 +0200
etnaviv: change begin_query(..) to a void function
We always return true.
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456>
---
src/gallium/drivers/etnaviv/etnaviv_query.c | 7 +++----
src/gallium/drivers/etnaviv/etnaviv_query.h | 2 +-
src/gallium/drivers/etnaviv/etnaviv_query_acc.c | 4 +---
src/gallium/drivers/etnaviv/etnaviv_query_sw.c | 4 +---
4 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c b/src/gallium/drivers/etnaviv/etnaviv_query.c
index 4168629beaa..ee936a6e616 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query.c
@@ -60,15 +60,14 @@ static bool
etna_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
{
struct etna_query *q = etna_query(pq);
- bool ret;
if (q->active)
return false;
- ret = q->funcs->begin_query(etna_context(pctx), q);
- q->active = ret;
+ q->funcs->begin_query(etna_context(pctx), q);
+ q->active = true;
- return ret;
+ return true;
}
static bool
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.h b/src/gallium/drivers/etnaviv/etnaviv_query.h
index f1aa1499088..afa1743bd61 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_query.h
@@ -35,7 +35,7 @@ struct etna_query;
struct etna_query_funcs {
void (*destroy_query)(struct etna_context *ctx, struct etna_query *q);
- bool (*begin_query)(struct etna_context *ctx, struct etna_query *q);
+ void (*begin_query)(struct etna_context *ctx, struct etna_query *q);
void (*end_query)(struct etna_context *ctx, struct etna_query *q);
bool (*get_query_result)(struct etna_context *ctx, struct etna_query *q,
bool wait, union pipe_query_result *result);
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_acc.c b/src/gallium/drivers/etnaviv/etnaviv_query_acc.c
index 58ad132a902..789f1234f32 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_acc.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_acc.c
@@ -78,7 +78,7 @@ realloc_query_bo(struct etna_context *ctx, struct etna_acc_query *aq)
etna_bo_cpu_fini(rsc->bo);
}
-static bool
+static void
etna_acc_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_acc_query *aq = etna_acc_query(q);
@@ -93,8 +93,6 @@ etna_acc_begin_query(struct etna_context *ctx, struct etna_query *q)
/* add to active list */
assert(list_is_empty(&aq->node));
list_addtail(&aq->node, &ctx->active_acc_queries);
-
- return true;
}
static void
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
index b9fc1cca26b..9e9ec99edea 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c
@@ -56,14 +56,12 @@ read_counter(struct etna_context *ctx, unsigned type)
return 0;
}
-static bool
+static void
etna_sw_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_sw_query *sq = etna_sw_query(q);
sq->begin_value = read_counter(ctx, q->type);
-
- return true;
}
static void
More information about the mesa-commit
mailing list