[webkit-changes] [WebKit/WebKit] 06f047: [WGSL] Start implementing the codegen
Tadeu Zagallo
noreply at github.com
Thu Jan 19 00:21:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 06f047e2888cd627f37a1f74ade3447292e54021
https://github.com/WebKit/WebKit/commit/06f047e2888cd627f37a1f74ade3447292e54021
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-01-19 (Thu, 19 Jan 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
M Source/WebGPU/WGSL/AST/ASTVisitor.h
A Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp
A Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h
A Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
A Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/WGSL.cpp
M Source/WebGPU/WGSL/WGSL.h
M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
M Source/WebGPU/WebGPU/ComputePipeline.mm
M Source/WebGPU/WebGPU/ShaderModule.h
M Source/WebGPU/WebGPU/ShaderModule.mm
M Websites/webkit.org/demos/webgpu/scripts/hello-triangle.js
Log Message:
-----------
[WGSL] Start implementing the codegen
https://bugs.webkit.org/show_bug.cgi?id=250555
<rdar://problem/104217343>
Reviewed by Myles C. Maxfield.
A initial naive codegen implementation, just enough to show the red triangle on the screen.
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp: Added.
(WGSL::Metal::metalCodePrologue):
(WGSL::Metal::dumpMetalCodeIfNeeded):
(WGSL::Metal::generateMetalCode):
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h: Added.
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp: Added.
(WGSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::emitMetalFunctions):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h: Added.
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseStructMember):
(WGSL::Parser<Lexer>::parseFunctionDecl):
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::prepare):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/ComputePipeline.mm:
(WebGPU::createLibrary):
(WebGPU::Device::createComputePipeline):
* Source/WebGPU/WebGPU/ShaderModule.h:
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::ShaderModule::ast const):
* Websites/webkit.org/demos/webgpu/scripts/hello-triangle.js:
(async helloTriangle):
Canonical link: https://commits.webkit.org/259070@main
More information about the webkit-changes
mailing list