diff options
author | Brian Paul <[email protected]> | 2008-05-20 14:38:45 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-05-20 14:38:45 -0600 |
commit | cf1ae676ec7cbf3a8595d41fb6b5128ff142b402 (patch) | |
tree | bb0d896caa0dd92ac55f3bb93edf05ff4a4eeb77 | |
parent | 71eb1088311b8309868d78e237452cb414728fbb (diff) | |
parent | 69fd676240f91b1a42a355b768f86d397b899002 (diff) |
Merge branch 'gallium-0.1' into gallium-tex-surfaces
-rw-r--r-- | src/mesa/state_tracker/st_cb_program.c | 9 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 3154fc85aa4..f951a928ead 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -89,8 +89,12 @@ static void st_use_program( GLcontext *ctx, +/** + * Called via ctx->Driver.NewProgram() to allocate a new vertex or + * fragment program. + */ static struct gl_program *st_new_program( GLcontext *ctx, - GLenum target, + GLenum target, GLuint id ) { switch (target) { @@ -118,7 +122,8 @@ static struct gl_program *st_new_program( GLcontext *ctx, } default: - return _mesa_new_program(ctx, target, id); + assert(0); + return NULL; } } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index b407fd884bc..4081722bc71 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -158,9 +158,6 @@ static void st_destroy_context_priv( struct st_context *st ) { uint i; - st_reference_fragprog(st, &st->fp, NULL); - st_reference_vertprog(st, &st->vp, NULL); - draw_destroy(st->draw); st_destroy_atoms( st ); st_destroy_draw( st ); @@ -195,6 +192,9 @@ void st_destroy_context( struct st_context *st ) /* need to unbind and destroy CSO objects before anything else */ cso_release_all(st->cso_context); + st_reference_fragprog(st, &st->fp, NULL); + st_reference_vertprog(st, &st->vp, NULL); + _mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache); _mesa_free_context_data(ctx); |