[webkit-changes] [WebKit/WebKit] 1a6362: [WGSL] Initial support for arrays of packed structs
Tadeu Zagallo
noreply at github.com
Wed Jun 14 01:35:55 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1a6362e1cd6b9e7d2cd503d5a6e75092541f1cd1
https://github.com/WebKit/WebKit/commit/1a6362e1cd6b9e7d2cd503d5a6e75092541f1cd1
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-06-14 (Wed, 14 Jun 2023)
Changed paths:
M Source/WebGPU/WGSL/AST/ASTStructure.h
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/WGSLShaderModule.h
M Source/WebGPU/WGSL/tests/valid/packing.wgsl
Log Message:
-----------
[WGSL] Initial support for arrays of packed structs
https://bugs.webkit.org/show_bug.cgi?id=258010
rdar://110698511
Reviewed by Mike Wyrzykowski.
Continue expanding the types supported to be used in resources, with the correct
packing to match the spec.
* Source/WebGPU/WGSL/AST/ASTStructure.h:
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::pack):
(WGSL::RewriteGlobalVariables::packingForType):
(WGSL::RewriteGlobalVariables::collectGlobals):
(WGSL::RewriteGlobalVariables::packResource):
(WGSL::RewriteGlobalVariables::packStructResource):
(WGSL::RewriteGlobalVariables::packArrayResource):
(WGSL::RewriteGlobalVariables::updateReference):
(WGSL::RewriteGlobalVariables::packStructType):
(WGSL::RewriteGlobalVariables::packResourceStruct): Deleted.
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::write):
(WGSL::Metal::FunctionDefinitionWriter::emitNecessaryHelpers):
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::usesPackArray const):
(WGSL::ShaderModule::setUsesPackArray):
(WGSL::ShaderModule::clearUsesPackArray):
(WGSL::ShaderModule::usesUnpackArray const):
(WGSL::ShaderModule::setUsesUnpackArray):
(WGSL::ShaderModule::clearUsesUnpackArray):
* Source/WebGPU/WGSL/tests/valid/packing.wgsl:
Canonical link: https://commits.webkit.org/265145@main
More information about the webkit-changes
mailing list