Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fa0acee7fc7f2c005d578f926b125508f24f5caa
https://github.com/WebKit/WebKit/commit/fa0acee7fc7f2c005d578f926b125508f24f5caa
Author: Tadeu Zagallo <[email protected]>
Date: 2024-04-23 (Tue, 23 Apr 2024)
Changed paths:
A
LayoutTests/http/tests/webgpu/webgpu/shader/execution/expression/call/user/ptr_params-expected.txt
M Source/WebGPU/WGSL/CallGraph.cpp
M Source/WebGPU/WGSL/CallGraph.h
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
Log Message:
-----------
[WGSL] shader,execution,expression,call,user,ptr_params:* is failing
https://bugs.webkit.org/show_bug.cgi?id=273071
rdar://126865271
Reviewed by Mike Wyrzykowski.
The WGSL compiler rewrites calls to `arrayLength(ptr)` to use the length
injected
via the API, which is basically done by replacing it `ptr_length`. This simple
approach worked originally since pointers to runtime-sized arrays couldn't be
passed
to other functions, so we always knew syntactically which array we were
requesting
the length for. However, the spec was updated to support pointers to variables
in
the storage space in function parameters, which means that it's now possible to
read the array length of a function argument. This requires passing the the
length
alongside the array through the call sites anywhere the array length is read.
*
LayoutTests/http/tests/webgpu/webgpu/shader/execution/expression/call/user/ptr_params-expected.txt:
Added.
* Source/WebGPU/WGSL/CallGraph.cpp:
(WGSL::CallGraphBuilder::visit):
* Source/WebGPU/WGSL/CallGraph.h:
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::visitCallee):
(WGSL::RewriteGlobalVariables::visit):
(WGSL::RewriteGlobalVariables::getPacking):
(WGSL::RewriteGlobalVariables::getBase):
Canonical link: https://commits.webkit.org/277867@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes