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
[webgpu] Use i32 as coords type in WGSL #5628
Conversation
2fbd478
to
4b8d5be
Compare
@qjia7 @haoyunfeix @xhcao @gyagp PTAL A comment, we can use
Then use getXXXAtOutCoordsByGlobalId(globalId , index) to get data. As to the option 1, it will save a vec3 in each program. As to the option 2, it will save some code changes. Current 1 is applied. |
cd0bbab
to
d2c56ff
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.
I vote keeping globalId
, localId
's type as function parameter types. And do the corresponding cast as needed. And for others, we all unify to use i32
instead of u32
expect for dispatchSize
. DispatchSize or numWorkGroups
is similarly like globalId
, localId
which is u32 instead i32.
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.
Looks better, thanks. LGTM with two nits.
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 for the refactor, looks great!
Reviewable status: complete! 2 of 1 approvals obtained (waiting on @axinging and @pyu10055)
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is