diff options
author | Kenneth Graunke <[email protected]> | 2012-08-21 12:16:46 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-08-25 12:01:09 -0700 |
commit | 96a22f35830859c938901ecbb4817aa8e1a9dff9 (patch) | |
tree | 6af8a3b38d106069aef9d06486d90c870e8dbd44 /src/mesa | |
parent | 0ad2dce24aa0475e607e3c58b8aa50057412c6ef (diff) |
i965/vs: Rename "sampler" to "texunit" in texturing code.
The number we're passing around is actually the ID of the texture unit,
as opposed to the numerical value our of sampler uniforms. Calling it
"texunit" clarifies this slightly.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 61b10e946dd..c22ba6067cc 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -1833,7 +1833,7 @@ void vec4_visitor::visit(ir_texture *ir) { int sampler = _mesa_get_sampler_uniform_value(ir->sampler, prog, &vp->Base); - sampler = vp->Base.SamplerUnits[sampler]; + int texunit = vp->Base.SamplerUnits[sampler]; /* Should be lowered by do_lower_texture_projection */ assert(!ir->projector); @@ -1897,7 +1897,7 @@ vec4_visitor::visit(ir_texture *ir) inst->header_present = ir->offset || intel->gen < 5; inst->base_mrf = 2; inst->mlen = inst->header_present + 1; /* always at least one */ - inst->sampler = sampler; + inst->sampler = texunit; inst->dst = dst_reg(this, ir->type); inst->shadow_compare = ir->shadow_comparitor != NULL; @@ -1999,15 +1999,15 @@ vec4_visitor::visit(ir_texture *ir) emit(inst); - swizzle_result(ir, src_reg(inst->dst), sampler); + swizzle_result(ir, src_reg(inst->dst), texunit); } void -vec4_visitor::swizzle_result(ir_texture *ir, src_reg orig_val, int sampler) +vec4_visitor::swizzle_result(ir_texture *ir, src_reg orig_val, int texunit) { this->result = orig_val; - int s = c->key.tex.swizzles[sampler]; + int s = c->key.tex.swizzles[texunit]; if (ir->op == ir_txs || ir->type == glsl_type::float_type || s == SWIZZLE_NOOP) |