[webkit-changes] [WebKit/WebKit] ca2ac1: [WGSL] Add support for pointer types
Tadeu Zagallo
noreply at github.com
Thu Sep 21 00:29:38 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ca2ac1200f9963da87fa7f437ef15c573464e04c
https://github.com/WebKit/WebKit/commit/ca2ac1200f9963da87fa7f437ef15c573464e04c
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-09-21 (Thu, 21 Sep 2023)
Changed paths:
M Source/WebGPU/WGSL/ConstantRewriter.cpp
M Source/WebGPU/WGSL/Constraints.cpp
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/TypeCheck.cpp
M Source/WebGPU/WGSL/TypeStore.cpp
M Source/WebGPU/WGSL/TypeStore.h
M Source/WebGPU/WGSL/Types.cpp
M Source/WebGPU/WGSL/Types.h
A Source/WebGPU/WGSL/tests/invalid/pointers.wgsl
A Source/WebGPU/WGSL/tests/valid/pointers.wgsl
Log Message:
-----------
[WGSL] Add support for pointer types
https://bugs.webkit.org/show_bug.cgi?id=261831
<rdar://problem/115794611>
Reviewed by Dan Glastonbury.
Add support for pointer types in the type system, which allows explicitly writing
types of the form `ptr<AddressSpace, T, AccessMode>`.
* Source/WebGPU/WGSL/ConstantRewriter.cpp:
(WGSL::ConstantRewriter::materialize):
* Source/WebGPU/WGSL/Constraints.cpp:
(WGSL::satisfies):
(WGSL::satisfyOrPromote):
(WGSL::concretize):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::bindingMemberForGlobal):
(WGSL::RewriteGlobalVariables::usesOverride):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::emitPackedVector):
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::TypeChecker):
(WGSL::TypeChecker::allocateTextureStorageConstructor):
(WGSL::TypeChecker::texelFormat):
(WGSL::TypeChecker::accessMode):
(WGSL::TypeChecker::addressSpace):
* Source/WebGPU/WGSL/TypeStore.cpp:
(WGSL::PointerKey::encode const):
(WGSL::TypeStore::TypeStore):
(WGSL::TypeStore::pointerType):
* Source/WebGPU/WGSL/TypeStore.h:
(WGSL::TypeStore::addressSpaceType const):
* Source/WebGPU/WGSL/Types.cpp:
(WGSL::Type::dump const):
(WGSL::Type::size const):
(WGSL::Type::alignment const):
* Source/WebGPU/WGSL/Types.h:
* Source/WebGPU/WGSL/tests/invalid/pointers.wgsl: Added.
* Source/WebGPU/WGSL/tests/valid/pointers.wgsl: Added.
Canonical link: https://commits.webkit.org/268238@main
More information about the webkit-changes
mailing list