WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
264272
[WGSL] Error opening
https://threejs.org/examples/?q=webgpu#webgpu_compute_texture_pingpong
https://bugs.webkit.org/show_bug.cgi?id=264272
Summary
[WGSL] Error opening https://threejs.org/examples/?q=webgpu#webgpu_compute_te...
Mike Wyrzykowski
Reported
2023-11-06 11:02:43 PST
[WGSL] Error opening
https://threejs.org/examples/?q=webgpu#webgpu_compute_texture_pingpong
__wgslDiv is missing a definition opening Generated Metal code: #include <metal_stdlib> #include <metal_types> using namespace metal; struct __ArgumentBufferT_0 { texture2d<float, access::sample> global1 [[id(0)]]; texture2d<float, access::write> global2 [[id(1)]]; }; vec<float, 4> function1(texture2d<float, access::sample> parameter1, vec<int, 2> parameter2) { vec<float, 4> local0 = vec<float, 4>(0., 0., 0., 0.); local0 += parameter1.read(uint2((parameter2 + vec<int, 2>(-1, 1))), 0); local0 += parameter1.read(uint2((parameter2 + vec<int, 2>(-1, -1))), 0); local0 += parameter1.read(uint2((parameter2 + vec<int, 2>(0, 0))), 0); local0 += parameter1.read(uint2((parameter2 + vec<int, 2>(1, -1))), 0); local0 += parameter1.read(uint2((parameter2 + vec<int, 2>(1, 1))), 0); return (local0 / 5.); } void function3(texture2d<float, access::sample> parameter5, texture2d<float, access::write> parameter6, unsigned parameter7) { unsigned local2 = (parameter7 % 512u); unsigned local3 = __wgslDiv(parameter7, 512u); vec<int, 2> local4 = vec<int, 2>(int(local2), int(local3)); vec<float, 3> local5 = function1(parameter5, local4).rgb; parameter6.write(vec<float, 4>((local5 * 1.0499999523162842), 1.), uint2(local4)); } [[kernel]] void function4(vec<unsigned, 3> parameter8 [[thread_position_in_grid]], constant __ArgumentBufferT_0& __ArgumentBuffer_0 [[buffer(0)]]) { unsigned global0 { }; texture2d<float, access::sample> global1 = __ArgumentBuffer_0.global1; texture2d<float, access::write> global2 = __ArgumentBuffer_0.global2; global0 = parameter8.x; function3(global1, global2, global0); } MSL compilation error: Error Domain=MTLLibraryErrorDomain Code=3 "program_source:25:23: error: use of undeclared identifier '__wgslDiv' unsigned local3 = __wgslDiv(parameter7, 512u); ^ " UserInfo={NSLocalizedDescription=program_source:25:23: error: use of undeclared identifier '__wgslDiv' unsigned local3 = __wgslDiv(parameter7, 512u); ^ }
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-11-06 11:03:05 PST
<
rdar://problem/118009042
>
Tadeu Zagallo
Comment 2
2023-11-07 07:27:08 PST
Pull request:
https://github.com/WebKit/WebKit/pull/20100
EWS
Comment 3
2023-11-07 09:15:38 PST
Committed
270328@main
(3944b4d13d3b): <
https://commits.webkit.org/270328@main
> Reviewed commits have been landed. Closing PR #20100 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug