i915g: Move definition of M_PI in i915_fpc_translate.c
authorJon TURNEY <jon.turney@dronecode.org.uk>
Wed, 29 Jun 2011 11:43:11 +0000 (12:43 +0100)
committerJon TURNEY <jon.turney@dronecode.org.uk>
Wed, 29 Jun 2011 13:29:26 +0000 (14:29 +0100)
Move defintion of M_PI (for the benefit of <math.h> which do not define it), to
before the first use of it

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/i915/i915_fpc_translate.c

index ab09d56ec77c20f7673b46d21bbfc596efc733b0..93fe453e9df24d0bd6bb92d0b26f0e1a5f862f37 100644 (file)
@@ -41,6 +41,9 @@
 
 #include "draw/draw_vertex.h"
 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
 
 /**
  * Simple pass-through fragment shader to use when we don't have
@@ -442,11 +445,6 @@ emit_simple_arith_swap2(struct i915_fp_compile *p,
    emit_simple_arith(p, &inst2, opcode, numArgs, fs);
 }
 
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
 /*
  * Translate TGSI instruction to i915 instruction.
  *