by adding a batch reference for these textures during draw, we can successfully
destroy the resources without crashing
Reviewed-by: Erik Faye-Lun <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6924>
{
struct zink_sampler_view *view = zink_sampler_view(pview);
vkDestroyImageView(zink_screen(pctx->screen)->dev, view->image_view, NULL);
+ pipe_resource_reference(&pview->texture, NULL);
FREE(view);
}
} else {
struct zink_sampler_view *sampler_view = zink_sampler_view(ctx->image_views[i][index]);
zink_batch_reference_sampler_view(batch, sampler_view);
+ zink_batch_reference_resource_rw(batch, zink_resource(ctx->image_views[i][index]->texture), false);
}
}
}