[Mesa-dev] [PATCH 01/15] ff_fragment_shader: Silence unused parameter warning in smear
Ian Romanick
idr at freedesktop.org
Thu Oct 23 09:35:16 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
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 at intel.com>
---
src/mesa/main/ff_fragment_shader.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 9bb706c..e31a145 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -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));
--
1.8.1.4
More information about the mesa-dev
mailing list