ir_to_mesa: Fix segfaults on ir_to_mesa invocation after MSVC change.
[mesa.git] / src / mesa / program / prog_statevars.c
index 83bd3727f33cfc8e221bffc1c2ff9a39ec86065a..c310acb01d4fdc619c4b9c47ebabb63ae9a2991a 100644 (file)
@@ -1068,7 +1068,9 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH])
  * Loop over all the parameters in a parameter list.  If the parameter
  * is a GL state reference, look up the current value of that state
  * variable and put it into the parameter's Value[4] array.
- * This would be called at glBegin time when using a fragment program.
+ * Other parameter types never change or are explicitly set by the user
+ * with glUniform() or glProgramParameter(), etc.
+ * This would be called at glBegin time.
  */
 void
 _mesa_load_state_parameters(struct gl_context *ctx,
@@ -1079,12 +1081,10 @@ _mesa_load_state_parameters(struct gl_context *ctx,
    if (!paramList)
       return;
 
-   /*assert(ctx->Driver.NeedFlush == 0);*/
-
    for (i = 0; i < paramList->NumParameters; i++) {
       if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) {
          _mesa_fetch_state(ctx,
-                          (gl_state_index *) paramList->Parameters[i].StateIndexes,
+                          paramList->Parameters[i].StateIndexes,
                            paramList->ParameterValues[i]);
       }
    }