-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate benefits of binding the mapped memory directly to other GPU #2
Comments
Maybe look into |
Never mind nvidia doesn't implement this extension |
Thanks for the idea! Yes this issue is exactly for collecting/finding ideas like that. I thought of |
Maybe |
I think
Integrated
So there seems not way at all to circumvent the memcpy. |
I'm probably reading the vulkan spec and/or the problem wrong so feel free to call me out. |
Yes, transferring the data via DMA is certainly better if that is possible. However
So I would need to acquire such a dma_buf file descriptor for the nvidia-buffer object (or for the mem-mapped region of the image). Do you have any Idea how that would be possible, if I cannot acquire it from the nvidia driver? |
Sadly no. I did not know about the dma_buf requirement. |
Thanks for the resources, it's good to collect everything possibly relevant here. As I understand E.g. for nvidia-GPUs the supported extensions are mentioned here: https://developer.nvidia.com/vulkan-driver Searching for
|
Maybe ask NVidia about |
Just for the record, dma-buf is definitively the way to go, as I think this is what PRIME does for OpenGL. And this is likely the lowest level you can do it at, and thus with the less overrides. I don’t understand the specifics, but maybe asking @aaronp24 about that Vulkan extension you would require to do so could be a good idea. |
I don't have much to add here, but @aaronp24 asked me to chime in, so I'll just say you've correctly surmised we don't currently support any of the extensions necessary to make a zero-copy/dma-copy-only transfer between an NV GPU and a non-NV GPU in our Linux Vulkan driver. I don't have any roadmap to share for support of any of these extensions at the moment. |
To skip the memcpy, we could import mapped memory from the rendering GPU into the display GPU or the other way round, or use host memory and import in both.
We need to check which of those alternatives is fastest and implementable and extend the code to use this optimization if available.
However (at least on my machine) it seems that the general transfer of the image between the GPU is the bottleneck. So maybe there is a better way then memmapping and copying?
The text was updated successfully, but these errors were encountered: