API interoperability

54 views
Skip to first unread message

Edward Boszczowski

unread,
Aug 8, 2024, 7:51:49 PM8/8/24
to Dawn Graphics
I would like if it is possible to use a texture or buffer created by a graphic API like Vulkan or DX12 and communicate it with a buffer/texture created using Dawn with same graphic API for Dawn backend. 
In my use case I have the source code of a program that was made using DX12 and I would like to communicate the buffer used for the fragment shader in that program with a compute shader that is created with Dawn. My intention is that every time I perform a dispatch, the fragment shader can view the update value, but without to use a CPU as bridge between the Dx12 program and my Dawn program.

Thanks beforehand
Edward    

Austin Eng

unread,
Aug 14, 2024, 2:25:13 PM8/14/24
to Edward Boszczowski, Dawn Graphics
Hi Edward,

In Dx12, you can create a share handle from a resource. Once you have the share handle, you can import it into Dawn as a wgpu::SharedTextureMemory. You can see some partial docs on this feature here, and you can refer to our tests as a code reference.

Cheers,
Austin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/3be327e1-194d-4a65-be52-f54df0570f0dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages