OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d7a971
)
cso: make sure all sampler states are set/cleared
author
Brian Paul
<brianp@vmware.com>
Thu, 12 Sep 2013 23:30:50 +0000
(17:30 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 3 Oct 2013 20:05:28 +0000
(14:05 -0600)
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
95df28e
..
6642c45
100644
(file)
--- a/
src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/
src/gallium/auxiliary/cso_cache/cso_context.c
@@
-1089,10
+1089,17
@@
single_sampler_done(struct cso_context *ctx, unsigned shader_stage)
memcpy(info->hw.samplers,
info->samplers,
info->nr_samplers * sizeof(void *));
- info->hw.nr_samplers = info->nr_samplers;
+
+ /* set remaining slots/pointers to null */
+ for (i = info->nr_samplers; i < info->hw.nr_samplers; i++)
+ info->samplers[i] = NULL;
ctx->pipe->bind_sampler_states(ctx->pipe, shader_stage, 0,
- info->nr_samplers, info->samplers);
+ MAX2(info->nr_samplers,
+ info->hw.nr_samplers),
+ info->samplers);
+
+ info->hw.nr_samplers = info->nr_samplers;
}
}