RESOLVED CONFIGURATION CHANGED 242297
Shader fails to link due to Metal internal error
https://bugs.webkit.org/show_bug.cgi?id=242297
Summary Shader fails to link due to Metal internal error
Pedro J. Estébanez
Reported 2022-07-03 11:46:03 PDT
Created attachment 460642 [details] Shader GLSL source code A shader that the Godot game engine generates, which compiles and links succesfully on every other platform supporting OpenGL ES 3 or WebGL 2, on Safari running on an iPhone fails to be linked, and the following is logged: [Error] Internal error compiling shader with Metal backend. [Error] Please submit this shader, or website as a bug to https://bugs.webkit.org
Attachments
Shader GLSL source code (18.64 KB, application/zip)
2022-07-03 11:46 PDT, Pedro J. Estébanez
no flags
Pedro J. Estébanez
Comment 1 2022-07-03 13:19:18 PDT
I've been able to isolate the code line that causes the error: float fog_far = fog_depth_end > 0.0 ? fog_depth_end : z_far; If that line is replaced by the equivalent if-else construct, it works.
Pedro J. Estébanez
Comment 2 2022-07-04 01:50:06 PDT
The aforementioned fix hasn't worked for some user, though.
Radar WebKit Bug Importer
Comment 3 2022-07-10 11:47:16 PDT
Kimmo Kinnunen
Comment 4 2022-08-01 00:20:03 PDT
Pedro J. Estébanez
Comment 5 2022-08-01 01:18:46 PDT
Happy to know this is being addressed. However, I wanted to stress that in my tests, even after replacing all the occurences of the ternary by their if-else equivalents, a new modality the issue happened: no errors reported neither at compile nor link, but the shader would still not render anything, as if there was a deeper internal issue that couldn't surface up to the user.
Kimmo Kinnunen
Comment 6 2022-08-01 03:51:22 PDT
Thanks. Similar observations are being discussed in bug 237658 but it's not yet clear if these are related.
Kimmo Kinnunen
Comment 7 2024-01-17 02:09:51 PST
This should now work. If not, please reopen and attach a runnable reproduction if only possible.
Note You need to log in before you can comment on or make changes to this bug.