-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[WGSL] Textures and samplers shouldn't be references #11929
[WGSL] Textures and samplers shouldn't be references #11929
Conversation
EWS run on current version of this PR (hash c248a69) |
if (shouldBeReference) | ||
memberType = adoptRef(*new AST::ReferenceTypeName(span, WTFMove(memberType))); |
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 think this is the right design, but how confident are we that this actually works on all metal devices that we support? The output program would be something like
kernel void foo(texture2d<float> foo) {
...
texture2d<float> bar = foo;
...
}
I guess I should try to do the research to make sure this actually works everywhere.
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 like yes this is supposed to work everywhere.
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.
https://bugs.webkit.org/show_bug.cgi?id=254425 rdar://107188253 Reviewed by Myles C. Maxfield. When converting globals to argument buffers, most values become references, but that doesn't apply to textures and samplers. Add logic to check the type of the global instead of unconditionally converting it to a reference. * Source/WebGPU/WGSL/GlobalVariableRewriter.cpp: (WGSL::RewriteGlobalVariables::insertStructs): Canonical link: https://commits.webkit.org/262200@main
c248a69
to
889edf2
Compare
Committed 262200@main (889edf2): https://commits.webkit.org/262200@main Reviewed commits have been landed. Closing PR #11929 and removing active labels. |
889edf2
c248a69