https://bugs.winehq.org/show_bug.cgi?id=45127
--- Comment #5 from Matteo Bruni matteo.mystral@gmail.com --- Created attachment 61318 --> https://bugs.winehq.org/attachment.cgi?id=61318 Further fix
Eh, the issue was pretty obvious in hindsight. The attached patch fixes it for me.
After that I get a different error "Too many combined image uniforms, shader storage buffers and fragment outputs" triggered by a fragment shader writing to gl_FragDepth. It might be a Mesa bug but, on the other hand, we should probably do a better job with declaring fragment shader outputs. Anyway, that's a separate bug (which you can file here if it also applies to you).