Mesa (master): gallivm: fix trunc/itrunc comment
Roland Scheidegger
sroland at kemper.freedesktop.org
Fri Oct 8 22:37:05 UTC 2010
Module: Mesa
Branch: master
Commit: 0ed8c56bfe4ff5e3d451ec4791ee2cd64fb3daf2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ed8c56bfe4ff5e3d451ec4791ee2cd64fb3daf2
Author: Roland Scheidegger <sroland at vmware.com>
Date: Fri Oct 8 18:31:38 2010 +0200
gallivm: fix trunc/itrunc comment
trunc of -1.5 is -1.0 not 1.0...
---
src/gallium/auxiliary/gallivm/lp_bld_arit.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 64c468c..4f108f6 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -1054,9 +1054,9 @@ lp_build_round_sse41(struct lp_build_context *bld,
/**
- * Return the integer part of a float (vector) value. The returned value is
- * a float (vector).
- * Ex: trunc(-1.5) = 1.0
+ * Return the integer part of a float (vector) value (== round toward zero).
+ * The returned value is a float (vector).
+ * Ex: trunc(-1.5) = -1.0
*/
LLVMValueRef
lp_build_trunc(struct lp_build_context *bld,
@@ -1181,9 +1181,9 @@ lp_build_fract(struct lp_build_context *bld,
/**
- * Return the integer part of a float (vector) value. The returned value is
- * an integer (vector).
- * Ex: itrunc(-1.5) = 1
+ * Return the integer part of a float (vector) value (== round toward zero).
+ * The returned value is an integer (vector).
+ * Ex: itrunc(-1.5) = -1
*/
LLVMValueRef
lp_build_itrunc(struct lp_build_context *bld,
More information about the mesa-commit
mailing list