summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-06-29 00:00:06 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-06-29 00:00:06 +0000
commit824fdf035ee4f1119f1bf811e27aa14111f7ad32 (patch)
tree57b449ba73642c4e7287933866461d89cfaefbaf /src/mesa
parent26755698c8b8981be8778527c4381d69f790e291 (diff)
remove trailing whitespace and misc clean-ups
Diffstat (limited to 'src/mesa')
-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;
}
}