simplify _mesa_add_state_reference()
authorBrian <brian@yutani.localnet.net>
Wed, 10 Jan 2007 15:37:59 +0000 (08:37 -0700)
committerBrian <brian@yutani.localnet.net>
Wed, 10 Jan 2007 15:37:59 +0000 (08:37 -0700)
src/mesa/shader/prog_parameter.c

index 900fb7e1a5c914d8ede82e8b0bb97b0999e8f68d..fbc38398992a0bc44f5c25dc0168d7ad9aaabe6a 100644 (file)
@@ -364,16 +364,8 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList,
 
    name = _mesa_program_state_string(stateTokens);
    index = _mesa_add_parameter(paramList, PROGRAM_STATE_VAR, name,
-                               size, NULL, NULL);
-                               
-   if (index >= 0) {
-      GLuint i;
-      for (i = 0; i < STATE_LENGTH; i++) {
-         paramList->Parameters[index].StateIndexes[i]
-            = (gl_state_index) stateTokens[i];
-      }
-      paramList->StateFlags |= _mesa_program_state_flags(stateTokens);
-   }
+                               size, NULL, (gl_state_index *) stateTokens);
+   paramList->StateFlags |= _mesa_program_state_flags(stateTokens);
 
    /* free name string here since we duplicated it in add_parameter() */
    _mesa_free((void *) name);