-
Notifications
You must be signed in to change notification settings - Fork 931
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
WGSL const-declarations #2994
Comments
Thanks for filing, hopefully this will clear up your confusion.
It appears to have been re-added after that. I believe this was a fairly recent addition, so we just don't support this yet (the naga issue is the right one).
In theory we're always targetting the latest spec, but it takes us time and effort to implement things, so we basically implement an arbitrary sub/superset of the spec. This isn't ideal, but that's the perils of targetting a moving specification.
wgpu on native will always use naga for all of it's shader related things (translation, validation, reflection). We don't specifically name naga in any of the errors as it's basically an internal implementation detail.
PRs accepted :)
The problem is, especially with the spec still changing, it'll be a non-trivial amount of work to keep taht overview up to date, and at the end of the day, wgsl will stabilize and this all won't be a problem again. |
Thank you for taking the time, that clears things uo somewhat.
I didnt link to a naga issue I could find, but github tracked me mentioning this issue in the naga issue I would suspect to be the relevant one.
I'll see if I can find one/ a few spots to out it in the documentation and create a PR until this evening:). Otherwise I'll probably get to this at the earliest on the weekend. |
2 questions came up:
|
I just edited the wiki, if that was not intended it would be a seperate issue. Otherwise, #3009 updated documentation, I could not find a mistake other than the style one I brought up there and upend another PR to fix, but thats also unconnected to this, so this issue can be closed. |
Just for reference, it seems this was the change in April (recent-ish?). |
I'm sorry to raise this issue here, but I've been at trying to understand this for over an hour and am tired and in the coming week unlikely to be able to spend much time on this, and I've yet to understand the whole picture to where I am certain to adress this to the correct entities, so I'll have to let you finalize triage on this.
When trying to define constants according to (my understanding of) the current spec (version specific link for future reference) I get an error:
during that >1h that I mentioned I stumbled upon a few issues that were using
const
syntax, which really confused me, but once I stumbled upon this I think this cleared up for me somewhat. I'm just not sure and somewhat confused, that, if this is the case, noone else reported this elsewhere I could find: It appears that the official wgsl spec is out-of date?While spending the time searching this, I stumbled upon a few other things I know I would wish to be there (this of course isn't a demand but just a statement of what I was looking for and could not find, and that I think would have been helpful):
thats actually all I can remember now.
Well, in any case, I would appreciate if you could confirm above conjecture and, that being the case, ideally forward it so that it eventually gets adressed in a way visible in the spec, or if I missed something explain it to me.
I would be willing to open an issue regarding the "overview what of wgsl wgpu implements currently" point in the coming days, otherwise feel free to open one yourself or of course to reject this request.
The text was updated successfully, but these errors were encountered: