summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-23 12:00:48 -0600
committerBrian Paul <[email protected]>2008-07-23 12:00:48 -0600
commit576c5fcc61d8278c5e78f900a23f752734da3988 (patch)
tree2a903533870c8f867c44ccabd7d2455b1490df12 /src/mesa
parent5f2a5f6164ace6e12c1a3ba95f1103dc8fafa68f (diff)
mesa: glsl: mark constructor params as const
Diffstat (limited to 'src/mesa')
-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 d4bf99f78f9..d8aa161e43b 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1754,7 +1754,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;
}