-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Implemented interop with externally managed GPU memory #10014
Conversation
ff80fdb
to
d714f37
Compare
f67655c
to
dee5f4d
Compare
dee5f4d
to
7a2ca3e
Compare
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Is I can get a working demo if I switch the window to |
Which GPU are you using? I've tested the PR with NVIDIA Quadro 2000 on Linux and Radeon Pro 555 on Windows. |
Freezes for me as well with |
Ah, of course. On laptops the low-power integrated GPU is used by default. I also have an Intel UHD integrated GPU, though I don't know model number. I added this line to program startup and the Vulkan demo started to run correctly on my discrete NVidia GPU: NativeLibrary.Load("nvapi64.dll"); // cues Nvidia drivers to run our windows on the system's dedicated GPU, not an integrated one Unfortunately, activating the correct GPU with AMD's drivers is a lot harder in C#. For platforms other than Windows I haven't a clue; this is something we need to work out for our product too. |
We can probably expose GPU selection logic for Win32 backend since ANGLE runs on top of DirectX and have access to IDXGIAdapter. It will, however, break possible WGL interop since WGL always uses system-selected GPU. |
Same here. It works on NVidia. If I switch to the internal Intel GPU it deadlocks. On a pure Intel i7 1165G7 (Intel Iris XE) it crashes in We have ported this into our own Vulkan bindings and we see the very same effect. However, we had done a Vk 3D renderer integration into WPF in the past using the very same concept. A couple of things differ there as follows:
That interop we made works on all platforms (pure Nvidia, Nvidia/Intel laptops, pure Intel laptops >= Intel Gen 10). I have put the main portion of the interop code here: https://github.com/llfab/Samples/tree/main/VulkanDxInterop/DXInterop |
@kekekeks I was wondering, will it be possible to support Vulkan Control on macOS? Of course Vulkan is not officially available on macOS, because Apple... But I believe it could work via moltenVK? Currently macOS openGL backend ( |
See #9925
Also enables OpenGlControlBase on Windows via an ANGLE context powered by a separate Direct3D device.