vrend: Only use virgl_gbm_transfer when transfering to host.

When transfering from host use normal path.  On sona performance jumps
from 46 mpixels/s to ~105 mpixels/s.

Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
David Riley 5 years ago committed by Gurchetan Singh
parent c529faf1ba
commit a352943002
  1. 4
      src/vrend_renderer.c

@ -7622,7 +7622,9 @@ int vrend_renderer_transfer_iov(const struct vrend_transfer_info *info,
}
#ifdef ENABLE_GBM_ALLOCATION
if (res->gbm_bo)
if (res->gbm_bo &&
(transfer_mode == VIRGL_TRANSFER_TO_HOST ||
res->storage == VREND_RESOURCE_STORAGE_GBM_ONLY))
return virgl_gbm_transfer(res->gbm_bo, transfer_mode, iov, num_iovs, info);
#endif

Loading…
Cancel
Save