KalebDark / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Constant folding modulus is broken #916

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use "const int i = 12 % 3;" in a shader.

What is the expected output? What do you see instead?
Expected: The expression evaluates to 0.
Actual: The expression evaluates to 4.

Constant folding uses division instead of modulus to evaluate integer modulus 
statements.

Original issue reported on code.google.com by oetu...@nvidia.com on 13 Feb 2015 at 8:49

GoogleCodeExporter commented 9 years ago
This was fixed a while ago.

Original comment by oetu...@nvidia.com on 27 Feb 2015 at 2:13