Bug 268242 - [WGSL] Generated metal source does not compile
Summary: [WGSL] Generated metal source does not compile
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tadeu Zagallo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-01-27 20:33 PST by Mike Wyrzykowski
Modified: 2024-01-30 07:28 PST (History)
1 user (show)

See Also:


Attachments
Attaching wgsl source (17.53 MB, text/plain)
2024-01-27 20:33 PST, Mike Wyrzykowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wyrzykowski 2024-01-27 20:33:54 PST
Created attachment 469579 [details]
Attaching wgsl source

See attached wgsl source, it fails to compile with the error:

program_source:692:29: error: no matching function for call to 'function20'
    vec<float, 4> local61 = function20((&local59), global7, global5, global8, global11, global6);

Looks like the call to function20 is:
   function20((&local59), global7, global5, global8, global11, global6)

but the declaration is:
   function20(thread int* parameter12, thread vec<int, 2>& global7, thread int& global8, thread vec<int, 4>& global5, const device type19& global11, thread vec<int, 4>& global6)

naively looking at the types, global5 and global8 are in the wrong positions in the list of arguments to the function call.
Comment 1 Radar WebKit Bug Importer 2024-01-27 20:34:17 PST
<rdar://problem/121764913>
Comment 2 Tadeu Zagallo 2024-01-29 09:11:32 PST
Pull request: https://github.com/WebKit/WebKit/pull/23427
Comment 3 EWS 2024-01-30 07:28:56 PST
Committed 273755@main (eee7c8b1e56e): <https://commits.webkit.org/273755@main>

Reviewed commits have been landed. Closing PR #23427 and removing active labels.