5 ms·
Can you not use dma-buf and EXT_image_dma_buf_import?
by alexlarsson 12y ago
Can you not use dma-buf and EXT_image_dma_buf_import?
- jbk 12y agoMaybe, but that's quite not portable, and driver specific, AFAIK.
- comex 12y agoForgive me for a short rant, but this sort of thing is one reason I think other kernels should look at OS X's virtual memory interface for inspiration. There, you can always share any existing mapped page with another process, regardless of how it was allocated. Usually useful because it reduces the need to redo the way you allocate some (regular) memory just because you want to use it a certain way (sharing), but it works with driver-mapped pages too.
- alexlarsson 12y agoSharing a normal memory mapping is not necessarily what is required here though. What you want is to share the same GPU-side memory buffer between two processes. It may not even be mappable to cpu side memory.
- comex 12y agoIf it's mapped into the CPU address space, then it can be shared. If not, then there is a copy going on and you may as well just do it in the non-sandboxed process, no?
- alexlarsson 12y agoThere is no copy. You have a reference to a GPU side buffer, and you want to pass a reference to that buffer to another process, where it will continue to use the GPU to access it.