radeonsi: const-ify the si_query_ops
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 20 Sep 2018 08:21:26 +0000 (10:21 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 19 Dec 2018 11:02:07 +0000 (12:02 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_perfcounter.c
src/gallium/drivers/radeonsi/si_query.c
src/gallium/drivers/radeonsi/si_query.h

index 65197c0daa4438219cd8b84441f85a300d1e1c53..fc2c58854bc0860a8e161df79039d130bb2dcac2 100644 (file)
@@ -915,7 +915,7 @@ static bool si_pc_query_get_result(struct si_context *sctx, struct si_query *rqu
        return true;
 }
 
-static struct si_query_ops batch_query_ops = {
+static const struct si_query_ops batch_query_ops = {
        .destroy = si_pc_query_destroy,
        .begin = si_pc_query_begin,
        .end = si_pc_query_end,
index 5b0fba0ed927950ae8f288931c171a808a1c3365..093643bf684a0184a065751781e1b98e59405024 100644 (file)
@@ -34,7 +34,7 @@
 
 #define SI_MAX_STREAMS 4
 
-static struct si_query_ops query_hw_ops;
+static const struct si_query_ops query_hw_ops;
 
 struct si_hw_query_params {
        unsigned start_offset;
@@ -499,7 +499,7 @@ static bool si_query_sw_get_result(struct si_context *sctx,
 }
 
 
-static struct si_query_ops sw_query_ops = {
+static const struct si_query_ops sw_query_ops = {
        .destroy = si_query_sw_destroy,
        .begin = si_query_sw_begin,
        .end = si_query_sw_end,
@@ -1343,7 +1343,7 @@ void si_query_hw_resume(struct si_context *sctx, struct si_query *query)
        si_query_hw_emit_start(sctx, (struct si_query_hw *)query);
 }
 
-static struct si_query_ops query_hw_ops = {
+static const struct si_query_ops query_hw_ops = {
        .destroy = si_query_hw_destroy,
        .begin = si_query_hw_begin,
        .end = si_query_hw_end,
index 63af760a2718b5134695ed1bb48234f3d6f70dc6..0bc1d56f78a7f2ca775c8aeebdc9f8285df432b1 100644 (file)
@@ -141,7 +141,7 @@ struct si_query_ops {
 
 struct si_query {
        struct threaded_query b;
-       struct si_query_ops *ops;
+       const struct si_query_ops *ops;
 
        /* The PIPE_QUERY_xxx type of query */
        unsigned type;