diff options
author | Eric Anholt <[email protected]> | 2011-03-12 15:00:49 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-03-12 15:11:00 -0800 |
commit | 07c420a3c6799a744088f1bbe1c1a5ff157a1771 (patch) | |
tree | 38dcb0438bfa9e43ccf6829f6ef3cedc0ea5346b /src/mesa/main | |
parent | 403be1111190a3fe63ae03bc0111e0a0b026495b (diff) |
Revert "mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program"
This reverts commit b4452c3baad6e0379eeb7f22f2e51d13999e1323.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 1 | ||||
-rw-r--r-- | src/mesa/main/state.c | 13 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 81e281941d9..4f83e2e55c2 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2191,7 +2191,6 @@ struct gl_shader_state struct gl_shader_program *CurrentVertexProgram; struct gl_shader_program *CurrentGeometryProgram; struct gl_shader_program *CurrentFragmentProgram; - struct gl_shader_program *_CurrentFragmentProgram; /** * Program used by glUniform calls. diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index cf9fe8921f3..1b2b2f32464 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -43,7 +43,6 @@ #include "pixel.h" #include "program/program.h" #include "program/prog_parameter.h" -#include "shaderobj.h" #include "state.h" #include "stencil.h" #include "texenvprogram.h" @@ -250,7 +249,7 @@ update_program(struct gl_context *ctx) { const struct gl_shader_program *vsProg = ctx->Shader.CurrentVertexProgram; const struct gl_shader_program *gsProg = ctx->Shader.CurrentGeometryProgram; - struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram; + const struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram; const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current; const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current; const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current; @@ -276,22 +275,20 @@ update_program(struct gl_context *ctx) /* Use shader programs */ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, fsProg->FragmentProgram); - _mesa_reference_shader_program(ctx, &ctx->Shader._CurrentFragmentProgram, - fsProg); } else if (ctx->FragmentProgram._Enabled) { /* use user-defined fragment program */ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, ctx->FragmentProgram.Current); - _mesa_reference_shader_program(ctx, &ctx->Shader._CurrentFragmentProgram, - NULL); } else if (ctx->FragmentProgram._MaintainTexEnvProgram) { /* Use fragment program generated from fixed-function state. */ struct gl_shader_program *f = _mesa_get_fixed_func_fragment_program(ctx); +#if 0 _mesa_reference_shader_program(ctx, - &ctx->Shader._CurrentFragmentProgram, f); + &ctx->Shader.CurrentFragmentProgram, f); +#endif _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, f->FragmentProgram); @@ -299,8 +296,6 @@ update_program(struct gl_context *ctx) else { /* no fragment program */ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL); - _mesa_reference_shader_program(ctx, &ctx->Shader._CurrentFragmentProgram, - NULL); } if (gsProg && gsProg->LinkStatus && gsProg->GeometryProgram) { |