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_drawpixels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c') diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index be5434f91b..f4d6b9362c 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -662,7 +662,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, pipe->bind_fs_state(pipe, stfp->fs->data); /* vertex shader state: position + texcoord pass-through */ - pipe->bind_vs_state(pipe, stvp->vs->data); + pipe->bind_vs_state(pipe, stvp->cso->data); /* texture sampling state: */ { @@ -719,7 +719,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, /* restore GL state */ pipe->bind_rasterizer_state(pipe, ctx->st->state.rasterizer->data); pipe->bind_fs_state(pipe, ctx->st->state.fs->data); - pipe->bind_vs_state(pipe, ctx->st->state.vs->data); + pipe->bind_vs_state(pipe, ctx->st->state.vs->cso->data); pipe->set_sampler_texture(pipe, unit, ctx->st->state.sampler_texture[unit]); pipe->bind_sampler_state(pipe, unit, ctx->st->state.sampler[unit]->data); pipe->set_viewport_state(pipe, &ctx->st->state.viewport); -- cgit v1.2.3