Skip to content
Discussion options

You must be logged in to vote

wgpu supports importing a Vulkan/DX12 buffer (it must be the same as the underlying device) using the from_hal functions when running natively. Because it is more internal, and expected to be used less, there are breaking changes more often though. I wrote a similar thing for oidn - https://github.com/Vecvec/oidn-wgpu-interop/blob/master/src/vulkan.rs , but a general idea is this

  1. Create wgpu instance (restrict backends to just vulkan) and iterate over adapters (I take an adapter from users instead of doing this).
  2. Get hal adapter (using as_hal) and vulkan adapter from that.
  3. Get the same cuda device as vulkan adapter.
  4. Create a wgpu device and queue
  5. Get hal device (using as_hal) and vulkan …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anderspitman
Comment options

Answer selected by anderspitman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants