mesa: Use gl_shader_program::_LinkedShaders instead of VertexProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Ian Romanick
2011-08-20 13:51:36 -07:00
parent 2fae55666e
commit 010cc547ca
13 changed files with 39 additions and 34 deletions

View File

@@ -808,8 +808,9 @@ 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->_LinkedShaders[MESA_SHADER_VERTEX])
printf(" vert prog %u\n",
shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program->Id);
if (shProg->FragmentProgram)
printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id);
if (shProg->GeometryProgram)
@@ -963,7 +964,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_shader *vs = shProg->_LinkedShaders[MESA_SHADER_VERTEX];
const struct gl_geometry_program *gp = shProg->GeometryProgram;
const struct gl_fragment_program *fp = shProg->FragmentProgram;
@@ -991,7 +992,7 @@ 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)) {
if (vs && !validate_samplers(vs->Program, errMsg)) {
return GL_FALSE;
}
if (gp && !validate_samplers(&gp->Base, errMsg)) {