aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);