From daf5b0f41baa50951e7c2f9ea5cd90b119085a7f Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Thu, 20 Sep 2007 07:50:33 -0400 Subject: Switch fragment/vertex shaders to the new caching semantics. Allow driver custom allocation within cached objects. The shaders are currently twiced (by cso layer and by the program itself). --- src/mesa/state_tracker/st_cb_drawpixels.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 d4f260ee54..4e3c24353e 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -330,7 +330,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, if (!stfp) { stfp = make_fragment_shader(ctx->st); } - pipe->bind_fs_state(pipe, stfp->fs); + pipe->bind_fs_state(pipe, stfp->fs->data); } /* vertex shader state: position + texcoord pass-through */ @@ -339,7 +339,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, if (!stvp) { stvp = make_vertex_shader(ctx->st); } - pipe->bind_vs_state(pipe, stvp->vs); + pipe->bind_vs_state(pipe, stvp->vs->data); } /* texture sampling state: */ @@ -393,8 +393,8 @@ 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); - pipe->bind_vs_state(pipe, ctx->st->state.vs); + pipe->bind_fs_state(pipe, ctx->st->state.fs->data); + pipe->bind_vs_state(pipe, ctx->st->state.vs->data); pipe->set_texture_state(pipe, unit, ctx->st->state.texture[unit]); pipe->bind_sampler_state(pipe, unit, ctx->st->state.sampler[unit]); pipe->set_viewport_state(pipe, &ctx->st->state.viewport); -- cgit v1.2.3