diff options
author | Brian <[email protected]> | 2007-10-30 12:39:58 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-30 12:39:58 -0600 |
commit | 068c7bd912283e051a55b2fd5c4568685d10f3ed (patch) | |
tree | abb1dd29b3420e541d541b0d9deaa772c2d92747 /src/mesa/shader/prog_statevars.c | |
parent | 8aa42546add1fef4949e2d4ceded62e2d1dd0215 (diff) |
add state vars for color matrix, pixel transfer scale&bias
Diffstat (limited to 'src/mesa/shader/prog_statevars.c')
-rw-r--r-- | src/mesa/shader/prog_statevars.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 1bb7142c601..68eaf0be941 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -278,6 +278,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 */ @@ -311,6 +312,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; @@ -434,6 +438,18 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], value[3] = ctx->Light.Light[ln]._CosCutoff; return; } + case STATE_PT_SCALE: + value[0] = ctx->Pixel.RedScale; + value[1] = ctx->Pixel.GreenScale; + value[2] = ctx->Pixel.BlueScale; + value[3] = ctx->Pixel.AlphaScale; + break; + case STATE_PT_BIAS: + value[0] = ctx->Pixel.RedBias; + value[1] = ctx->Pixel.GreenBias; + value[2] = ctx->Pixel.BlueBias; + value[3] = ctx->Pixel.AlphaBias; + break; default: /* unknown state indexes are silently ignored * should be handled by the driver. |