ZINK support to use libvulkan on Virtio-GPU

Lei Zhou lei.zhou at linaro.org
Mon Jul 22 14:31:06 UTC 2024


Dear mesa/experts,

Need your support to help us better understand how we can go about this
behavior.

Here is what we have:
     1.    We are running QEMU based Debian guest with -device
virtio-gpu-rutabaga,gfxstream-vulkan=on,cross-domain=on.   Expect to run
vulkan application eg.vkcube-wayland from guest via wayland proxy over
gfxstream and wayland protocol.   Please check this link (
https://www.qemu.org/docs/master/system/devices/virtio-gpu.html) for what
is rutabaga/gfxstream GPU mode.     In theory,  it should be sufficient to
render vkcube graphics over vulkan/gfxstream/virtio-gpu via host wayland
compositor with a physical GPU driver.
  2.  On guest side mesa,  we compile with these options
      -Dgallium-drivers=radeonsi,virgl,zink -Dvulkan-drivers=virtio,amd.
3.  When running $vkcube-wayland with wayland proxy,
gbm_create_device(...) will be invoked to acquire drm device resource,
which will invoke driCreateNewScreen2 -> dri2_init_screen() etc.

    *within mesa/src/gallium/frontends/dri/dri2.c,  what was the intention
to indicate that "no zink" will be used?*
===========================================
#ifdef HAVE_LIBDRM
if (pipe_loader_drm_probe_fd(&screen->dev, screen->fd, *false*)) <<=== *ZINK
usage*
      pscreen = pipe_loader_create_screen(screen->dev,
driver_name_is_inferred);
#endif
=============================================

4.  In current behavior, virtio_gpu_driver_descriptor will be discovered
and used.  Which will depend on "-device virtio-gpu-gl-pci" the capsets of
virgl and virgl2, which is not what we are using.


Any clarification will be highly appreciated!

Lei Zhou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20240722/6d8f1d0a/attachment.htm>


More information about the mesa-dev mailing list