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

IR "imports" section #44

Closed
Napokue opened this issue Apr 11, 2020 · 2 comments
Closed

IR "imports" section #44

Napokue opened this issue Apr 11, 2020 · 2 comments
Labels
area: middle Intermediate representation kind: feature New feature or request

Comments

@Napokue
Copy link
Collaborator

Napokue commented Apr 11, 2020

For WGSL, it is possible to use the "GLSL.std.450" import, as can be seen here in the spec. WGSL constraints this to only this import.

For instance, the SPIR-V backend now always includes this import statically, even though it isn't present in the WGSL. This causes an extra instruction, but it would be nice to keep it clean.

To continue on the previous point: as the import is always statically included, other front-ends are also limited by the WGSL constraint of only having the "GLSL.std.450" import available.

I think it would be a good idea to have a representation of "imports" in the IR so all the back-ends only have to loop through it and include it.

@Napokue Napokue added kind: feature New feature or request area: middle Intermediate representation labels Apr 11, 2020
@kvark
Copy link
Member

kvark commented Sep 19, 2020

Note that WebGPU group figured out to postpone use statement and imports until after MVP.
For now, the standard library is going to be in the root scope.

@teoxoy
Copy link
Member

teoxoy commented Sep 25, 2023

Closing as outdated. It might be worth writing out the "GLSL.std.450" extension lazily though. Opened gfx-rs/wgpu#4504.

@teoxoy teoxoy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: middle Intermediate representation kind: feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants