bevy_hanabi icon indicating copy to clipboard operation
bevy_hanabi copied to clipboard

Cache bind group layouts before specializing pipelines

Open djeedai opened this issue 1 year ago • 0 comments

We create bind group layouts during pipeline specialization because we need them, but then discard them (because we can't mutate anything inside specialize()), and then re-create a second exact copy of the layout layer when we need to cache it to be able to later create the bind group. This is a source of errors, and a waste of GPU memory. We should create and cache those layouts once and for all before we specialize the pipeline, and use the same object for the pipeline specialization and for the bind group creation.

djeedai avatar Oct 23 '24 11:10 djeedai