ValveSoftware / Fossilize

A serialization format for various persistent Vulkan object types.
MIT License
585 stars 47 forks source link

Implement nested pipeline libraries #245

Closed KonstantinSeurer closed 5 months ago

KonstantinSeurer commented 6 months ago

As you suggested, the depth is now computed by enqueue_parent_pipelines. enqueue_parent_pipelines now writes the hashes of enqueued pipelines to a set of which the parent pipelines are enqueued until all dependencies are resolved. The loop over max_depth has been replaced by a vector which is sorted by compilation order.

KonstantinSeurer commented 6 months ago

I went with adding a lock to enqueue_parent_pipeline since enqueue_create_.*_pipeline already lock their access, so it's trivial. The other approach got quite messy.

I also pushed a small cleanup commit which isn't really relevant for this PR, but I also don't see a need to open another PR for it.