From: Marek Olšák Date: Sat, 10 Jun 2017 19:39:16 +0000 (+0200) Subject: st/mesa: don't unbind sampler states if none are used X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd86876fe4abcdd0d7d77f05eb24fadc985f2530;p=mesa.git st/mesa: don't unbind sampler states if none are used Reviewed-by: Nicolai Hähnle Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 8c121d54071..539b28933b9 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -275,7 +275,7 @@ update_shader_samplers(struct st_context *st, const GLuint old_max = *num_samplers; const struct pipe_sampler_state *states[PIPE_MAX_SAMPLERS]; - if (*num_samplers == 0 && samplers_used == 0x0) + if (samplers_used == 0x0) return; *num_samplers = 0;