I'm trying to write a standalone(without using sommelier proxy) wayland client using virtio-gpu cross-domain protocol.
I'm having some issues with zwp_linux_dmabuf_v1 protocol. Sometimes the client crashes because stride and modifiers are wrong when calling "zwp_linux_buffer_params_v1::add".
I see sommelier uses "DRM_IOCTL_VIRTGPU_RESOURCE_INFO_CROS" ioctl to get the correct metadata from the host, but this ioctl is not available on upstream kernel(sommelier also doesn't work for me with wayland dma-buf because of this).
Also I see "CROSS_DOMAIN_CMD_GET_IMAGE_REQUIREMENTS" can be used to get the proper metadata. I tried it but it sometimes return incorrect stride, I'm not sure why. Also I have to immediately allocate a host blob for the returned resource id. Otherwise next call of this type fails with "RutabagaError::AlreadyInUse".
What is the correct way to get this metadata? I saw in the chromium bug tracker that arcvm uses
"cross-domain resource sharing" for this. What is it? is there some implementation I can use as reference?
Thank you,