diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2008-04-21 17:51:39 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2008-04-21 17:51:39 +0100 |
commit | 65efe807b9067aa07b382e3c4d9cea6222c5fc6b (patch) | |
tree | 637ef0a2f4768167766c1c1ad7b5f818d2b58665 /src/mesa/state_tracker/st_cb_bitmap.c | |
parent | 0824fb1d6afc651c0ab814e96f08326c706de216 (diff) |
gallium: Use CSO cache for shaders.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 505a13cc2b..1b863143e0 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -438,16 +438,18 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, cso_save_samplers(cso); cso_save_sampler_textures(cso); cso_save_viewport(cso); + cso_save_fragment_shader(cso); + cso_save_vertex_shader(cso); /* rasterizer state: just scissor */ st->bitmap.rasterizer.scissor = ctx->Scissor.Enabled; cso_set_rasterizer(cso, &st->bitmap.rasterizer); /* fragment shader state: TEX lookup program */ - pipe->bind_fs_state(pipe, stfp->driver_shader); + cso_set_fragment_shader(cso, stfp->driver_shader); /* vertex shader state: position + texcoord pass-through */ - pipe->bind_vs_state(pipe, st->bitmap.vs); + cso_set_vertex_shader(cso, st->bitmap.vs); /* sampler / texture state */ cso_single_sampler(cso, 0, &st->bitmap.sampler); @@ -488,9 +490,8 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, cso_restore_samplers(cso); cso_restore_sampler_textures(cso); cso_restore_viewport(cso); - /* shaders don't go through cso yet */ - pipe->bind_fs_state(pipe, st->fp->driver_shader); - pipe->bind_vs_state(pipe, st->vp->driver_shader); + cso_save_fragment_shader(cso); + cso_save_vertex_shader(cso); } |