From ac95fee4fffee77bb7bd798d094ed2e3a7c4019b Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 14 Jan 2008 19:12:46 -0700 Subject: Fix problems with vertex shaders and the private draw module. The CSO returned by pipe->create_vs_state() can't be passed to the private draw module. That was causing glRasterPos to blow up. Add a 'draw_shader' field to st_vertex_program for use with the private draw module. Change st_context->state.vs type from cso_vertex_shader to st_vertex_program. --- src/mesa/state_tracker/st_cb_program.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_program.c') diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index aed6b1ee97..63a954264e 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -39,6 +39,8 @@ #include "shader/programopt.h" #include "shader/shader_api.h" +#include "pipe/cso_cache/cso_cache.h" + #include "st_context.h" #include "st_program.h" #include "st_atom_shader.h" @@ -181,10 +183,11 @@ static void st_program_string_notify( GLcontext *ctx, stvp->serialNo++; - if (stvp->vs) { - /* free the TGSI code */ - // cso_delete(stfp->vs); - stvp->vs = NULL; + if (stvp->cso) { + /* free the CSO data */ + st->pipe->delete_vs_state(st->pipe, stvp->cso->data); + FREE((void *) stvp->cso); + stvp->cso = NULL; } stvp->param_state = stvp->Base.Base.Parameters->StateFlags; -- cgit v1.2.3