mesa/main: use call_once instead of open-coding
[mesa.git] / src / mesa / swrast / s_tritemp.h
index fddbbfd99d628f6483e9b4463ebe99276ee1a2f4..4dc42a80a729a16594a89c1fb810870a731f6f51 100644 (file)
@@ -90,6 +90,7 @@
  * SUB_PIXEL_BITS.
  */
 
+#include "util/u_math.h"
 
 #ifndef MAX_GLUINT
 #define MAX_GLUINT     0xffffffffu
@@ -239,10 +240,10 @@ static void NAME(struct gl_context *ctx, const SWvertex *v0,
    {
       const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy;
 
-      if (IS_INF_OR_NAN(area) || area == 0.0F)
+      if (util_is_inf_or_nan(area) || area == 0.0F)
          return;
 
-      if (area * bf * swrast->_BackfaceCullSign < 0.0)
+      if (area * bf * swrast->_BackfaceCullSign < 0.0F)
          return;
 
       oneOverArea = 1.0F / area;