Fix a silly bug on setting samplers.
authorZack Rusin <zack@tungstengraphics.com>
Mon, 17 Sep 2007 17:49:12 +0000 (13:49 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Tue, 18 Sep 2007 11:19:12 +0000 (07:19 -0400)
Bind when the currently bound state is /not/ the one
we just found/created.

src/mesa/state_tracker/st_atom_sampler.c

index 9a728e2d79140bf575ee37031406a973ba956284..994d3691d8b2bc592428b307ba18ec41db3294ed 100644 (file)
@@ -146,7 +146,7 @@ update_samplers(struct st_context *st)
       const struct pipe_sampler_state *cached_sampler =
          st_cached_sampler_state(st, &sampler);
 
-      if (cached_sampler == st->state.sampler[u]) {
+      if (cached_sampler != st->state.sampler[u]) {
          /* state has changed */
          st->state.sampler[u] = cached_sampler;
          st->pipe->bind_sampler_state(st->pipe, u, cached_sampler);