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/drivers/dri | |
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/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index b26700f7494..e0e4781fecd 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -2347,7 +2347,8 @@ vec4_visitor::vec4_visitor(struct brw_vs_compile *c, this->current_annotation = NULL; this->c = c; - this->vp = prog->VertexProgram; + this->vp = (struct gl_vertex_program *) + prog->_LinkedShaders[MESA_SHADER_VERTEX]->Program; this->prog_data = &c->prog_data; this->variable_ht = hash_table_ctor(0, diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index f671223b8c2..310a022d652 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -354,15 +354,17 @@ brw_vs_precompile(struct gl_context *ctx, struct gl_shader_program *prog) { struct brw_context *brw = brw_context(ctx); struct brw_vs_prog_key key; - struct gl_vertex_program *vp = prog->VertexProgram; - struct brw_vertex_program *bvp = brw_vertex_program(vp); uint32_t old_prog_offset = brw->vs.prog_offset; struct brw_vs_prog_data *old_prog_data = brw->vs.prog_data; bool success; - if (!vp) + if (!prog->_LinkedShaders[MESA_SHADER_VERTEX]) return true; + struct gl_vertex_program *vp = (struct gl_vertex_program *) + prog->_LinkedShaders[MESA_SHADER_VERTEX]->Program; + struct brw_vertex_program *bvp = brw_vertex_program(vp); + memset(&key, 0, sizeof(key)); key.program_string_id = bvp->id; |