summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/program.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 8dc6ecb742..18bebd227a 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -740,54 +740,50 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[],
}
return;
case STATE_DEPTH_RANGE:
- value[0] = ctx->Viewport.Near; /* near */
- value[1] = ctx->Viewport.Far; /* far */
- value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */
- value[3] = 0;
+ value[0] = ctx->Viewport.Near; /* near */
+ value[1] = ctx->Viewport.Far; /* far */
+ value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */
+ value[3] = 0;
return;
case STATE_FRAGMENT_PROGRAM:
{
/* state[1] = {STATE_ENV, STATE_LOCAL} */
/* state[2] = parameter index */
- int idx = state[2];
-
+ const int idx = (int) state[2];
switch (state[1]) {
case STATE_ENV:
- COPY_4V(value, ctx->FragmentProgram.Parameters[idx]);
+ COPY_4V(value, ctx->FragmentProgram.Parameters[idx]);
break;
-
case STATE_LOCAL:
COPY_4V(value, ctx->FragmentProgram.Current->Base.LocalParams[idx]);
- break;
+ break;
default:
_mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
return;
- }
- }
+ }
+ }
return;
case STATE_VERTEX_PROGRAM:
- {
+ {
/* state[1] = {STATE_ENV, STATE_LOCAL} */
/* state[2] = parameter index */
- int idx = state[2];
-
+ const int idx = (int) state[2];
switch (state[1]) {
case STATE_ENV:
- COPY_4V(value, ctx->VertexProgram.Parameters[idx]);
+ COPY_4V(value, ctx->VertexProgram.Parameters[idx]);
break;
-
case STATE_LOCAL:
COPY_4V(value, ctx->VertexProgram.Current->Base.LocalParams[idx]);
- break;
+ break;
default:
_mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
return;
- }
- }
+ }
+ }
return;
default:
- _mesa_problem(ctx, "Invalid state in fetch_state");
+ _mesa_problem(ctx, "Invalid state in _mesa_fetch_state");
return;
}
}