cso: put cso_release_all into cso_destroy_context
[mesa.git] / src / gallium / tests / trivial / quad-tex.c
index 0d380125a5791b33b2ca498dbbce07b8c74e1758..abecedbd594cf054b1fb1ef9dfda4727c4c38bb3 100644 (file)
@@ -275,11 +275,7 @@ static void init_prog(struct program *p)
 
 static void close_prog(struct program *p)
 {
-       /* unset bound textures as well */
-       cso_set_sampler_views(p->cso, PIPE_SHADER_FRAGMENT, 0, NULL);
-
-       /* unset all state */
-       cso_release_all(p->cso);
+       cso_destroy_context(p->cso);
 
        p->pipe->delete_vs_state(p->pipe, p->vs);
        p->pipe->delete_fs_state(p->pipe, p->fs);
@@ -290,7 +286,6 @@ static void close_prog(struct program *p)
        pipe_resource_reference(&p->tex, NULL);
        pipe_resource_reference(&p->vbuf, NULL);
 
-       cso_destroy_context(p->cso);
        p->pipe->destroy(p->pipe);
        p->screen->destroy(p->screen);
        pipe_loader_release(&p->dev, 1);