static void vrend_pipe_resource_unref(struct pipe_resource *pres,
                                      UNUSED void *data)
{
   struct vrend_resource *res = (struct vrend_resource *)pres;

   if (vrend_state.finishing || pipe_reference(&res->base.reference, NULL))
      vrend_renderer_resource_destroy(res);
}
static void vrend_pipe_resource_unref(struct pipe_resource *pres,
                                      UNUSED void *data)
{
   struct vrend_resource *res = (struct vrend_resource *)pres;

   if (vrend_state.finishing || pipe_reference(&res->base.reference, NULL))
      vrend_renderer_resource_destroy(res);
}