-
Notifications
You must be signed in to change notification settings - Fork 193
Conversation
75acc79
to
4e3e838
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
The way to test the backends here would be to add these function calls to tests/in/bits.wgsl
.
4e3e838
to
7506ddd
Compare
Ok, it seems that passing validation requires that all GLSL inputs can be written as valid WGSL. Unfortunately, WGSL doesn't yet have |
I agree about the naming, it would be nice to settle this in the group. |
Ok, at this point it seems that the main blocker is that WGSL's builtins for this functionality haven't been specified yet. What would be the right way to push that forward so this PR can be merged? |
If you want to use it now, we can land this with the expectation that we'll rename these methods once the group settles on them. |
9c37568
to
c67f291
Compare
39506a3
to
1550ba5
Compare
@fintelia there seem to be a small problem left on Metal? |
1550ba5
to
b9162e4
Compare
Ok, I think I managed to fix it. The issue was that there needed to be an unsigned integer -> signed integer cast, but to do that the vector width of the input needed to be known. I tried a bunch of ways to cause the type coercion to produce that without the generated code differing between them, but none ended up working. The current version checks the input width so it can insert a cast using one of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@fintelia would you be interested to update the naming according to gpuweb/gpuweb#2467 ? |
I probably wouldn't be able to get to it for a while. If anyone else wants to make the update they should go ahead! With the functions now fully specified in WGSL, someone should probably also make sure there's conformance tests for the various edge cases. I'm not fully confident that I understood the specs fully for each of the backends; testing on lots of platforms is the only way to be sure. |
Currently untested. I welcome feedback on whether this approach makes sense and how to go about adding tests.