aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstate.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/texstate.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/texstate.c')
-rw-r--r--mesalib/src/mesa/main/texstate.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index e02f16240..9f14d8a0d 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -489,26 +489,26 @@ static void
update_texture_state( struct gl_context *ctx )
{
GLuint unit;
- struct gl_fragment_program *fprog = NULL;
- struct gl_vertex_program *vprog = NULL;
+ struct gl_program *fprog = NULL;
+ struct gl_program *vprog = NULL;
GLbitfield enabledFragUnits = 0x0;
if (ctx->Shader.CurrentVertexProgram &&
ctx->Shader.CurrentVertexProgram->LinkStatus) {
- vprog = ctx->Shader.CurrentVertexProgram->VertexProgram;
+ vprog = ctx->Shader.CurrentVertexProgram->_LinkedShaders[MESA_SHADER_VERTEX]->Program;
} else if (ctx->VertexProgram._Enabled) {
/* XXX enable this if/when non-shader vertex programs get
* texture fetches:
- vprog = ctx->VertexProgram.Current;
+ vprog = &ctx->VertexProgram.Current->Base;
*/
}
if (ctx->Shader.CurrentFragmentProgram &&
ctx->Shader.CurrentFragmentProgram->LinkStatus) {
- fprog = ctx->Shader.CurrentFragmentProgram->FragmentProgram;
+ fprog = ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program;
}
else if (ctx->FragmentProgram._Enabled) {
- fprog = ctx->FragmentProgram.Current;
+ fprog = &ctx->FragmentProgram.Current->Base;
}
/* FINISHME: Geometry shader texture accesses should also be considered
@@ -540,11 +540,11 @@ update_texture_state( struct gl_context *ctx )
* settle on the one with highest priority (see below).
*/
if (vprog) {
- enabledVertTargets |= vprog->Base.TexturesUsed[unit];
+ enabledVertTargets |= vprog->TexturesUsed[unit];
}
if (fprog) {
- enabledFragTargets |= fprog->Base.TexturesUsed[unit];
+ enabledFragTargets |= fprog->TexturesUsed[unit];
}
else {
/* fixed-function fragment program */
@@ -611,7 +611,7 @@ update_texture_state( struct gl_context *ctx )
if (fprog) {
const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1;
ctx->Texture._EnabledCoordUnits
- = (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask;
+ = (fprog->InputsRead >> FRAG_ATTRIB_TEX0) & coordMask;
}
else {
ctx->Texture._EnabledCoordUnits = enabledFragUnits;