Jim Blandy
Jim Blandy
Since WGSL floats do include infinities and positive and negative zero, I would argue that the domain of floating-point division should include positive and negative zero as divisors, since the...
Yes, I think this does need to be handled in the front end. In Naga IR, function calls are not expressions, they're statements. This is explained in the top-level comments...
Here's what Google's [Tint](https://dawn.googlesource.com/tint/) does with the example above: ``` struct tint_array_wrapper { float arr[4]; }; ... float access_array_inner(int i, thread tint_array_wrapper* const tint_symbol_3) { return (*(tint_symbol_3)).arr[i]; } fragment tint_symbol_2...
Yes, a test case would be good. I was trying to capture what was described as the problem in [matrix chat](https://matrix.to/#/!fjjkgHFcwtkREywzfk:matrix.org/$SgwrghAFSk01SK3WTWbOvMf9KxxnpF0OhZbrSxiad8c?via=matrix.org&via=mozilla.org&via=kng.re).
Oh, gpuweb/gpuweb#1803? That's related, but I think this is just a flat-out bug. If a front end uses `AccessIndex` on a dynamically-sized array, we're not doing the bounds checking *anywhere*...
Seems to have been introduced in 33701478. cc: @Frizi
To be clear, I 100% agree that it's a better developer experience to have this signaled at compile time, and that for uses outside the web the current behavior is...
Yes - I came across that and was really happy to see that you'd used `try_from`; so many people will just use `as` and not worry about the dropped bits.
The WGSL committee went back and forth on whether arrays and matrices should be allowed to be indexed by dynamically computed values, before ultimately (or at least, most recently) deciding...
Could we get a reduced version of the test case here? Here's the loop @cwfitzgerald called out at line 209: for (var i = 1; i < 5; i=i+1) {...