summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-07-18 15:33:11 -0600
committerBrian Paul <[email protected]>2012-07-18 16:51:47 -0600
commite4f8d33aea7e0112dfbf3a38fdc36d11b2e7be10 (patch)
tree7275efcba72bcbcc87546a392303e9155999e39a /src/mesa/main/state.c
parent1170b5aa9f8394fefcbab759c09d26293ba4b0ee (diff)
mesa: use gl_program cast wrappers
In a few cases, remove unneeded casts. And fix a few other const-correctness issues. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index db0cc30ec9d..76946bd93eb 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -134,8 +134,7 @@ update_program(struct gl_context *ctx)
&ctx->Shader._CurrentFragmentProgram,
fsProg);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- (struct gl_fragment_program *)
- fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
+ gl_fragment_program(fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program));
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram,
NULL);
}
@@ -157,11 +156,9 @@ update_program(struct gl_context *ctx)
&ctx->Shader._CurrentFragmentProgram,
f);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- (struct gl_fragment_program *)
- f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
+ gl_fragment_program(f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program));
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram,
- (struct gl_fragment_program *)
- f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
+ gl_fragment_program(f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program));
}
else {
/* No fragment program */
@@ -174,8 +171,7 @@ update_program(struct gl_context *ctx)
&& gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]) {
/* Use GLSL geometry shader */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current,
- (struct gl_geometry_program *)
- gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program);
+ gl_geometry_program(gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program));
} else {
/* No geometry program */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
@@ -189,8 +185,7 @@ update_program(struct gl_context *ctx)
&& vsProg->_LinkedShaders[MESA_SHADER_VERTEX]) {
/* Use GLSL vertex shader */
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- (struct gl_vertex_program *)
- vsProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program);
+ gl_vertex_program(vsProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program));
}
else if (ctx->VertexProgram._Enabled) {
/* Use user-defined vertex program */