[webkit-changes] [WebKit/WebKit] 3bbb2b: [WGSL] shader, execution, expression, call, builtin, at...
Tadeu Zagallo
noreply at github.com
Tue Jan 16 05:17:03 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3bbb2b0bb5c6fdd080d522db1805c5d8d6f015af
https://github.com/WebKit/WebKit/commit/3bbb2b0bb5c6fdd080d522db1805c5d8d6f015af
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2024-01-16 (Tue, 16 Jan 2024)
Changed paths:
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/TypeStore.cpp
M Source/WebGPU/WGSL/TypeStore.h
Log Message:
-----------
[WGSL] shader,execution,expression,call,builtin,atomics,atomicCompareExchangeWeak:* is failing
https://bugs.webkit.org/show_bug.cgi?id=267551
rdar://121011135
Reviewed by Mike Wyrzykowski.
Fix a few problems in the atomicCompareExchange implementation to pass the CTS tests:
- The generated metal struct needs to take 2 template arguments. The second type is always
bool, but that is necessary due to the codegen of PrimitiveStructs.
- The __wgslAtomicCompareExchange macro was copying the original value before executing
the underlying atomic_compare_exchange metal function, which meant the wrong old_value
was returned when the comparison failed.
- There was a typo in TypeStore::atomicCompareExchangeResultType that set the kind of
the primitive struct to ModfResult, causing type errors.
- The TypeStore members used for caching the result structs (m_atomicCompareExchangeResultI32
and m_atomicCompareExchangeResultU32) were not initialized to nullptr, so the lazy
initialization could return the uninitialized value instead.
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::emitNecessaryHelpers):
* Source/WebGPU/WGSL/TypeStore.cpp:
(WGSL::TypeStore::atomicCompareExchangeResultType):
* Source/WebGPU/WGSL/TypeStore.h:
Canonical link: https://commits.webkit.org/273066@main
More information about the webkit-changes
mailing list