[webkit-changes] [WebKit/WebKit] 9fdb10: [WGSL] Add support for atomic types

Tadeu Zagallo noreply at github.com
Wed Sep 27 04:09:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9fdb10ebb1ce6765e0d1dc4199ac5140edc4f434
      https://github.com/WebKit/WebKit/commit/9fdb10ebb1ce6765e0d1dc4199ac5140edc4f434
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M Source/WebGPU/WGSL/ConstantFunctions.h
    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/atomics.wgsl
    A Source/WebGPU/WGSL/tests/valid/atomics.wgsl

  Log Message:
  -----------
  [WGSL] Add support for atomic types
https://bugs.webkit.org/show_bug.cgi?id=262127
rdar://116064944

Reviewed by Mike Wyrzykowski.

Add support for atomic according to the spec[1].

[1]: https://www.w3.org/TR/WGSL/#atomic-types

* Source/WebGPU/WGSL/ConstantRewriter.cpp:
(WGSL::ConstantRewriter::materialize):
* Source/WebGPU/WGSL/Constraints.cpp:
(WGSL::concretize):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::bindingMemberForGlobal):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::TypeChecker):
* Source/WebGPU/WGSL/TypeStore.cpp:
(WGSL::TypeStore::TypeStore):
(WGSL::TypeStore::atomicType):
* Source/WebGPU/WGSL/TypeStore.h:
* 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/atomics.wgsl: Added.
* Source/WebGPU/WGSL/tests/valid/atomics.wgsl: Added.

Canonical link: https://commits.webkit.org/268504@main




More information about the webkit-changes mailing list