Skip to content
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

wgpu-hal: Expose CommandBuffer/CommandEncoder native API type #4937

Open
Supreeeme opened this issue Dec 27, 2023 · 1 comment
Open

wgpu-hal: Expose CommandBuffer/CommandEncoder native API type #4937

Supreeeme opened this issue Dec 27, 2023 · 1 comment

Comments

@Supreeeme
Copy link

Is your feature request related to a problem? Please describe.
wgpu does not currently handle all available options of all graphics apis - for example, when using Vulkan, doing a queue family transfer of an external image is not expressible in wgpu, so you have to fall back to manually creating a command pool and command buffer and using raw Vulkan to achieve it.

Describe the solution you'd like
Expose the native equivalents to CommandBuffer or CommandEncoder, so that the resulting command buffer can be submitted in the same queue submission as other wgpu CommandBuffers. For example, adding a function to CommandEncoder to support directly recording to the underlying VkCommandBuffer.

Describe alternatives you've considered
Manually creating command pool, buffer, and manually submitting to the queue. Depending on how many of these command buffers are needed, you could end up with a lot of queue submission overhead.

@cwfitzgerald
Copy link
Member

Adding a raw_encoder or something wouldn't be to hard in wgpu-hal as a low-lift task.

For a more comprehensive writeup and plan of underlying api interop, look at #4067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants