summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-11-04 18:05:19 +0100
committerMarek Olšák <maraeo@gmail.com>2011-11-04 21:56:56 +0100
commitc5e48025ed8dd44de63144ee3621c6aa4b5add81 (patch)
tree85f4892caad757caa6db0f429b611b4cea350964 /src/gallium
parent9804cf3118ae7249098af2a9c78b36f4fb576ee4 (diff)
gallium/cso_cache: remove one call to pipe_sampler_view_reference
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index fdd40fca126..b91fe1a8633 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1265,8 +1265,10 @@ restore_sampler_views(struct cso_context *ctx,
uint i;
for (i = 0; i < info->nr_views_saved; i++) {
- pipe_sampler_view_reference(&info->views[i], info->views_saved[i]);
- pipe_sampler_view_reference(&info->views_saved[i], NULL);
+ pipe_sampler_view_reference(&info->views[i], NULL);
+ /* move the reference from one pointer to another */
+ info->views[i] = info->views_saved[i];
+ info->views_saved[i] = NULL;
}
for (; i < info->nr_views; i++) {
pipe_sampler_view_reference(&info->views[i], NULL);