-
-
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
D3D11 Vulkan interop #16426
base: master
Are you sure you want to change the base?
D3D11 Vulkan interop #16426
Conversation
…lKeyedMutex and import from VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
…upport, using IsVulkanBacked, Angle OpenGL is still supported.
fixes #16411 |
|
This comment has been minimized.
This comment has been minimized.
Yes, my bad :) |
@cla-avalonia agree |
/// <param name="acquire">The acquire callback to call before accessing the image</param> | ||
/// <param name="release">The release callback to call after accessing the image </param> | ||
/// <returns>A task that completes when update operation is completed and user code is free to destroy or dispose the image</returns> | ||
public Task UpdateWithExternalKeyedMutexAsync(ICompositionImportedGpuImage image, Action acquire, Action release) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that it won't work properly.
The mutex controls resources on the GPU side and should be locked/released as a part of the GPU command stream, not on the command issuer side. If you simply lock/unlock in the renderer, it won't affect the enqueued Vulkan commands, those would still be submitted to the queue without locks.
At most you'll stall the CPU.
Please, use proper Vulkan synchronization primitives that are capable of using DXGI Keyed Mutexes.
See Avalonia/samples/GpuInterop/VulkanDemo/VulkanCommandBufferPool.cs Lines 182 to 219 in c47fd63
Avalonia/samples/GpuInterop/VulkanDemo/VulkanSwapchain.cs Lines 87 to 91 in c47fd63
|
Thanks! updated |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
Hi, Thanks |
What does the pull request do?
Implement D3D11 (even D3D12 in future) inside Avalonia with Vulkan backend support
What is the current behavior?
Currently is doesn't support Vulkan backend when using D3D11
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues