diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-03-24 11:55:29 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-03-24 11:56:05 -0600 |
commit | 22a3d022542fed267d48b48a44e10226d55c8afd (patch) | |
tree | fd47254673f9eebb296969a13c9b5c958d6bb7ca /src/mesa/state_tracker/st_cb_bitmap.c | |
parent | d246274b9c48c01b61490f0a76c22aebb8e64e1e (diff) |
gallium: free bitmap fragment shaders, misc clean-up
Diffstat (limited to 'src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index dbf2f77c2e..6e59439874 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -44,6 +44,7 @@ #include "st_atom_constbuf.h" #include "st_program.h" #include "st_cb_bitmap.h" +#include "st_cb_program.h" #include "st_mesa_to_tgsi.h" #include "st_texture.h" #include "pipe/p_context.h" @@ -407,7 +408,6 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, cso_save_rasterizer(cso); cso_save_samplers(cso); - //cso_save_viewport(cso); /* rasterizer state: just scissor */ { @@ -458,11 +458,9 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, /* restore state */ cso_restore_rasterizer(cso); cso_restore_samplers(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); - pipe->set_sampler_textures(pipe, ctx->st->state.num_textures, ctx->st->state.sampler_texture); } @@ -514,7 +512,13 @@ st_destroy_bitmap(struct st_context *st) { struct pipe_context *pipe = st->pipe; - /* XXX free frag shader state */ + if (st->bitmap.combined_prog) { + st_delete_program(st->ctx, &st->bitmap.combined_prog->Base.Base); + } + + if (st->bitmap.program) { + st_delete_program(st->ctx, &st->bitmap.program->Base.Base); + } if (st->bitmap.vs) { pipe->delete_vs_state(pipe, st->bitmap.vs); |