summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_parameter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/prog_parameter.c')
-rw-r--r--src/mesa/shader/prog_parameter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index fbc38398992..676f1722e5a 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -297,6 +297,8 @@ _mesa_add_attribute(struct gl_program_parameter_list *paramList,
/* add */
gl_state_index state[STATE_LENGTH];
state[0] = attrib;
+ if (size < 0)
+ size = 4;
i = _mesa_add_parameter(paramList, PROGRAM_INPUT, name,
size, NULL, state);
}