st_destroy_bound_image_handles(st);
for (i = 0; i < ARRAY_SIZE(st->state.frag_sampler_views); i++) {
- pipe_sampler_view_release(st->pipe,
- &st->state.frag_sampler_views[i]);
+ pipe_sampler_view_reference(&st->state.frag_sampler_views[i], NULL);
}
/* free glReadPixels cache data */
if (sv->view) {
/* check if the context matches */
if (sv->view->context == st->pipe) {
- pipe_sampler_view_release(st->pipe, &sv->view);
+ pipe_sampler_view_reference(&sv->view, NULL);
goto found;
}
} else {
if (new_max < views->max ||
new_max > (UINT_MAX - sizeof(*views)) / sizeof(views->views[0])) {
- pipe_sampler_view_release(st->pipe, &view);
+ pipe_sampler_view_reference(&view, NULL);
goto out;
}
struct st_sampler_views *new_views = malloc(new_size);
if (!new_views) {
- pipe_sampler_view_release(st->pipe, &view);
+ pipe_sampler_view_reference(&view, NULL);
goto out;
}