virgl: gbm: Also convert VIRGL_BIND_SAMPLER_VIEW

We convert GBM_BO_USE_TEXTURING to VIRGL_BIND_SAMPLER_VIEW at
Android side, so just convert VIRGL_BIND_SAMPLER_VIEW back to
GBM_BO_USE_TEXTURING, otherwise the allocation won't go
through gbm.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Lepton Wu 5 years ago
parent 8446009e7c
commit 33cfd72346
  1. 2
      src/virgl_gbm.c

@ -380,6 +380,8 @@ int virgl_gbm_transfer(struct gbm_bo *bo, uint32_t direction, struct iovec *iove
uint32_t virgl_gbm_convert_flags(uint32_t virgl_bind_flags)
{
uint32_t flags = 0;
if (virgl_bind_flags & VIRGL_BIND_SAMPLER_VIEW)
flags |= GBM_BO_USE_TEXTURING;
if (virgl_bind_flags & VIRGL_BIND_RENDER_TARGET)
flags |= GBM_BO_USE_RENDERING;
if (virgl_bind_flags & VIRGL_BIND_SCANOUT)

Loading…
Cancel
Save