gfx-rs / wgpu-native

Native WebGPU implementation based on wgpu-core
Apache License 2.0
885 stars 105 forks source link

Question: Is sharing of native textures / buffers supported? #422

Open trbabb opened 2 months ago

trbabb commented 2 months ago

Apologies if this is available and I missed some documentation— 

Is it possible to "import" or "export" a native (i.e., Vulkan, Metal, etc.) texture or buffer into wgpu?

I see some hints online that in the browser it is possible to share a texture/surface populated by a webcam; this is exactly the use case I have, and would like to minimize copying to/from the CPU, since I'm finding that capturing is a bottleneck. Can this be done in the wgpu-native C/C++ bindings?

Similarly, my compute pipeline is outputting useful data, and it would be useful to be able to use it downstream outside of wgpu, e.g. in Vulkan/Metal/or even CUDA. Is this possible, and if not, is it planned?

almarklein commented 2 months ago

Not yet: https://github.com/gfx-rs/wgpu/issues/4067