mc-imperial / shader-compiler-bugs

A collection of shader compiler bugs.
MIT License
49 stars 9 forks source link

ANGLE gives hard-to-understand error about control paths #64

Open afd opened 7 years ago

afd commented 7 years ago

When applied to this shader:

https://github.com/mc-imperial/shader-compiler-bugs/blob/master/angle/front-end/control-paths/shader.frag

ANGLE in Google Chrome Version 57.0.2987.110 (64-bit) gives the following error:

" Failed to link shader program. C:\fakepath(33,29-64): error X3507: '_map': Not all control paths return a value

Warning: D3D shader compilation failed with default flags. (ps_5_0) Retrying with skip validation C:\fakepath(33,29-64): error X3507: '_webgl_3543ec1d70156653': Not all control p aths return a value

Warning: D3D shader compilation failed with skip validation flags. (ps_5_0) Retrying with skip optimization C:\fakepath(33,29-64): error X3507: '_webgl_3543ec1d70156653': Not all control p aths return a value

Warning: D3D shader compilation failed with skip optimization flags. (ps_5_0) Failed to create D3D shaders. "

Simplifying the shader further makes the error disappear.

afd commented 7 years ago

Reported to ANGLE here:

https://bugs.chromium.org/p/angleproject/issues/detail?id=1946