static void vrend_pipe_resource_attach_iov(struct pipe_resource *pres,
                                           const struct iovec *iov,
                                           int iov_count,
                                           UNUSED void *data)
{
   struct vrend_resource *res = (struct vrend_resource *)pres;

   res->iov = iov;
   res->num_iovs = iov_count;

   if (has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY)) {
      vrend_write_to_iovec(res->iov, res->num_iovs, 0,
            res->ptr, res->base.width0);
   }
}
static void vrend_pipe_resource_attach_iov(struct pipe_resource *pres,
                                           const struct iovec *iov,
                                           int iov_count,
                                           UNUSED void *data)
{
   struct vrend_resource *res = (struct vrend_resource *)pres;

   res->iov = iov;
   res->num_iovs = iov_count;

   if (has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY)) {
      vrend_write_to_iovec(res->iov, res->num_iovs, 0,
            res->ptr, res->base.width0);
   }
}