Mesa (master): llvmpipe: Add a negation test to lp_test_arit.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Feb 17 16:16:04 UTC 2012
Module: Mesa
Branch: master
Commit: fc79c4fbd415883d3558cabadbd55a305182d3d2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc79c4fbd415883d3558cabadbd55a305182d3d2
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Feb 17 15:57:54 2012 +0000
llvmpipe: Add a negation test to lp_test_arit.
---
src/gallium/drivers/llvmpipe/lp_test_arit.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c
index 0b74dee..8b23baa 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c
@@ -83,6 +83,12 @@ struct unary_test_t
};
+static float negf(float x)
+{
+ return -x;
+}
+
+
const float exp2_values[] = {
-60,
-4,
@@ -162,6 +168,7 @@ const float sincos_values[] = {
*/
static const struct unary_test_t unary_tests[] = {
+ {"neg", &lp_build_negate, &negf, exp2_values, Elements(exp2_values)},
{"exp2", &lp_build_exp2, &exp2f, exp2_values, Elements(exp2_values)},
{"log2", &lp_build_log2, &log2f, log2_values, Elements(log2_values)},
{"exp", &lp_build_exp, &expf, exp2_values, Elements(exp2_values)},
More information about the mesa-commit
mailing list