diff options
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; |