Skip to content

wgpu operation without a Queue #2084

@kvark

Description

@kvark

Is your feature request related to a problem? Please describe.
Functions from egui_wgpu_backend like update_buffers and add_textures require a wgpu::Queue argument. This is totally fine for many applications, and I assume it relies on queue.write_buffer and queue.write_texture internally, which are totally fine. However, in my case (and probably not just me), the drawing logic is encapsulated to produce command buffers, and it doesn't necessarily have access to a queue.

Describe the solution you'd like
Perhaps, a single call to update_resources that works with wgpu::CommandEncoder instead of wgpu::Queue. Internally, it would create a staging buffer with data, and/or re-use one from a pool.

Describe alternatives you've considered

Additional context
Downstream work is in kvark/vange-rs#214
Related to #2083 in a way that I'll likely to refactor egui logic out of the main render pass anyway, so this issue would not affect me as much as I thought. But once #2083 is addressed, it will be important for me again.
Also, thank you for the amazing library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestrerunDesired for Rerun.io

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions