[Mesa-dev] [PATCH 2/4] st/mesa: add const qualifier to st_translate_color()

Brian Paul brianp at vmware.com
Fri Dec 13 12:32:23 PST 2013


---
 src/mesa/state_tracker/st_format.c |    6 +++---
 src/mesa/state_tracker/st_format.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index ec25523..6acf983 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -1854,12 +1854,12 @@ st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target,
  * Similarly for texture border colors.
  */
 void
-st_translate_color(union gl_color_union *colorIn,
+st_translate_color(const union gl_color_union *colorIn,
                    union pipe_color_union *colorOut,
                    GLenum baseFormat, GLboolean is_integer)
 {
    if (is_integer) {
-      int *in = colorIn->i;
+      const int *in = colorIn->i;
       int *out = colorOut->i;
 
       switch (baseFormat) {
@@ -1901,7 +1901,7 @@ st_translate_color(union gl_color_union *colorIn,
       }
    }
    else {
-      float *in = colorIn->f;
+      const float *in = colorIn->f;
       float *out = colorOut->f;
 
       switch (baseFormat) {
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index 6e97dcb..3278748 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -73,7 +73,7 @@ st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target,
 
 
 extern void
-st_translate_color(union gl_color_union *colorIn,
+st_translate_color(const union gl_color_union *colorIn,
                    union pipe_color_union *colorOut,
                    GLenum baseFormat, GLboolean is_integer);
 
-- 
1.7.10.4



More information about the mesa-dev mailing list