st_texture_get_sampler_view(struct st_context *st,
struct st_texture_object *stObj)
{
- struct pipe_sampler_view **used = NULL, **free = NULL;
+ struct pipe_sampler_view *used = NULL, **free = NULL;
GLuint i;
for (i = 0; i < stObj->num_sampler_views; ++i) {
return sv;
/* Wasn't the right one, but remember it as template */
- used = sv;
+ used = *sv;
} else {
/* Found a free slot, remember that */
free = sv;
/* Add just any sampler view to be used as a template */
if (used)
- pipe_sampler_view_reference(free, *used);
+ pipe_sampler_view_reference(free, used);
return free;
}