[webkit-changes] [WebKit/WebKit] d041f3: [WGSL] Add support for constant matrices

Tadeu Zagallo noreply at github.com
Tue Oct 24 16:44:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d041f3c6a9a1e1d9df8401b0469d24a97e3be6e8
      https://github.com/WebKit/WebKit/commit/d041f3c6a9a1e1d9df8401b0469d24a97e3be6e8
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-10-24 (Tue, 24 Oct 2023)

  Changed paths:
    M Source/WebGPU/WGSL/ConstantFunctions.h
    M Source/WebGPU/WGSL/ConstantValue.cpp
    M Source/WebGPU/WGSL/ConstantValue.h
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    A Source/WebGPU/WGSL/tests/valid/constant-matrix.wgsl

  Log Message:
  -----------
  [WGSL] Add support for constant matrices
https://bugs.webkit.org/show_bug.cgi?id=263555
rdar://117371722

Reviewed by Mike Wyrzykowski.

Implement ConstantMatrix as one of the variants in ConstantValue and implement
all the constant functions that depend on it.

* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::zeroValue):
(WGSL::constantMatrix):
(WGSL::constantAdd):
(WGSL::constantMultiply):
(WGSL::constantDeterminant):
(WGSL::constantTranspose):
* Source/WebGPU/WGSL/ConstantValue.cpp:
(WGSL::ConstantValue::dump const):
* Source/WebGPU/WGSL/ConstantValue.h:
(WGSL::ConstantMatrix::ConstantMatrix):
(WGSL::ConstantValue::isMatrix const):
(WGSL::ConstantValue::toVector const):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::serializeConstant):
* Source/WebGPU/WGSL/tests/valid/constant-matrix.wgsl: Added.

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




More information about the webkit-changes mailing list