mesa/main: use call_once instead of open-coding
[mesa.git] / src / mesa / swrast / s_tritemp.h
index 3cd1b44b0e936538508f08f0bdf16b16221563b8..4dc42a80a729a16594a89c1fb810870a731f6f51 100644 (file)
@@ -90,6 +90,7 @@
  * SUB_PIXEL_BITS.
  */
 
+#include "util/u_math.h"
 
 #ifndef MAX_GLUINT
 #define MAX_GLUINT     0xffffffffu
@@ -156,7 +157,7 @@ static void NAME(struct gl_context *ctx, const SWvertex *v0,
 #endif
 
    /*
-   printf("%s()\n", __FUNCTION__);
+   printf("%s()\n", __func__);
    printf("  %g, %g, %g\n",
           v0->attrib[VARYING_SLOT_POS][0],
           v0->attrib[VARYING_SLOT_POS][1],
@@ -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;