Can we exposed the mutable referance of CommandEncoder in RenderPass? #6461
Closed
Ahuang0107
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hi! 👋 Usually the pattern is that you perform any copies or anything that needs exclusive access to the render pass before you start the render pass. So you could have a separate loop before |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Below is an example of what I'm trying to do.

In some cases, I hope to call command_encoder's copy_texture_to_texture once between processing instance A and instance B after creating render_pass. But it's currently not possible because RenderPass holds a mutable reference to CommandEncoder. If we can exposed RenderPass.parent, the following code can run.
(ps: of course, in the following example, I can modify it to create a separate pass when processing each instance, but I actually encountered this problem when using bevy. it will be much simple to do some adjust in wgpu)
Beta Was this translation helpful? Give feedback.
All reactions