diff options
author | marha <marha@users.sourceforge.net> | 2011-10-10 07:52:38 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-10 07:52:38 +0200 |
commit | afbd3947071a33f59dda122f1ac396442a02c128 (patch) | |
tree | e3dde5d2973697c24f73488a421327d09a9337c0 /mesalib/src/mesa/main/shaderapi.c | |
parent | b520df571e0a319eae5231d09f36b98f28b8914a (diff) | |
download | vcxsrv-afbd3947071a33f59dda122f1ac396442a02c128.tar.gz vcxsrv-afbd3947071a33f59dda122f1ac396442a02c128.tar.bz2 vcxsrv-afbd3947071a33f59dda122f1ac396442a02c128.zip |
fontconfig libX11 mesa pixman xkeyboard-config git updte 10 oct 2011
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r-- | mesalib/src/mesa/main/shaderapi.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 9e0ed9c69..c3aabe43f 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -808,12 +808,15 @@ print_shader_info(const struct gl_shader_program *shProg) shProg->Shaders[i]->Name, shProg->Shaders[i]->SourceChecksum); } - if (shProg->VertexProgram) - printf(" vert prog %u\n", shProg->VertexProgram->Base.Id); - if (shProg->FragmentProgram) - printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id); - if (shProg->GeometryProgram) - printf(" geom prog %u\n", shProg->GeometryProgram->Base.Id); + if (shProg->_LinkedShaders[MESA_SHADER_VERTEX]) + printf(" vert prog %u\n", + shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program->Id); + if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]) + printf(" frag prog %u\n", + shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->Id); + if (shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]) + printf(" geom prog %u\n", + shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program->Id); } @@ -963,9 +966,7 @@ static GLboolean validate_shader_program(const struct gl_shader_program *shProg, char *errMsg) { - const struct gl_vertex_program *vp = shProg->VertexProgram; - const struct gl_geometry_program *gp = shProg->GeometryProgram; - const struct gl_fragment_program *fp = shProg->FragmentProgram; + unsigned i; if (!shProg->LinkStatus) { return GL_FALSE; @@ -991,14 +992,11 @@ validate_shader_program(const struct gl_shader_program *shProg, * Check: any two active samplers in the current program object are of * different types, but refer to the same texture image unit, */ - if (vp && !validate_samplers(&vp->Base, errMsg)) { - return GL_FALSE; - } - if (gp && !validate_samplers(&gp->Base, errMsg)) { - return GL_FALSE; - } - if (fp && !validate_samplers(&fp->Base, errMsg)) { - return GL_FALSE; + for (i = 0; i < Elements(shProg->_LinkedShaders); i++) { + if (shProg->_LinkedShaders[i] + && !validate_samplers(shProg->_LinkedShaders[i]->Program, errMsg)) { + return GL_FALSE; + } } return GL_TRUE; |