summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-12-07 14:21:41 +0100
committerMarek Olšák <[email protected]>2014-12-10 21:59:36 +0100
commit0a60ebe30c186daf1fbe569e07bfe2e75f765824 (patch)
tree280a661cbf9b49842ffb8009867055e30a6c9df4 /src/gallium/tests
parentee5fb8d1ba7f50ed94e1a34fa0f6e15a0588145e (diff)
cso: put cso_release_all into cso_destroy_context
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/tests')
-rw-r--r--src/gallium/tests/trivial/quad-tex.c7
-rw-r--r--src/gallium/tests/trivial/tri.c4
2 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c
index 0d380125a57..abecedbd594 100644
--- a/src/gallium/tests/trivial/quad-tex.c
+++ b/src/gallium/tests/trivial/quad-tex.c
@@ -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);
diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c
index 13cc801ec63..078beb8f43f 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -221,8 +221,7 @@ static void init_prog(struct program *p)
static void close_prog(struct program *p)
{
- /* 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);
@@ -231,7 +230,6 @@ static void close_prog(struct program *p)
pipe_resource_reference(&p->target, 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);