-
-
Notifications
You must be signed in to change notification settings - Fork 63
drm: Add Vulkan host mapping blit #161
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
base: main
Are you sure you want to change the base?
Conversation
|
I was just going to comment on the Vulkan dep, thanks @fufexan! I think we can make it a build dep only and use entirely dynamic library loading at runtime to fail gracefully on a lack of Vulkan, but at this point I think pretty much everyone has Vulkan installed on their system. |
|
oh god vulkan @outfoxxed has multi amd thats worth testing too |
|
Seems like v0.8.0 might have broken multi-amd according to #162. I've asked for more details there. It'd be good to test on this PR too, though I don't think this PR will affect it. It only takes effect when the OpenGL non-CPU codepath fails, and on multi-amd that codepath should work. |
Lmk what I need to test and I can do that. |
|
Could you first test if the latest aquamarine release (v0.8.0) is still working with displays connected to each of your AMD GPUs, and then test if this PR breaks it if it is working? |
|
Both 0.8.0 and this branch work as expected. Anything beyond functioning at surface level that needs to be tested? |
|
Nope, just that the displays show up and aren't super slow or anything. |
|
Any updates on this? I have an Intel + NVIDIA setup and the constant CPU high usage on the external display (that I think that is caused by the CPU copy) is very annoying, this may help but I can't really test right now |
This PR adds a more efficient alternative CPU based copy if the formats between the buffers are the same (i.e. there's two NVIDIA cards). In addition, this PR lays the groundwork for other uses of Vulkan especially in blit. Vulkan is a lot more powerful than OpenGL here, and any future blit optimizations will likely also use it.
There are two reasons this copy is more efficient than the
intermediateBufcodepath:GL_RGBAwhereas Vulkan can keep the pixel data in the existing format and simply copy the memory. However, the Vulkan code could be extended to support a format conversion in the future.Right now I think this is only useful if you have two NVIDIA cards, but @gulafaran has been looking at using Vulkan to optimize the blit for the NVIDIA<>Intel case and this PR lays important groundwork for that as well.
If you want to test this PR on a single-GPU system you can use this patch to force enable Vulkan based blitting: https://gist.github.com/PlasmaPower/1499e2db2abbb1ab88aa1334c145f3fa