projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9804cf3
)
gallium/cso_cache: remove one call to pipe_sampler_view_reference
author
Marek Olšák
<maraeo@gmail.com>
Fri, 4 Nov 2011 17:05:19 +0000
(18:05 +0100)
committer
Marek Olšák
<maraeo@gmail.com>
Fri, 4 Nov 2011 20:56:56 +0000
(21:56 +0100)
src/gallium/auxiliary/cso_cache/cso_context.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/cso_cache/cso_context.c
b/src/gallium/auxiliary/cso_cache/cso_context.c
index fdd40fca126f2a8a1a3af3df6f96a6da02878a55..b91fe1a8633b5c2b498c37b5a21b530231c13f78 100644
(file)
--- 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);