You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out the best way to bind a different uniform buffer for each draw where each uniform has the same layout, and the rest of the pass/pipeline remains consistent.
Another example would be changing texture bindings for each draw within the same pass.
This is what I've tried, but it's very slow as it results in a new subpass for every draw. It's my understanding that in vulkan, pipelines and bindings can change within a subpass (but not attachments).
You might be able to improve the performance by using a bindless approach where you record one subpass and use push constants or gl_InstanceIndex to change what index the next draw references out of that bindless array. Example.
If you are changing other bindings or pipelines this won't help because the code at graph/resolver.rs:1108 ultimately creates one subpass for each "exec" (each call to record_subpass).
This could be done in a smarter way to avoid creating new subpasses when the rules allow. There is also some performance left on the table because fresh descriptor sets are written and bound for each subpass. I can't say how soon I can fix these items they should not change any public API.
... it's very slow ...
There is a performance tax of the runtime approach compared to pre-baked command buffers and descriptor sets. I do think there should be a compatible solution for times when a section of the render graph is known to stay the same or just need descriptor writes. Right now it's possible to use record_cmd_buf and do raw Vulkan inside of a larger graph but I would like to provide a better solution.
Aside from finding solutions that might work for you in the meantime, I see three issues to correct here:
Create subpasses only if required
Re-use existing descriptor sets when possible
Provide a way to "bake" render graphs and replay them over many frames
I'm trying to figure out the best way to bind a different uniform buffer for each draw where each uniform has the same layout, and the rest of the pass/pipeline remains consistent.
Another example would be changing texture bindings for each draw within the same pass.
This is what I've tried, but it's very slow as it results in a new subpass for every draw. It's my understanding that in vulkan, pipelines and bindings can change within a subpass (but not attachments).
The text was updated successfully, but these errors were encountered: