fix size bug in _mesa_add_attribute()
authorBrian <brian@yutani.localnet.net>
Wed, 10 Jan 2007 19:18:33 +0000 (12:18 -0700)
committerBrian <brian@yutani.localnet.net>
Wed, 10 Jan 2007 19:18:33 +0000 (12:18 -0700)
src/mesa/shader/prog_parameter.c

index fbc38398992a0bc44f5c25dc0168d7ad9aaabe6a..676f1722e5a582f7ed46a42987009af8c5b8faec 100644 (file)
@@ -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);
    }