fix cos/sin range reduction for i915 driver too
authorRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 29 Jul 2007 17:44:55 +0000 (19:44 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 29 Jul 2007 17:44:55 +0000 (19:44 +0200)
src/mesa/drivers/dri/i915/i915_fragprog.c

index 702b878828243297170a84a800cca271dd4010cc..abca0bbffeae1459fe4c6d59ddcb6814dc7f96bf 100644 (file)
@@ -304,7 +304,7 @@ static void upload_program( struct i915_fragment_program *p )
                         A0_MUL,
                         tmp, A0_DEST_CHANNEL_X, 0,
                         src0, 
-                        i915_emit_const1f(p, 1.0/(M_PI * 2)),
+                        i915_emit_const1f(p, 1.0/(M_PI)),
                         0);
 
         i915_emit_arith( p, 
@@ -319,7 +319,7 @@ static void upload_program( struct i915_fragment_program *p )
                         A0_MUL,
                         tmp, A0_DEST_CHANNEL_X, 0,
                         tmp, 
-                        i915_emit_const1f(p, (M_PI * 2)),
+                        i915_emit_const1f(p, (M_PI)),
                         0);
 
         /* 
@@ -645,7 +645,7 @@ static void upload_program( struct i915_fragment_program *p )
                         A0_MUL,
                         tmp, A0_DEST_CHANNEL_X, 0,
                         src0, 
-                        i915_emit_const1f(p, 1.0/(M_PI * 2)),
+                        i915_emit_const1f(p, 1.0/(M_PI)),
                         0);
 
         i915_emit_arith( p, 
@@ -660,7 +660,7 @@ static void upload_program( struct i915_fragment_program *p )
                         A0_MUL,
                         tmp, A0_DEST_CHANNEL_X, 0,
                         tmp, 
-                        i915_emit_const1f(p, (M_PI * 2)),
+                        i915_emit_const1f(p, (M_PI)),
                         0);
 
         /*