From 824fdf035ee4f1119f1bf811e27aa14111f7ad32 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Jun 2004 00:00:06 +0000 Subject: remove trailing whitespace and misc clean-ups --- src/mesa/shader/program.c | 36 ++++++++++++++++-------------------- 1 file 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; } } -- cgit v1.2.3