-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Labels
t: enhancementA new feature or improvement to an existing one.A new feature or improvement to an existing one.
Description
Discussed in #524
Right now, the ecosystem for SPIR-V is quite buggy when handling multiple entry points per spir-v module. We've fought it a lot, but it's time to give up 🔥 and add an option to emit multiple files per crate, one entry point per file.
- Add an option to spirv-builder to let the user specify that they want multiple files
- Plumb that through to rust-gpu
- Near the end of linking (before ID compaction? idk), clone the module N times, where N is the number of entry points. In each one, remove all but one entry point, then run DCE on it.
- Output the collection of files somewhere(?). @eddyb said that there's pre-existing code to translate a rust name (e.g.
foo::bar
) to a filesystem-okay path in MIR dumping, we should re-use that. - Return a
HashMap<function name, Path>
from spirv-builder to the user ✨somehow✨. @eddyb had the idea of making the rustc artifact actually be a json file that contains that map, and then spirv-builder would read that json and return that map.
Metadata
Metadata
Assignees
Labels
t: enhancementA new feature or improvement to an existing one.A new feature or improvement to an existing one.