projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746b602
)
gallivm: Add a note about SSE4.1's nearest mode rounding.
author
José Fonseca
<jfonseca@vmware.com>
Mon, 18 Oct 2010 16:32:35 +0000
(09:32 -0700)
committer
José Fonseca
<jfonseca@vmware.com>
Mon, 18 Oct 2010 16:32:35 +0000
(09:32 -0700)
src/gallium/auxiliary/gallivm/lp_bld_arit.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 00f419a486db1f7bfa87d007e82a680bc5340d05..f9a12a41a1b6c4d669a4305d106506594c610a14 100644
(file)
--- a/
src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/
src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@
-983,6
+983,12
@@
enum lp_build_round_sse41_mode
};
+/**
+ * Helper for SSE4.1's ROUNDxx instructions.
+ *
+ * NOTE: In the SSE4.1's nearest mode, if two values are equally close, the
+ * result is the even value. That is, rounding 2.5 will be 2.0, and not 3.0.
+ */
static INLINE LLVMValueRef
lp_build_round_sse41(struct lp_build_context *bld,
LLVMValueRef a,