summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-23 12:00:48 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-29 17:20:43 -0600
commitd4c73c619a8d0db2f9662ab5cbdc15e854efce25 (patch)
tree0602a689d52948b2eb6bd773222c25a30dd39369
parent01c0558f70ead32db9b7da4ebdc2b33d2477c3e5 (diff)
mesa: glsl: mark constructor params as const
-rw-r--r--src/mesa/shader/slang/slang_codegen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index a98232e308..77ded1e4ab 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1732,7 +1732,8 @@ _slang_make_constructor(slang_assemble_ctx *A, slang_struct *str)
printf("Field %d: %s\n", i, (char*) str->fields->variables[i]->a_name);
*/
slang_variable *p = slang_variable_scope_grow(fun->parameters);
- *p = *str->fields->variables[i];
+ *p = *str->fields->variables[i]; /* copy the type */
+ p->type.qualifier = SLANG_QUAL_CONST;
}
fun->param_count = fun->parameters->num_variables;
}