[webkit-changes] [WebKit/WebKit] 9cfe9c: [WGSL] Add constant support for primitive structs

Tadeu Zagallo noreply at github.com
Thu Nov 9 01:30:35 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9cfe9c1080bc7b2b85e5197cdc1851d299b549dc
      https://github.com/WebKit/WebKit/commit/9cfe9c1080bc7b2b85e5197cdc1851d299b549dc
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-11-09 (Thu, 09 Nov 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
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/valid/overload.wgsl

  Log Message:
  -----------
  [WGSL] Add constant support for primitive structs
https://bugs.webkit.org/show_bug.cgi?id=264409
rdar://118118103

Reviewed by Mike Wyrzykowski.

This is necessary to compute operations that return structs during constant
evaluation (e.g. frexp).

* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::CONSTANT_FUNCTION):
* Source/WebGPU/WGSL/ConstantValue.cpp:
(WGSL::ConstantValue::dump const):
* Source/WebGPU/WGSL/ConstantValue.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::serializeConstant):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::convertValue):
* Source/WebGPU/WGSL/tests/valid/overload.wgsl:

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




More information about the webkit-changes mailing list