[webkit-changes] [WebKit/WebKit] 111fd1: [WGSL] Make ShaderModule a container instead of a ...
Tadeu Zagallo
noreply at github.com
Tue Feb 7 01:13:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 111fd139df0d29ce1036c22df9c2be48fb397d78
https://github.com/WebKit/WebKit/commit/111fd139df0d29ce1036c22df9c2be48fb397d78
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/AST.h
M Source/WebGPU/WGSL/AST/ASTForward.h
R Source/WebGPU/WGSL/AST/ASTShaderModule.h
M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
M Source/WebGPU/WGSL/AST/ASTStringDumper.h
M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
M Source/WebGPU/WGSL/AST/ASTVisitor.h
M Source/WebGPU/WGSL/CallGraph.cpp
M Source/WebGPU/WGSL/CallGraph.h
M Source/WebGPU/WGSL/EntryPointRewriter.cpp
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
M Source/WebGPU/WGSL/MangleNames.cpp
M Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp
M Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/Parser.h
M Source/WebGPU/WGSL/ParserPrivate.h
M Source/WebGPU/WGSL/PhaseTimer.h
M Source/WebGPU/WGSL/ResolveTypeReferences.cpp
M Source/WebGPU/WGSL/ResolveTypeReferences.h
A Source/WebGPU/WGSL/ShaderModule.h
M Source/WebGPU/WGSL/TypeCheck.cpp
M Source/WebGPU/WGSL/TypeCheck.h
M Source/WebGPU/WGSL/WGSL.cpp
M Source/WebGPU/WGSL/WGSL.h
M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
M Source/WebGPU/WebGPU/ShaderModule.h
M Source/WebGPU/WebGPU/ShaderModule.mm
M Tools/TestWebKitAPI/Tests/WGSL/ASTStringDumperTests.cpp
M Tools/TestWebKitAPI/Tests/WGSL/ConstLiteralTests.cpp
M Tools/TestWebKitAPI/Tests/WGSL/ParserTests.cpp
Log Message:
-----------
[WGSL] Make ShaderModule a container instead of a Node
https://bugs.webkit.org/show_bug.cgi?id=251790
rdar://105080434
Reviewed by Myles C. Maxfield.
Make ShaderModule a container that can be created outside of the parser. This is
helpful to hold metadata about the program (as well as the AST nodes) without
plumbing it all the way thorugh the parser.
* Source/WebGPU/WGSL/AST/AST.h:
* Source/WebGPU/WGSL/AST/ASTForward.h:
* Source/WebGPU/WGSL/AST/ASTShaderModule.h: Removed.
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
* Source/WebGPU/WGSL/AST/ASTVisitor.h:
* Source/WebGPU/WGSL/CallGraph.cpp:
(WGSL::CallGraph::CallGraph):
(WGSL::CallGraphBuilder::CallGraphBuilder):
(WGSL::buildCallGraph):
* Source/WebGPU/WGSL/CallGraph.h:
(WGSL::CallGraph::ast const):
* Source/WebGPU/WGSL/EntryPointRewriter.cpp:
(WGSL::EntryPointRewriter::EntryPointRewriter):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
* Source/WebGPU/WGSL/MangleNames.cpp:
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp:
(WGSL::Metal::generateMetalCode):
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::emitMetalFunctions):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h:
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::parse):
(WGSL::Parser<Lexer>::parseShader):
(WGSL::Parser<Lexer>::parseGlobalDecl):
(WGSL::parseLChar): Deleted.
(WGSL::parseUChar): Deleted.
* Source/WebGPU/WGSL/Parser.h:
* Source/WebGPU/WGSL/ParserPrivate.h:
(WGSL::Parser::Parser):
* Source/WebGPU/WGSL/PhaseTimer.h:
(WGSL::dumpASTIfNeeded):
(WGSL::dumpASTAfterParsingIfNeeded):
(WGSL::dumpASTBetweenEachPassIfNeeded):
(WGSL::dumpASTAtEndIfNeeded):
* Source/WebGPU/WGSL/ResolveTypeReferences.cpp:
(WGSL::resolveTypeReferences):
* Source/WebGPU/WGSL/ResolveTypeReferences.h:
* Source/WebGPU/WGSL/ShaderModule.h: Copied from Source/WebGPU/WGSL/CallGraph.h.
(WGSL::ShaderModule::ShaderModule):
(WGSL::ShaderModule::source const):
(WGSL::ShaderModule::configuration const):
(WGSL::ShaderModule::directives):
(WGSL::ShaderModule::functions):
(WGSL::ShaderModule::structures):
(WGSL::ShaderModule::variables):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::TypeChecker):
(WGSL::typeCheck):
* Source/WebGPU/WGSL/TypeCheck.h:
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::staticCheck):
(WGSL::SuccessfulCheck::SuccessfulCheck):
(WGSL::prepare):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/ShaderModule.h:
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::ShaderModule::ast const):
Canonical link: https://commits.webkit.org/259950@main
More information about the webkit-changes
mailing list