shader-compiler-bugs icon indicating copy to clipboard operation
shader-compiler-bugs copied to clipboard

ANGLE gives error about possible divide by zero at the Direct3D level

Open afd opened this issue 8 years ago • 2 comments

This shader:

https://github.com/mc-imperial/shader-compiler-bugs/tree/master/angle/front-end/divide-by-zero

has a possible division by zero, if the conditional statement evaluates to true at runtime.

ANGLE rejects the shader, which is perhaps reasonable. However, rejection is at the Direct3D level, with an error message referring to a file called "C:\fakepath". If ANGLE is going to reject the shader it would seem better for this to be done at the GLSL level if possible.

This may be more of a "polishing" sort of bug, as the Direct3D-level error is at least easy enough to understand. Here is the error string, with Google Chrome Version 57.0.2987.110 (64-bit)

" Failed to link shader program. C:\fakepath(29,32-58): error X4010: Unsigned integer divide by zero C:\fakepath(29,32-58): error X4010: Unsigned integer divide by zero C:\fakepath(29,32-58): warning X3556: integer divides may be much slower, try us ing uints if possible.

Warning: D3D shader compilation failed with default flags. (ps_5_0) Retrying with skip validation C:\fakepath(29,32-58): error X4010: Unsigned integer divide by zero C:\fakepath(29,32-58): error X4010: Unsigned integer divide by zero C:\fakepath(29,32-58): warning X3556: integer divides may be much slower, try us ing uints if possible.

Warning: D3D shader compilation failed with skip validation flags. (ps_5_0) Retrying with skip optimization C:\fakepath(29,32-58): error X4010: Unsigned integer divide by zero C:\fakepath(29,32-58): warning X3556: integer divides may be much slower, try us ing uints if possible.

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

afd avatar Mar 21 '17 23:03 afd

Reported: https://bugs.chromium.org/p/angleproject/issues/detail?id=1948&can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Feature%20Owner%20Summary&groupby=&sort=

afd avatar Mar 24 '17 13:03 afd

Treating as "confirmed" due to the nature of an associated comment on the report.

afd avatar Jul 19 '17 13:07 afd