diff options
author | Matt Turner <[email protected]> | 2015-02-24 10:41:52 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-02-25 08:44:49 -0800 |
commit | cb25087c7bd5f1ad2515647278b32d3f07803f77 (patch) | |
tree | e8433da923d052a2ac92cfb62082f20229166c93 /src/gbm/main/gbm.c | |
parent | 864340219ba5aa90a19eb1336459d78a9b02cd16 (diff) |
glsl: Rewrite and fix min/max to saturate optimization.
There were some bugs, and the code was really difficult to follow. We
would optimize
min(max(x, b), 1.0) into max(sat(x), b)
but not pay attention to the order of min/max and also do
max(min(x, b), 1.0) into max(sat(x), b)
Corrects four shaders from Champions of Regnum that do
min(max(x, 1), 10)
and corrects rendering of Mass Effect under VMware Workstation.
Cc: "10.4 10.5" <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89180
Reviewed-by: Abdiel Janulgue <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/gbm/main/gbm.c')
0 files changed, 0 insertions, 0 deletions