Mesa (master): llvmpipe: added some debug assertions, but disabled

Brian Paul brianp at kemper.freedesktop.org
Thu Nov 4 17:22:22 PDT 2010


Module: Mesa
Branch: master
Commit: c8f1687ce70c3a2e0de7a7d50e1619cb4cf8cc50
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8f1687ce70c3a2e0de7a7d50e1619cb4cf8cc50

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Nov  4 17:52:49 2010 -0600

llvmpipe: added some debug assertions, but disabled

---

 src/gallium/drivers/llvmpipe/lp_setup_tri.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 11dfe63..bfb6bf2 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -815,6 +815,16 @@ static void triangle_both( struct lp_setup_context *setup,
 {
    float area = calc_area(v0, v1, v2);
 
+   if (0) {
+      assert(!util_is_inf_or_nan(v0[0][0]));
+      assert(!util_is_inf_or_nan(v0[0][1]));
+      assert(!util_is_inf_or_nan(v1[0][0]));
+      assert(!util_is_inf_or_nan(v1[0][1]));
+      assert(!util_is_inf_or_nan(v2[0][0]));
+      assert(!util_is_inf_or_nan(v2[0][1]));
+      assert(!util_is_inf_or_nan(area));
+   }
+
    if (area > 0.0f) 
       retry_triangle_ccw( setup, v0, v1, v2, setup->ccw_is_frontface );
    else if (area < 0.0f)



More information about the mesa-commit mailing list