summaryrefslogtreecommitdiff
path: root/src/mesa/shader/arbprogparse.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-01-20 10:38:35 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-01-20 10:38:35 +1100
commitdf09ed9d1ecf11be14ee7f189273c14375fbaa57 (patch)
tree7322a2670877dff003f57a5485c9e92226b57167 /src/mesa/shader/arbprogparse.c
parent0feec292ddc279998a1e25c10ea70d211f7b4b62 (diff)
parenta1f4a5e802ad62c88fca6834b9de1c83672230a6 (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/shader/arbprogparse.c')
-rw-r--r--src/mesa/shader/arbprogparse.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 9a5290d920..d662e0b8b5 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -1695,7 +1695,7 @@ parse_attrib (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head
if (found) {
error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
attrib_var->name);
program_error(ctx, Program->Position, error_msg);
_mesa_free (error_msg);
@@ -1825,12 +1825,14 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
break;
case PARAM_CONSTANT:
+ /* parsing something like {1.0, 2.0, 3.0, 4.0} */
parse_constant (inst, const_values, Program, use);
idx = _mesa_add_named_constant(Program->Base.Parameters,
(char *) param_var->name,
const_values, 4);
if (param_var->param_binding_begin == ~0U)
param_var->param_binding_begin = idx;
+ param_var->param_binding_type = PROGRAM_CONSTANT;
param_var->param_binding_length++;
Program->Base.NumParameters++;
break;
@@ -1878,7 +1880,7 @@ parse_param (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
param_var->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);
@@ -1978,7 +1980,7 @@ parse_temp (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
temp_var->name);
program_error(ctx, Program->Position, error_msg);
_mesa_free (error_msg);
@@ -2024,7 +2026,7 @@ parse_output (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
output_var->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);
@@ -2055,7 +2057,7 @@ parse_alias (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_head,
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
temp_var->name);
program_error(ctx, Program->Position, error_msg);
_mesa_free (error_msg);
@@ -2098,7 +2100,7 @@ parse_address (GLcontext * ctx, const GLubyte ** inst, struct var_cache **vc_hea
if (found) {
char *error_msg = (char *)
_mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40);
- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s",
+ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s",
temp_var->name);
program_error (ctx, Program->Position, error_msg);
_mesa_free (error_msg);