sometimes fails with error: syntax error, unexpected PACKED_TOK, expecting ')' (Linux) or 'packed' : reserved word ERROR: 0:42: 'packed' : syntax error syntax error (Windows) on Open GL.
Repro steps
Use a variable packed in a WGSL shader and try to compile it using Open GL backend on a device where packed is a reserved keyword (I have no idea when packed is a keyword, it works for some people, for some doesn't).
Expected vs observed behavior
The shader should always work without syntax errors.
Description
The following fragment of a WGSL shader:
(Full shader: https://github.com/ruffle-rs/ruffle/blob/036839fb1f382852711e0c1e270fa3e69a3a540a/render/wgpu/shaders/filter/displacement_map.wgsl)
sometimes fails with
error: syntax error, unexpected PACKED_TOK, expecting ')'
(Linux) or'packed' : reserved word ERROR: 0:42: 'packed' : syntax error syntax error
(Windows) on Open GL.Repro steps
Use a variable
packed
in a WGSL shader and try to compile it using Open GL backend on a device wherepacked
is a reserved keyword (I have no idea whenpacked
is a keyword, it works for some people, for some doesn't).Expected vs observed behavior
The shader should always work without syntax errors.
Extra materials
Bugs reported for Ruffle with this issue: https://github.com/ruffle-rs/ruffle/issues/12844, https://github.com/ruffle-rs/ruffle/issues/16642.
A screenshot pasted at Ruffle's Discord:
My workaround that turned out to work:
Platform
I personally cannot reproduce it as Open GL does not work on my platform, but platform information is included in the issues referenced above.