[webkit-changes] [WebKit/WebKit] dd455e: [WGSL] Don't rewrite complex constants
Tadeu Zagallo
noreply at github.com
Wed May 31 02:00:03 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dd455ea08bb0f0467f73e9d8fa271b2bf5c65dba
https://github.com/WebKit/WebKit/commit/dd455ea08bb0f0467f73e9d8fa271b2bf5c65dba
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M Source/WebGPU/WGSL/ConstantRewriter.cpp
M Source/WebGPU/WGSL/tests/lit.cfg
A Source/WebGPU/WGSL/tests/valid/local-constant-vector.wgsl
Log Message:
-----------
[WGSL] Don't rewrite complex constants
https://bugs.webkit.org/show_bug.cgi?id=257486
rdar://110005210
Reviewed by Dan Glastonbury.
The original implementation assumed we would completely remove every constant
declaration, but upon further consideration, it doesn't seem like a great idea
to replace every reference to a constant with its value when the value is a
non-trivial value. i.e. it makes sense to replace literals, but probably not
with vectors, arrays, matrices and structs.
* Source/WebGPU/WGSL/ConstantRewriter.cpp:
(WGSL::ConstantRewriter::materialize):
* Source/WebGPU/WGSL/tests/lit.cfg:
* Source/WebGPU/WGSL/tests/valid/local-constant-vector.wgsl: Added.
Canonical link: https://commits.webkit.org/264723@main
More information about the webkit-changes
mailing list