[webkit-changes] [WebKit/WebKit] 08de81: [WGSL] Array length needs to divide size received ...
Tadeu Zagallo
noreply at github.com
Mon Oct 9 05:20:24 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 08de817474e2187a48ee5beb75ed2fd557cea10c
https://github.com/WebKit/WebKit/commit/08de817474e2187a48ee5beb75ed2fd557cea10c
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-10-09 (Mon, 09 Oct 2023)
Changed paths:
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
Log Message:
-----------
[WGSL] Array length needs to divide size received from the API
https://bugs.webkit.org/show_bug.cgi?id=262793
rdar://116583287
Reviewed by Mike Wyrzykowski.
For runtime-sized arrays, since the API doesn't know the type of the array element
(and consequently its size), it just passes the size of the buffer in bytes. The
generate code for `arrayLength(x)` must then include the division by the size of
the array's element type.
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::getPacking):
Canonical link: https://commits.webkit.org/269072@main
More information about the webkit-changes
mailing list