Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it ok for Vulkano-shaders to depend on Vulkano? #1693

Closed
Rua opened this issue Sep 4, 2021 · 3 comments
Closed

Is it ok for Vulkano-shaders to depend on Vulkano? #1693

Rua opened this issue Sep 4, 2021 · 3 comments

Comments

@Rua
Copy link
Contributor

Rua commented Sep 4, 2021

@AustinJ235 @Eliah-Lakhin I would like to start moving some of the code in Vulkano-shaders to the main Vulkano crate, so that it can be used both by runtime-loaded shaders and shaders compiled with Vulkano-shaders. But to avoid duplication, Vulkano-shaders would need to be able to import some of these items from the main crate. It currently lists Vulkan only as a dev-dependency, but I would like to upgrade this to a full dependency. This would mean that Vulkano-shaders can't be used without Vulkano anymore, but I think that's ok because it outputs Vulkano-specific code anyway and wouldn't be particularly useful without it.

@Eliah-Lakhin
Copy link
Contributor

@Rua I think that's fine. But can you please outline what particular changes are you going to do? The thing is I'm currently working on some Vulkano-shaders improvements too.

@Rua
Copy link
Contributor Author

Rua commented Sep 4, 2021

  • Implementing Make shader data generation available at runtime #1558
  • See if I can generate some of the types such as Instruction automatically from the SPIR-V grammar JSON file.
  • Build up a bit of information at parse time, such as the location of each ID, and a list of any annotations (names, decorations) it has. Also making a list of sections in the module, as described in "2.4. Logical Layout of a Module" in the SPIR-V spec. This is mainly so that later searches don't have to iterate through all the instructions each time, but can find what they need more quickly.

There is no hurry though, I haven't done any work yet so I'll wait for you to finish.

@Eliah-Lakhin
Copy link
Contributor

Eliah-Lakhin commented Sep 4, 2021

@Rua ok, sounds good. Just to let you know that I'm currently working on extension of vulkano-shaders to compile several sources at once producing independent generated layout per each source, but keeping all their structs in a single shareable generated ty mod. This feature should resolve a long-standing problem of type-safe interoperability between generated shaders. I probably will finish this work today and provide a PR.

@Rua Rua closed this as completed Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants