Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Allow creating modules with multiple entry points? #10

Open
almarklein opened this issue Jan 6, 2020 · 2 comments
Open

Allow creating modules with multiple entry points? #10

almarklein opened this issue Jan 6, 2020 · 2 comments

Comments

@almarklein
Copy link
Member

almarklein commented Jan 6, 2020

Or ... maybe not. GLSL modules have one entry point, so we'd exclude compiling to GLSL. At the least wait until we know if WSL supports this too.

Pro's:

  • Better code-reused at the GPU, so a tiny GPU memory consumption benefit?
  • Might be nice if it can be used to pack a vertex and fragment shader into a single module. But not sure if it can?
  • ...
@Korijn
Copy link
Collaborator

Korijn commented Jan 6, 2020

Why?

@almarklein
Copy link
Member Author

almarklein commented Jan 6, 2020

SpirV and WSL support it. But yeah, maybe this is mainly to allow writing multiple shaders in a single file. We already allow that (e.g. using the decorator multiple times on a function). So it could well be that there is no benefit.

Edit: That's why the title of this issues ends with a question mark :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants