mesa: print internal.current[i] attrib
authorBrian Paul <brianp@vmware.com>
Tue, 21 Apr 2009 20:47:57 +0000 (14:47 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 21 Apr 2009 22:21:32 +0000 (16:21 -0600)
src/mesa/shader/prog_statevars.c

index 37a3f1fc8cadc4f4244fdd732461e70595821f27..058d4bbafb7537355e7c9c6c0fcdb33fe2f7a60c 100644 (file)
@@ -816,7 +816,10 @@ append_token(char *dst, gl_state_index k)
       break;
    /* BEGIN internal state vars */
    case STATE_INTERNAL:
-      append(dst, "(internal)");
+      append(dst, ".internal.");
+      break;
+   case STATE_CURRENT_ATTRIB:
+      append(dst, "current");
       break;
    case STATE_NORMAL_SCALE:
       append(dst, "normalScale");
@@ -986,7 +989,9 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH])
       break;
    case STATE_INTERNAL:
       append_token(str, state[1]);
-      break;
+      if (state[1] == STATE_CURRENT_ATTRIB)
+         append_index(str, state[2]);
+       break;
    default:
       _mesa_problem(NULL, "Invalid state in _mesa_program_state_string");
       break;