[webkit-changes] [WebKit/WebKit] 41be2a: [WGSL] Add tests for all numeric built-in functions
Tadeu Zagallo
noreply at github.com
Tue Jan 2 07:09:15 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 41be2a9408ffa6f5d714751c104e68c669b1ec13
https://github.com/WebKit/WebKit/commit/41be2a9408ffa6f5d714751c104e68c669b1ec13
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2024-01-02 (Tue, 02 Jan 2024)
Changed paths:
M Source/WebGPU/WGSL/ConstantFunctions.h
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/TypeCheck.cpp
M Source/WebGPU/WGSL/WGSLShaderModule.h
M Source/WebGPU/WGSL/tests/valid/overload.wgsl
Log Message:
-----------
[WGSL] Add tests for all numeric built-in functions
https://bugs.webkit.org/show_bug.cgi?id=266931
rdar://120275730
Reviewed by Mike Wyrzykowski.
Make sure the tests for all numeric functions test all possible types,
but for constant and runtime functions. This required implementing the
missing `quantizeToF16` function and fixing a number of constant and
codegen functions.
* Source/WebGPU/WGSL/ConstantFunctions.h:
(WGSL::CONSTANT_FUNCTION):
(WGSL::TERNARY_OPERATION):
(WGSL::UNARY_OPERATION):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::emitNecessaryHelpers):
(WGSL::Metal::emitLength):
(WGSL::Metal::emitDegrees):
(WGSL::Metal::emitQuantizeToF16):
(WGSL::Metal::emitRadians):
(WGSL::Metal::FunctionDefinitionWriter::visit):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::usesDot const):
(WGSL::ShaderModule::setUsesDot):
(WGSL::ShaderModule::usesFirstLeadingBit const):
(WGSL::ShaderModule::setUsesFirstLeadingBit):
(WGSL::ShaderModule::usesFirstTrailingBit const):
(WGSL::ShaderModule::setUsesFirstTrailingBit):
(WGSL::ShaderModule::usesSign const):
(WGSL::ShaderModule::setUsesSign):
* Source/WebGPU/WGSL/tests/valid/overload.wgsl:
Canonical link: https://commits.webkit.org/272568@main
More information about the webkit-changes
mailing list