cell: fix segfault when freeing samplers
authorBrian Paul <brianp@vmware.com>
Tue, 27 Jul 2010 02:49:35 +0000 (20:49 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 27 Jul 2010 02:49:35 +0000 (20:49 -0600)
src/gallium/drivers/cell/ppu/cell_pipe_state.c

index 03f84d295b50b63a0cd7d63719807e3ced435fdf..223adda48f0651714d538ff12d0ea73618657206 100644 (file)
@@ -281,7 +281,7 @@ cell_set_fragment_sampler_views(struct pipe_context *pipe,
          struct pipe_resource *new_tex = new_view ? new_view->texture : NULL;
 
          pipe_sampler_view_reference(&cell->fragment_sampler_views[i],
-                                     views[i]);
+                                     new_view);
          pipe_resource_reference((struct pipe_resource **) &cell->texture[i],
                                 (struct pipe_resource *) new_tex);