You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[wgsl] Builtins/intrinsics are unnecessarily part of the WGSL grammar #616
For the initial proposal, we tried to use regular operators like + and * that map directly to SPIR-V (maybe type-dependently, e.g. int vs. float).
The current list of 8 intrinsics are "core" SPIR-V instructions: they are in the main spec.
Other things that might reasonably modeled as WGSL intrinsics would be:
things that are currently in a SPIR-V extended instruction set (for GLSL.std.450); but we made them be explicitly imported, with a namespace. I'm happy with that choice.
depending on other conversations: disambiguation between signed and unsigned inequalities (e.g. < where the two operands are integers of differing signedness.)
Activity
kvark commentedon Mar 16, 2020
On the other hand, there are only 8 intrinsics at the moment, and they aren't about to change any time soon.
dneto0 commentedon Mar 23, 2020
I don't have a big stake in how they are modeled.
For the initial proposal, we tried to use regular operators like + and * that map directly to SPIR-V (maybe type-dependently, e.g. int vs. float).
The current list of 8 intrinsics are "core" SPIR-V instructions: they are in the main spec.
Other things that might reasonably modeled as WGSL intrinsics would be:
kdashg commentedon Mar 24, 2020
I prefer to map (typename T, U)
T < Utoless(T, U), for which we only have "overloads" forless(T, T).u32 < i32should probably be an error.grorg commentedon Mar 24, 2020
Discussed at the 2020-03-25 meeting
grorg commentedon Mar 24, 2020
Resolved: Intrinsics will be moved out of the grammar.
grorg commentedon Mar 24, 2020
@jdashg will open some new issues and PRs from this.
dj2 commentedon Jun 9, 2020
I believe this was fixed by #655. Closing.
Add memcpy helper (gpuweb#616)
Fix bugs introduced with memcpy (gpuweb#693)