From: Marek Olšák Date: Wed, 14 Jun 2017 16:31:06 +0000 (+0200) Subject: st/mesa: set st_context::...num_samplers to 0 when there are no samplers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=602a3e50e555197a10a0c1a1dda166fa8cf7053f;p=mesa.git 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 --- 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);