From 602a3e50e555197a10a0c1a1dda166fa8cf7053f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 14 Jun 2017 18:31:06 +0200 Subject: [PATCH] st/mesa: set st_context::...num_samplers to 0 when there are no samplers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This was missed during my st/mesa series. Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_atom_sampler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.30.2