summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-14 18:31:06 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commit602a3e50e555197a10a0c1a1dda166fa8cf7053f (patch)
tree80bfdf738ae2a3c20062a74e2815f1a0d798f591 /src/mesa
parentf368ea37a2cd79051abf3be46c6bb1444aa05244 (diff)
st/mesa: set st_context::...num_samplers to 0 when there are no samplers
This was missed during my st/mesa series. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 5eb8584cf7e..00fc354532e 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -252,8 +252,10 @@ update_shader_samplers(struct st_context *st,
unsigned unit, num_samplers;
const struct pipe_sampler_state *states[PIPE_MAX_SAMPLERS];
- if (samplers_used == 0x0)
+ if (samplers_used == 0x0) {
+ *out_num_samplers = 0;
return;
+ }
num_samplers = util_last_bit(samplers_used);