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] @group, @binding and @location should accept expressions #14470

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented May 30, 2023

b2ed50a

[WGSL] @group, @binding and @location should accept expressions
https://bugs.webkit.org/show_bug.cgi?id=257471
rdar://109995472

Reviewed by NOBODY (OOPS!).

Currently we are only parsing integer literals as arguments to these attributes,
but according to the grammar they should accept any const expressions.

* Source/WebGPU/WGSL/AST/ASTBindingAttribute.h:
* Source/WebGPU/WGSL/AST/ASTGroupAttribute.h:
* Source/WebGPU/WGSL/AST/ASTLocationAttribute.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::collectGlobals):
(WGSL::RewriteGlobalVariables::insertStructs):
(WGSL::RewriteGlobalVariables::insertParameters):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseAttribute):

b2ed50a

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
❌ πŸ§ͺ ios-wk2-wpt   πŸ§ͺ mac-wk1 loading πŸ§ͺ gtk-wk2
⏳ πŸ›  πŸ§ͺ jsc ❌ πŸ§ͺ api-ios   πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
  πŸ›  tv ❌ πŸ§ͺ mac-AS-debug-wk2
  πŸ›  tv-sim   πŸ§ͺ mac-wk2-stress
❌ πŸ›  watch
❌ πŸ›  watch-sim

https://bugs.webkit.org/show_bug.cgi?id=257471
rdar://109995472

Reviewed by NOBODY (OOPS!).

Currently we are only parsing integer literals as arguments to these attributes,
but according to the grammar they should accept any const expressions.

* Source/WebGPU/WGSL/AST/ASTBindingAttribute.h:
* Source/WebGPU/WGSL/AST/ASTGroupAttribute.h:
* Source/WebGPU/WGSL/AST/ASTLocationAttribute.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::collectGlobals):
(WGSL::RewriteGlobalVariables::insertStructs):
(WGSL::RewriteGlobalVariables::insertParameters):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseAttribute):
@tadeuzagallo tadeuzagallo self-assigned this May 30, 2023
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label May 30, 2023
@tadeuzagallo
Copy link
Member Author

Not sure what happened here that caused the pull request to be opened twice...

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merging-blocked Applied to prevent a change from being merged WebGPU For bugs in WebGPU
Projects
None yet
2 participants