[Mesa-dev] [PATCH] intel/blorp: Constify blorp[_batch]_init() arguments

Nanley Chery nanleychery at gmail.com
Wed Sep 21 21:43:04 UTC 2016


Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 src/intel/blorp/blorp.c | 8 ++++----
 src/intel/blorp/blorp.h | 9 +++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c
index 1c8fd55..e5dcf0a 100644
--- a/src/intel/blorp/blorp.c
+++ b/src/intel/blorp/blorp.c
@@ -30,8 +30,8 @@
 #include "brw_nir.h"
 
 void
-blorp_init(struct blorp_context *blorp, void *driver_ctx,
-           struct isl_device *isl_dev)
+blorp_init(struct blorp_context *blorp, const void *driver_ctx,
+           const struct isl_device *isl_dev)
 {
    blorp->driver_ctx = driver_ctx;
    blorp->isl_dev = isl_dev;
@@ -44,8 +44,8 @@ blorp_finish(struct blorp_context *blorp)
 }
 
 void
-blorp_batch_init(struct blorp_context *blorp,
-                 struct blorp_batch *batch, void *driver_batch)
+blorp_batch_init(const struct blorp_context *blorp,
+                 struct blorp_batch *batch, const void *driver_batch)
 {
    batch->blorp = blorp;
    batch->driver_batch = driver_batch;
diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h
index 480f1bb..2cbe719 100644
--- a/src/intel/blorp/blorp.h
+++ b/src/intel/blorp/blorp.h
@@ -62,8 +62,8 @@ struct blorp_context {
    void (*exec)(struct blorp_batch *batch, const struct blorp_params *params);
 };
 
-void blorp_init(struct blorp_context *blorp, void *driver_ctx,
-                struct isl_device *isl_dev);
+void blorp_init(struct blorp_context *blorp, const void *driver_ctx,
+                const struct isl_device *isl_dev);
 void blorp_finish(struct blorp_context *blorp);
 
 struct blorp_batch {
@@ -71,8 +71,9 @@ struct blorp_batch {
    void *driver_batch;
 };
 
-void blorp_batch_init(struct blorp_context *blorp, struct blorp_batch *batch,
-                      void *driver_batch);
+void blorp_batch_init(const struct blorp_context *blorp,
+                      struct blorp_batch *batch,
+                      const void *driver_batch);
 void blorp_batch_finish(struct blorp_batch *batch);
 
 struct blorp_address {
-- 
2.10.0



More information about the mesa-dev mailing list