From: Brian Paul Date: Wed, 23 Jul 2008 18:00:48 +0000 (-0600) Subject: mesa: glsl: mark constructor params as const X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4c73c619a8d0db2f9662ab5cbdc15e854efce25;p=mesa.git mesa: glsl: mark constructor params as const --- diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a98232e3085..77ded1e4ab9 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; }