aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/state.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-10 08:28:58 +0200
committermarha <marha@users.sourceforge.net>2011-10-10 08:28:58 +0200
commitbaf98f9bb36f956245d83ecd04f90625d6d68d2b (patch)
treec4af86b7cdb9c57cc539fa0764050865233e3617 /mesalib/src/mesa/main/state.c
parent7fae5492e3ef8e5fa15f742be4c2a15b9782e89a (diff)
parentafbd3947071a33f59dda122f1ac396442a02c128 (diff)
downloadvcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.tar.gz
vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.tar.bz2
vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/state.c')
-rw-r--r--mesalib/src/mesa/main/state.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index fc25515a0..bbe90a32e 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/src/mesa/main/state.c
@@ -246,10 +246,12 @@ update_program(struct gl_context *ctx)
* come up, or matter.
*/
- if (fsProg && fsProg->LinkStatus && fsProg->FragmentProgram) {
+ if (fsProg && fsProg->LinkStatus
+ && fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]) {
/* Use GLSL fragment shader */
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- fsProg->FragmentProgram);
+ (struct gl_fragment_program *)
+ fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
}
else if (ctx->FragmentProgram._Enabled) {
/* Use user-defined fragment program */
@@ -268,10 +270,12 @@ update_program(struct gl_context *ctx)
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
}
- if (gsProg && gsProg->LinkStatus && gsProg->GeometryProgram) {
+ if (gsProg && gsProg->LinkStatus
+ && gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]) {
/* Use GLSL geometry shader */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current,
- gsProg->GeometryProgram);
+ (struct gl_geometry_program *)
+ gsProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program);
} else {
/* No geometry program */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
@@ -281,10 +285,12 @@ update_program(struct gl_context *ctx)
* _mesa_get_fixed_func_vertex_program() needs to know active
* fragprog inputs.
*/
- if (vsProg && vsProg->LinkStatus && vsProg->VertexProgram) {
+ if (vsProg && vsProg->LinkStatus
+ && vsProg->_LinkedShaders[MESA_SHADER_VERTEX]) {
/* Use GLSL vertex shader */
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- vsProg->VertexProgram);
+ (struct gl_vertex_program *)
+ vsProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program);
}
else if (ctx->VertexProgram._Enabled) {
/* Use user-defined vertex program */