Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7ba090e99148d4ffea4f8c4ceb7cbf0dd60a5f37 https://github.com/WebKit/WebKit/commit/7ba090e99148d4ffea4f8c4ceb7cbf0dd60a5f37 Author: Tadeu Zagallo <tzaga...@apple.com> Date: 2023-05-29 (Mon, 29 May 2023)
Changed paths: A Source/WebGPU/WGSL/ConstantRewriter.cpp A Source/WebGPU/WGSL/ConstantRewriter.h M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp M Source/WebGPU/WGSL/WGSL.cpp A Source/WebGPU/WGSL/tests/valid/constants.wgsl M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj Log Message: ----------- [WGSL] Initial constant resolution implementation https://bugs.webkit.org/show_bug.cgi?id=257381 rdar://109888410 Reviewed by Mike Wyrzykowski. Add a simple constant resolution phase. For now, it can only handle literals, but it will be expanded soon to handle other types of data and expressions. * Source/WebGPU/WGSL/ConstantRewriter.cpp: Added. (WGSL::ConstantValue::dump const): (WGSL::ConstantRewriter::ConstantRewriter): (WGSL::ConstantRewriter::rewrite): (WGSL::ConstantRewriter::visit): (WGSL::ConstantRewriter::evaluate): (WGSL::ConstantRewriter::materialize): (WGSL::ConstantRewriter::error): (WGSL::rewriteConstants): * Source/WebGPU/WGSL/ConstantRewriter.h: Added. * Source/WebGPU/WGSL/GlobalVariableRewriter.cpp: (WGSL::RewriteGlobalVariables::determineUsedGlobals): * Source/WebGPU/WGSL/WGSL.cpp: (WGSL::staticCheck): * Source/WebGPU/WGSL/tests/valid/constants.wgsl: Added. * Source/WebGPU/WebGPU.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/264652@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes