aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-08-15 19:26:39 +0200
committerRoland Scheidegger <[email protected]>2013-08-15 19:26:39 +0200
commit6ca18e06aecd041e94c2cec5dcf15721c9c0a94d (patch)
treeda5bd8e3e09a4181cdb3ca2dffb1ba78a07a3713 /src/gallium/auxiliary
parent5626a84a002cb8565b527ebc1fca73a8497019db (diff)
gallivm: revert accidentally commited hunk
That magic wasn't meant to be commited, need to work on some proper fix.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_arit.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index ee30a02d78c..98409c3be86 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -1411,19 +1411,8 @@ lp_build_clamp(struct lp_build_context *bld,
assert(lp_check_value(bld->type, min));
assert(lp_check_value(bld->type, max));
- /*
- * XXX dark magic warning: The order of min/max here matters (!).
- * The reason is a typical use case is clamp(a, 0.0, 1.0)
- * (for example for float->unorm conversion) and on x86 sse2
- * this will give 0.0 for NaNs, whereas doing min first will
- * give 1.0 for NaN which makes d3d10 angry...
- * This is very much not guaranteed behavior though which just
- * happens to work x86 sse2 (and up), and obviously won't do anything
- * for other non-zero clamps (say -1.0/1.0 in a SNORM conversion) neither,
- * so need to fix this for real...
- */
- a = lp_build_max(bld, a, min);
a = lp_build_min(bld, a, max);
+ a = lp_build_max(bld, a, min);
return a;
}