ff_fragment_shader: Silence unused parameter warning in smear
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 23 Oct 2014 16:20:26 +0000 (09:20 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 25 Oct 2014 02:54:38 +0000 (19:54 -0700)
Just remove the parameter.  Silences:

../../src/mesa/main/ff_fragment_shader.cpp:668:1: warning: unused parameter 'p' [-Wunused-parameter]

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/ff_fragment_shader.cpp

index 9bb706cc54906b6e1bb12d047ab3949d30881852..e31a14516c42526afc9c96c9e185a657baf36bf8 100644 (file)
@@ -665,7 +665,7 @@ static GLboolean args_match( const struct state_key *key, GLuint unit )
 }
 
 static ir_rvalue *
-smear(texenv_fragment_program *p, ir_rvalue *val)
+smear(ir_rvalue *val)
 {
    if (!val->type->is_scalar())
       return val;
@@ -722,7 +722,7 @@ emit_combine(texenv_fragment_program *p,
       tmp1 = mul(src[1], new(p->mem_ctx) ir_constant(2.0f));
       tmp1 = add(tmp1, new(p->mem_ctx) ir_constant(-1.0f));
 
-      return dot(swizzle_xyz(smear(p, tmp0)), swizzle_xyz(smear(p, tmp1)));
+      return dot(swizzle_xyz(smear(tmp0)), swizzle_xyz(smear(tmp1)));
    }
    case MODE_MODULATE_ADD_ATI:
       return add(mul(src[0], src[2]), src[1]);
@@ -804,7 +804,7 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
                         key->unit[unit].NumArgsRGB,
                         key->unit[unit].ModeRGB,
                         key->unit[unit].OptRGB);
-      val = smear(p, val);
+      val = smear(val);
       if (rgb_saturate)
         val = saturate(val);
 
@@ -816,7 +816,7 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
                                    key->unit[unit].NumArgsRGB,
                                    key->unit[unit].ModeRGB,
                                    key->unit[unit].OptRGB);
-      val = smear(p, val);
+      val = smear(val);
       if (rgb_saturate)
         val = saturate(val);
       p->emit(assign(temp_var, val));
@@ -829,7 +829,7 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
                         key->unit[unit].NumArgsRGB,
                         key->unit[unit].ModeRGB,
                         key->unit[unit].OptRGB);
-      val = swizzle_xyz(smear(p, val));
+      val = swizzle_xyz(smear(val));
       if (rgb_saturate)
         val = saturate(val);
       p->emit(assign(temp_var, val, WRITEMASK_XYZ));
@@ -838,7 +838,7 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
                         key->unit[unit].NumArgsA,
                         key->unit[unit].ModeA,
                         key->unit[unit].OptA);
-      val = swizzle_w(smear(p, val));
+      val = swizzle_w(smear(val));
       if (alpha_saturate)
         val = saturate(val);
       p->emit(assign(temp_var, val, WRITEMASK_W));