Igalia / WPEBackend-fdo

BSD 2-Clause "Simplified" License
30 stars 24 forks source link

[BUG] using shm causes a mesa error #191

Open Bqleine opened 1 month ago

Bqleine commented 1 month ago

Bug description When using the shm export, mesa will make an error and no buffers are exported. This has happened to me when writing my own code, but can be reproduced with cog's headless platform:

noe@navi:~/src/cog/build> COG_MODULEDIR=$PWD/platform ./launcher/cog https://www.igalia.com -P headless
MESA: error: zink: could not create swapchain
Cog-Core-Message: 23:21:53.075: <https://www.igalia.com/> Load started.
Cog-Core-Message: 23:21:53.122: <https://www.igalia.com/> Loading...
Cog-Core-Message: 23:21:53.482: <https://www.igalia.com/> Loaded successfully.

How To Reproduce

  1. Start cog with the headless platform
  2. Mesa should make an error

I've been able to reproduce this on openSUSE Tumbleweed with an NVIDIA card and Pop OS with an AMD card.

Expected behavior No errors happen and buffers are exported through the export_shm_buffer callback.

Actual behavior A mesa error is printed and the export_shm_buffer is never called.

Bqleine commented 1 month ago

I would be ready to try and make a patch if you could provide me with some pointers to what might cause the issue and how to debug it.

Bqleine commented 1 month ago

A workaround is to set the GALLIUM_DRIVER environment variable to use something else like softpipe