llvmpipe: added some debug assertions, but disabled
authorBrian Paul <brianp@vmware.com>
Thu, 4 Nov 2010 23:52:49 +0000 (17:52 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 5 Nov 2010 00:21:45 +0000 (18:21 -0600)
src/gallium/drivers/llvmpipe/lp_setup_tri.c

index 11dfe63931294494d611c5039fb4ef27d014423e..bfb6bf277bd93f85fc432cafa292c516f8124809 100644 (file)
@@ -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)