diff options
author | marha <marha@users.sourceforge.net> | 2011-10-10 08:28:58 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-10 08:28:58 +0200 |
commit | baf98f9bb36f956245d83ecd04f90625d6d68d2b (patch) | |
tree | c4af86b7cdb9c57cc539fa0764050865233e3617 /mesalib/src/mesa/main/shaderapi.c | |
parent | 7fae5492e3ef8e5fa15f742be4c2a15b9782e89a (diff) | |
parent | afbd3947071a33f59dda122f1ac396442a02c128 (diff) | |
download | vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.tar.gz vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.tar.bz2 vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.zip |
Merge remote-tracking branch 'origin/released'
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; |