fix up radeon span functions using latest r200 code from Brian,
[mesa.git] / src / mesa / drivers / dri / i915 / i915_fragprog.c
index 150d9bd2c224574f89fa4754767fdb68db35f36a..77a72d61824eeb5efba2b265ba59a948c9dfbd68 100644 (file)
@@ -145,7 +145,11 @@ static GLuint src_vector( struct i915_fragment_program *p,
                 GET_SWZ(source->Swizzle, 3));
 
    if (source->NegateBase)
-      src = negate( src, 1,1,1,1 );
+      src = negate( src, 
+                   GET_BIT(source->NegateBase, 0),
+                   GET_BIT(source->NegateBase, 1),
+                   GET_BIT(source->NegateBase, 2),
+                   GET_BIT(source->NegateBase, 3));
 
    return src;
 }
@@ -788,7 +792,7 @@ static void check_wpos( struct i915_fragment_program *p )
    GLuint inputs = p->FragProg.InputsRead;
    GLint i;
 
-   p->wpos_tex = 0;
+   p->wpos_tex = -1;
 
    for (i = 0; i < p->ctx->Const.MaxTextureCoordUnits; i++) {
       if (inputs & FRAG_BIT_TEX(i))