diff options
author | marha <marha@users.sourceforge.net> | 2013-08-19 09:07:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-08-19 09:07:37 +0200 |
commit | 2d042f719910c5aa1ba9f4a47b21009c729c345e (patch) | |
tree | 2b20d89d5f1ca342ca6f1d817c18b324adf7086f /mesalib/src/mesa/main/texstate.c | |
parent | c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d (diff) | |
parent | 854ec4da20ddff9b830be0a7d5b81d8cb4774132 (diff) | |
download | vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.tar.gz vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.tar.bz2 vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig libX11 libXdmcp libxcb xkeyboard-config mesa pixman xserver git update 19 aug 2013
Conflicts:
fontconfig/src/fccache.c
Diffstat (limited to 'mesalib/src/mesa/main/texstate.c')
-rw-r--r-- | mesalib/src/mesa/main/texstate.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c index afff01359..dad69a8f6 100644 --- a/mesalib/src/mesa/main/texstate.c +++ b/mesalib/src/mesa/main/texstate.c @@ -528,6 +528,7 @@ update_texture_state( struct gl_context *ctx ) GLuint unit; struct gl_program *fprog = NULL; struct gl_program *vprog = NULL; + struct gl_program *gprog = NULL; GLbitfield enabledFragUnits = 0x0; if (ctx->Shader.CurrentVertexProgram && @@ -535,6 +536,11 @@ update_texture_state( struct gl_context *ctx ) vprog = ctx->Shader.CurrentVertexProgram->_LinkedShaders[MESA_SHADER_VERTEX]->Program; } + if (ctx->Shader.CurrentGeometryProgram && + ctx->Shader.CurrentGeometryProgram->LinkStatus) { + gprog = ctx->Shader.CurrentGeometryProgram->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program; + } + if (ctx->Shader.CurrentFragmentProgram && ctx->Shader.CurrentFragmentProgram->LinkStatus) { fprog = ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; @@ -543,10 +549,6 @@ update_texture_state( struct gl_context *ctx ) fprog = &ctx->FragmentProgram.Current->Base; } - /* FINISHME: Geometry shader texture accesses should also be considered - * FINISHME: here. - */ - /* TODO: only set this if there are actual changes */ ctx->NewState |= _NEW_TEXTURE; @@ -562,6 +564,7 @@ update_texture_state( struct gl_context *ctx ) struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; GLbitfield enabledVertTargets = 0x0; GLbitfield enabledFragTargets = 0x0; + GLbitfield enabledGeomTargets = 0x0; GLbitfield enabledTargets = 0x0; GLuint texIndex; @@ -575,6 +578,10 @@ update_texture_state( struct gl_context *ctx ) enabledVertTargets |= vprog->TexturesUsed[unit]; } + if (gprog) { + enabledGeomTargets |= gprog->TexturesUsed[unit]; + } + if (fprog) { enabledFragTargets |= fprog->TexturesUsed[unit]; } @@ -583,7 +590,8 @@ update_texture_state( struct gl_context *ctx ) enabledFragTargets |= texUnit->Enabled; } - enabledTargets = enabledVertTargets | enabledFragTargets; + enabledTargets = enabledVertTargets | enabledFragTargets | + enabledGeomTargets; texUnit->_ReallyEnabled = 0x0; |