add state vars for color matrix, pixel transfer scale&bias
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 18 May 2008 21:52:13 +0000 (15:52 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 18 May 2008 21:52:13 +0000 (15:52 -0600)
cherry-picked from gallium-0.1 (068c7bd912283e051a55b2fd5c4568685d10f3ed)

src/mesa/shader/prog_statevars.c
src/mesa/shader/prog_statevars.h

index dd3c3a1c8c947645807390c9f0366c4af1d15575..592a63651c33d8e575d5301245be7a40ca782baa 100644 (file)
@@ -279,6 +279,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
    case STATE_MVP_MATRIX:
    case STATE_TEXTURE_MATRIX:
    case STATE_PROGRAM_MATRIX:
+   case STATE_COLOR_MATRIX:
       {
          /* state[0] = modelview, projection, texture, etc. */
          /* state[1] = which texture matrix or program matrix */
@@ -312,6 +313,9 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
          else if (mat == STATE_PROGRAM_MATRIX) {
             matrix = ctx->ProgramMatrixStack[index].Top;
          }
+         else if (mat == STATE_COLOR_MATRIX) {
+            matrix = ctx->ColorMatrixStack.Top;
+         }
          else {
             _mesa_problem(ctx, "Bad matrix name in _mesa_fetch_state()");
             return;
index 53529ab2437e0fe9772aa2732826be03ef2cc5ae..64820a5b6814b8b8d9673bba73647dc9025599f5 100644 (file)
@@ -67,6 +67,7 @@ typedef enum gl_state_index_ {
    STATE_MVP_MATRIX,
    STATE_TEXTURE_MATRIX,
    STATE_PROGRAM_MATRIX,
+   STATE_COLOR_MATRIX,
    STATE_MATRIX_INVERSE,
    STATE_MATRIX_TRANSPOSE,
    STATE_MATRIX_INVTRANS,