[webkit-changes] [WebKit/WebKit] 534b9d: [WGSL] Initial support for constant functions

Tadeu Zagallo noreply at github.com
Tue May 30 07:39:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 534b9d0f0424e56a20dc1feba53f293e2a243b33
      https://github.com/WebKit/WebKit/commit/534b9d0f0424e56a20dc1feba53f293e2a243b33
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    A Source/WebGPU/WGSL/ConstantFunctions.h
    M Source/WebGPU/WGSL/ConstantRewriter.cpp
    A Source/WebGPU/WGSL/ConstantValue.cpp
    A Source/WebGPU/WGSL/ConstantValue.h
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [WGSL] Initial support for constant functions
https://bugs.webkit.org/show_bug.cgi?id=257461
rdar://109975915

Reviewed by Myles C. Maxfield.

Set up the necessary boiler plate to invoke constant functions as part of the
ConstantRewriter phase and implement the first function (pow).

* Source/WebGPU/WGSL/ConstantFunctions.h: Added.
(WGSL::constantPow):
* Source/WebGPU/WGSL/ConstantRewriter.cpp:
(WGSL::ConstantRewriter::ConstantRewriter):
(WGSL::ConstantRewriter::evaluate):
(WGSL::ConstantArray::ConstantArray): Deleted.
(WGSL::ConstantVector::ConstantVector): Deleted.
(WGSL::ConstantValue::ConstantValue): Deleted.
(WGSL::ConstantValue::dump const): Deleted.
* Source/WebGPU/WGSL/ConstantValue.cpp: Added.
(WGSL::ConstantValue::dump const):
* Source/WebGPU/WGSL/ConstantValue.h: Added.
(WGSL::ConstantArray::ConstantArray):
(WGSL::ConstantVector::ConstantVector):
(WGSL::ConstantValue::ConstantValue):
(WGSL::ConstantValue::constructDeletedValue):
(WGSL::ConstantValue::isDeletedValue):
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

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




More information about the webkit-changes mailing list