Add DMA-BUF support to screencopy
emersion opened this issue · 6 comments
This would perform a GPU copy instead of a CPU one. screencopy already uses wl_buffer
so it shouldn't be too hard.
- Indicate which device to allocate buffers on
- Indicate the modifier
- (Future issue) How does that play with explicit sync?
Implementation detail: on the compositor side, either of these could be used:
Out of curiosity, why would we want this instead of the export-dmabuf approach?
I consider export-dmabuf to be borderline broken, and has some pretty bad race conditions. While copy-to-dmabuf isn't perfectly efficient, it'll still be pretty good, and I think it's much more preferable.
I disagree. Renderer v6 should allow us to mitigate race conditions in export-dmabuf.
By throwing out any allocations once they've been exported?
No, by adding a "release" request and allowing the client to keep a reasonable number of DMA-BUFs locked.