-
Notifications
You must be signed in to change notification settings - Fork 193
Add support for vecN<i32>
and vecN<u32>
to dot()
function
#1689
Conversation
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.
This is looking good!
Just one more thing :)
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.
very nice!
I implemented the requested changes. On MSL and GLSL back I think I did a pretty good job so far. When refactoring the sum of components into a loop I incorporated the x as well, and therefore there will be an extra "+" sign at the beginning of the produced expression. Let me know if you like it or not. If not, I will move the product of x outside of the loop. On spv back, I tried my best to reduce repetition, but perhaps I wrote some "clever code" that is just "confusing and obscure" code for something that could have been done much easier. |
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.
Nice!
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.
One last thing!
This is because I wanted to highlight the fact that the correct id is used in the last sum of the integer dot product expression
since it could not fail, changed it to simply return `void`
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.
great!
Work-in-progress pull request to fix #1667
Right now I have only implemented this for glsl-out to get an early review.
By reading the discussion at gpuweb/gpuweb#2231 and the minutes in https://docs.google.com/document/d/1o3BrMEZnE3Yat95uLiY06opF2Hmcj5XGlQmBhTT-_dQ/edit# I understand that:
dot()
function will just workdot()
call into an arithmetic expression.