st/mesa: add const qualifier to st_translate_color()
authorBrian Paul <brianp@vmware.com>
Fri, 13 Dec 2013 16:28:07 +0000 (09:28 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 13 Dec 2013 23:06:06 +0000 (16:06 -0700)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_format.h

index ec25523848a7bae4d279fd4883e289e626e82420..6acf98390ddba8d9b025a6596ec2b6506a6c99aa 100644 (file)
@@ -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) {
index 6e97dcb966fb8a093d0d45cccf442053b557a1a0..3278748d0f61a698edd9ecd53ba49b59125a5191 100644 (file)
@@ -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);