Skip to content
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] Move TypeStore into ShaderModule #11005

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented Mar 3, 2023

22e67bc

[WGSL] Move TypeStore into ShaderModule
https://bugs.webkit.org/show_bug.cgi?id=253321
<rdar://problem/106197218>

Reviewed by Myles C. Maxfield.

In order to store types in the AST, since they'll outlive the TypeChecker,
we need to keep them alive for at least as long as the AST. In order to do
that, we move the TypeStore into WGSL::ShaderModule, which also holds the
AST.

* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::TemplateTypes::includes):
(WGSL::TemplateTypes::appendNameTo):
(WGSL::Parser<Lexer>::consumeTypes):
(WGSL::Types::includes): Deleted.
(WGSL::Types::appendNameTo): Deleted.
(WGSL::Types<TT>::includes): Deleted.
(WGSL::Types<TT>::appendNameTo): Deleted.
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::TypeChecker):
* Source/WebGPU/WGSL/TypeStore.h:
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::types):

Canonical link: https://commits.webkit.org/261259@main

8ee5f65

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug ❌ πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@tadeuzagallo tadeuzagallo self-assigned this Mar 3, 2023
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label Mar 3, 2023
@tadeuzagallo tadeuzagallo added the merge-queue Applied to send a pull request to merge-queue label Mar 6, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 261259@main (22e67bc): https://commits.webkit.org/261259@main

Reviewed commits have been landed. Closing PR #11005 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 6, 2023
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/WGSL-Move-TypeStore-into-ShaderModule branch from 8ee5f65 to 22e67bc Compare March 6, 2023 09:14
@tadeuzagallo tadeuzagallo deleted the eng/WGSL-Move-TypeStore-into-ShaderModule branch May 17, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
5 participants