aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/state.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-13 20:15:26 +0000
committermarha <marha@users.sourceforge.net>2011-03-13 20:15:26 +0000
commitb5d1fd89898edb34f73679b542c754d837d44cf8 (patch)
treeb3d14f22d0c5fd984f5ec1ed71ad5263a46e1583 /mesalib/src/mesa/main/state.c
parent77ec02adbc8f9657e7749b307d3cc86ccbd163ea (diff)
downloadvcxsrv-b5d1fd89898edb34f73679b542c754d837d44cf8.tar.gz
vcxsrv-b5d1fd89898edb34f73679b542c754d837d44cf8.tar.bz2
vcxsrv-b5d1fd89898edb34f73679b542c754d837d44cf8.zip
xkeyboard-config libxcb pixman mesalib git update 13 Mar 2011
Diffstat (limited to 'mesalib/src/mesa/main/state.c')
-rw-r--r--mesalib/src/mesa/main/state.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index 5651e3263..f50f2af1e 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/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,31 +275,23 @@ 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 */
+ /* use user-defined vertex 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);
- _mesa_reference_shader_program(ctx,
- &ctx->Shader._CurrentFragmentProgram, f);
-
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- f->FragmentProgram);
+ _mesa_get_fixed_func_fragment_program(ctx));
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram,
+ ctx->FragmentProgram._Current);
}
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) {