fix range reduction for sin/cos in i915tex (#11609)
authorRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 29 Jul 2007 17:40:50 +0000 (19:40 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 29 Jul 2007 17:40:50 +0000 (19:40 +0200)
src/mesa/drivers/dri/i915tex/i915_context.h
src/mesa/drivers/dri/i915tex/i915_fragprog.c

index d2713e88f96a2f26aa212d7fd75ba616dd161db6..3a41d66c14802bbf807a9ba125990a2d3f5518ab 100644 (file)
@@ -308,12 +308,6 @@ extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis,
                                    void *sharedContextPrivate);
 
 
-/*======================================================================
- * i915_texprog.c
- */
-extern void i915ValidateTextureProgram(struct i915_context *i915);
-
-
 /*======================================================================
  * i915_debug.c
  */
index a4b22a0c32cf0d323d459f2c2514f01f5f16eb39..95ec50490a2396c26a55dddec5e1dcc2b80356cd 100644 (file)
@@ -320,7 +320,7 @@ upload_program(struct i915_fragment_program *p)
          i915_emit_arith(p,
                          A0_MUL,
                          tmp, A0_DEST_CHANNEL_X, 0,
-                         src0, i915_emit_const1f(p, 1.0 / (M_PI * 2)), 0);
+                         src0, i915_emit_const1f(p, 1.0 / (M_PI)), 0);
 
          i915_emit_arith(p, A0_MOD, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0);
 
@@ -329,7 +329,7 @@ upload_program(struct i915_fragment_program *p)
          i915_emit_arith(p,
                          A0_MUL,
                          tmp, A0_DEST_CHANNEL_X, 0,
-                         tmp, i915_emit_const1f(p, (M_PI * 2)), 0);
+                         tmp, i915_emit_const1f(p, (M_PI)), 0);
 
          /* 
           * t0.xy = MUL x.xx11, x.x1111  ; x^2, x, 1, 1
@@ -642,7 +642,7 @@ upload_program(struct i915_fragment_program *p)
          i915_emit_arith(p,
                          A0_MUL,
                          tmp, A0_DEST_CHANNEL_X, 0,
-                         src0, i915_emit_const1f(p, 1.0 / (M_PI * 2)), 0);
+                         src0, i915_emit_const1f(p, 1.0 / (M_PI)), 0);
 
          i915_emit_arith(p, A0_MOD, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0);
 
@@ -651,7 +651,7 @@ upload_program(struct i915_fragment_program *p)
          i915_emit_arith(p,
                          A0_MUL,
                          tmp, A0_DEST_CHANNEL_X, 0,
-                         tmp, i915_emit_const1f(p, (M_PI * 2)), 0);
+                         tmp, i915_emit_const1f(p, (M_PI)), 0);
 
          /* 
           * t0.xy = MUL x.xx11, x.x1111  ; x^2, x, 1, 1