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] Allow early compilation without hints #9441
[WGSL] Allow early compilation without hints #9441
Conversation
EWS run on current version of this PR (hash 0a5dd89) |
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.
We should do this until we start failing tests because of it :)
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.
Aren't the hints necessary to generate code? If the goal is do something quickly so we can start implementing the compiler, it seems we should go the other direction and always defer compilation instead of never deferring compilation... That way we'll be able to emit correct bind group code.
I'm landing it for now to unblock the tests, as it's already how we're testing, but I'll prioritize moving the other direction. |
https://bugs.webkit.org/show_bug.cgi?id=251494 rdar://104908379 Reviewed by Myles C. Maxfield. This is just a temporary workaround so we can start passing some CTS tests. For now, since we are not yet using the layout hints, we can just try to compile upfront even without them. Later we'll wire this up correctly so that if no hints are provide the compilation is deferred. * Source/WebGPU/WebGPU/ShaderModule.mm: (WebGPU::Device::createShaderModule): Canonical link: https://commits.webkit.org/259747@main
0a5dd89
to
53a227e
Compare
Committed 259747@main (53a227e): https://commits.webkit.org/259747@main Reviewed commits have been landed. Closing PR #9441 and removing active labels. |
https://bugs.webkit.org/show_bug.cgi?id=251785 <rdar://problem/105075787> Reviewed by Myles C. Maxfield. In WebKit#9441 we allowed early compilation of shaders even when no hints were provided. That was a workaround to start passing some of the CTS tests and unblock testing the API. Now we remove that workaround and add the necessary functionality to defer the compilation until the pipeline creation if no hints were provided. * Source/WebGPU/WGSL/EntryPointRewriter.cpp: (WGSL::EntryPointRewriter::EntryPointRewriter): (WGSL::EntryPointRewriter::rewrite): (WGSL::EntryPointRewriter::takeEntryPointInformation): (WGSL::EntryPointRewriter::collectParameters): (WGSL::EntryPointRewriter::checkReturnType): (WGSL::EntryPointRewriter::appendBuiltins): (WGSL::rewriteEntryPoints): * Source/WebGPU/WGSL/EntryPointRewriter.h: * Source/WebGPU/WGSL/MangleNames.cpp: (WGSL::NameManglerVisitor::NameManglerVisitor): (WGSL::NameManglerVisitor::run): (WGSL::mangleNames): * Source/WebGPU/WGSL/MangleNames.h: * Source/WebGPU/WGSL/WGSL.cpp: (WGSL::prepareImpl): (WGSL::prepare): * Source/WebGPU/WGSL/WGSL.h: * Source/WebGPU/WebGPU/ShaderModule.mm: (WebGPU::Device::createShaderModule): Canonical link: https://commits.webkit.org/259954@main
53a227e
0a5dd89