st/mesa: set st_context::...num_samplers to 0 when there are no samplers
authorMarek Olšák <marek.olsak@amd.com>
Wed, 14 Jun 2017 16:31:06 +0000 (18:31 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Jun 2017 23:51:02 +0000 (01:51 +0200)
This was missed during my st/mesa series.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_atom_sampler.c

index 5eb8584cf7ebf89dbb0dcb4f864ee8f11675be5f..00fc354532ec6b7a2e3012345c8204da088ca9e6 100644 (file)
@@ -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);