ZINK support to use libvulkan on Virtio-GPU

Lei Zhou <[email protected]>
Newsgroups gmane.comp.video.mesa3d.devel
Message-ID <CAB9bhaFF2LkHGs7Lr-_Rc=8R9_AmFkCXsqw-2gHYQbrG-OwNRw@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.