Merge branch 'mesa_7_6_branch'
[mesa.git] / src / gallium / auxiliary / draw / draw_pipe_wide_line.c
index 29649f57879debbda8cc7669f92866af2eff72fa..f32cbef983d71aa70a2c9d9dcab0682cfe8d1bd5 100644 (file)
 /* Authors:  Keith Whitwell <keith@tungstengraphics.com>
  */
 
-#include "pipe/p_util.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_shader_tokens.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
 #include "draw_private.h"
 #include "draw_pipe.h"
 
@@ -73,8 +74,8 @@ static void wideline_line( struct draw_stage *stage,
    float *pos2 = v2->data[pos];
    float *pos3 = v3->data[pos];
 
-   const float dx = FABSF(pos0[0] - pos2[0]);
-   const float dy = FABSF(pos0[1] - pos2[1]);
+   const float dx = fabsf(pos0[0] - pos2[0]);
+   const float dy = fabsf(pos0[1] - pos2[1]);
 
    /* small tweak to meet GL specification */
    const float bias = 0.125f;
@@ -167,6 +168,7 @@ struct draw_stage *draw_wide_line_stage( struct draw_context *draw )
    draw_alloc_temp_verts( &wide->stage, 4 );
 
    wide->stage.draw = draw;
+   wide->stage.name = "wide-line";
    wide->stage.next = NULL;
    wide->stage.point = draw_pipe_passthrough_point;
    wide->stage.line = wideline_line;