Bug 302750

Summary: WGSL compilation: cannot use override value in constant expression
Product: WebKit Reporter: georgsh-yateam
Component: WebGPUAssignee: Tadeu Zagallo <tzagallo>
Status: RESOLVED FIXED    
Severity: Major CC: mwyrzykowski, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 26   
Hardware: Mac (Apple Silicon)   
OS: macOS 26   

georgsh-yateam
Reported 2025-11-18 17:24:37 PST
WGSL shader don't compiles on macos/safari when declared 2 same arrays. But it compiles on linux/chrome, android/chrome. Error message also strange, override keyword not present in wgsl source: ===== const PTK_HASHDATA = array<array<u32, 16>, 1>(array<u32, 16>(0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0)); const EAPOL_HASHDATA = array<array<u32, 16>, 1>(array<u32, 16>(0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0)); @group(0) @binding(0) var<storage, read> input: array<u32>; @group(0) @binding(1) var<storage, read_write> output: array<u32>; @compute @workgroup_size(64) fn main(@builtin(global_invocation_id) gid: vec3<u32>) { output[gid.x] = gid.x; } ===== Quick check: https://georg95.github.io/wgsl-safari-bug.html
Attachments
georgsh-yateam
Comment 1 2025-11-19 17:36:17 PST
So, actually issue is you can't declare 2-d const arrays. Can change to const to var<private>, but probably with performance penalty
Radar WebKit Bug Importer
Comment 2 2025-11-19 17:46:26 PST
Tadeu Zagallo
Comment 3 2026-01-20 01:59:54 PST
EWS
Comment 4 2026-01-22 09:31:04 PST
Committed 306020@main (4f07563c85a8): <https://commits.webkit.org/306020@main> Reviewed commits have been landed. Closing PR #56885 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.