diff options
author | Ian Romanick <[email protected]> | 2011-08-20 13:51:36 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-10-07 16:39:50 -0700 |
commit | 010cc547ca8c1fb2107106b0ad0de560780ce9aa (patch) | |
tree | c653715e4bac2040927dcdbf2f353c6070984855 /src/mesa/main/uniforms.c | |
parent | 2fae55666e298525fe3b5550aa2a2ebeea437710 (diff) |
mesa: Use gl_shader_program::_LinkedShaders instead of VertexProgram
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r-- | src/mesa/main/uniforms.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 2323819aa43..28a3beef596 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -180,7 +180,7 @@ find_uniform_parameter_pos(struct gl_shader_program *shProg, GLint index, pos = shProg->Uniforms->Uniforms[index].VertPos; if (pos >= 0) { - prog = &shProg->VertexProgram->Base; + prog = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program; } else { pos = shProg->Uniforms->Uniforms[index].FragPos; @@ -911,11 +911,12 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg, /* A uniform var may be used by both a vertex shader and a fragment * shader. We may need to update one or both shader's uniform here: */ - if (shProg->VertexProgram) { + if (shProg->_LinkedShaders[MESA_SHADER_VERTEX]) { /* convert uniform location to program parameter index */ GLint index = uniform->VertPos; if (index >= 0) { - set_program_uniform(ctx, &shProg->VertexProgram->Base, + set_program_uniform(ctx, + shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program, index, offset, type, count, elems, values); } } @@ -1056,11 +1057,12 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, uniform = &shProg->Uniforms->Uniforms[location]; - if (shProg->VertexProgram) { + if (shProg->_LinkedShaders[MESA_SHADER_VERTEX]) { /* convert uniform location to program parameter index */ GLint index = uniform->VertPos; if (index >= 0) { - set_program_uniform_matrix(ctx, &shProg->VertexProgram->Base, + set_program_uniform_matrix(ctx, + shProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program, index, offset, count, rows, cols, transpose, values); } |