diff options
author | Chad Versace <[email protected]> | 2011-02-14 13:22:39 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-02-15 15:46:12 -0800 |
commit | 62c8c773334c1b0cdd484997a4ccec8945713f8c (patch) | |
tree | 68b0571305f048a81baae296f26ecbbf65d0c20f /src/gallium/drivers/r300 | |
parent | f2e9981e43b26ca101b774ea6af1f00617098246 (diff) |
glsl: Reinstate constant-folding for division by zero
Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160
Commit e7c1f058d18f62aa4871aec623f994d7b68cb8c1 disabled constant-folding
when division-by-zero occured. This was a mistake, because the spec does
allow division by zero. (From section 5.9 of the GLSL 1.20 spec: Dividing
by zero does not cause an exception but does result in an unspecified
value.)
For floating-point division, the original pre-e7c1f05 behavior is
reinstated.
For integer division, constant-fold 1/0 to 0.
Diffstat (limited to 'src/gallium/drivers/r300')
0 files changed, 0 insertions, 0 deletions