Mesa (gallium-0.2): cell: stub-out sin/ cos function bodies to avoid trashing caller's stack for now
Brian Paul
brianp at kemper.freedesktop.org
Sat Sep 27 00:00:26 UTC 2008
Module: Mesa
Branch: gallium-0.2
Commit: 55b65d3b42b8ba1ea1c5b5549b4629f3b20e7a97
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=55b65d3b42b8ba1ea1c5b5549b4629f3b20e7a97
Author: Brian Paul <brian.paul at tungstengraphics.com>
Date: Fri Sep 26 17:57:01 2008 -0600
cell: stub-out sin/cos function bodies to avoid trashing caller's stack for now
---
src/gallium/drivers/cell/spu/spu_funcs.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/cell/spu/spu_funcs.c b/src/gallium/drivers/cell/spu/spu_funcs.c
index d174956..b57ad3f 100644
--- a/src/gallium/drivers/cell/spu/spu_funcs.c
+++ b/src/gallium/drivers/cell/spu/spu_funcs.c
@@ -49,17 +49,27 @@
static vector float
spu_cos(vector float x)
{
+#if 0
static const float scale = 1.0 / (2.0 * M_PI);
x = x * spu_splats(scale); /* normalize */
return _cos8_v(x);
+#else
+ /* just pass-through to avoid trashing caller's stack */
+ return x;
+#endif
}
static vector float
spu_sin(vector float x)
{
+#if 0
static const float scale = 1.0 / (2.0 * M_PI);
x = x * spu_splats(scale); /* normalize */
return _sin8_v(x); /* 8-bit accuracy enough?? */
+#else
+ /* just pass-through to avoid trashing caller's stack */
+ return x;
+#endif
}
More information about the mesa-commit
mailing list