intel/fs: Rename a local variable so it doesn't shadow component()
v2 (Jason Ekstrand): - Break the refactor into its own patch Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:

committed by
Jason Ekstrand

parent
11c71f0e75
commit
4bfa2ac2ea
@@ -3372,15 +3372,15 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
|
|||||||
case nir_intrinsic_load_input: {
|
case nir_intrinsic_load_input: {
|
||||||
/* load_input is only used for flat inputs */
|
/* load_input is only used for flat inputs */
|
||||||
unsigned base = nir_intrinsic_base(instr);
|
unsigned base = nir_intrinsic_base(instr);
|
||||||
unsigned component = nir_intrinsic_component(instr);
|
unsigned comp = nir_intrinsic_component(instr);
|
||||||
unsigned num_components = instr->num_components;
|
unsigned num_components = instr->num_components;
|
||||||
enum brw_reg_type type = dest.type;
|
enum brw_reg_type type = dest.type;
|
||||||
|
|
||||||
/* Special case fields in the VUE header */
|
/* Special case fields in the VUE header */
|
||||||
if (base == VARYING_SLOT_LAYER)
|
if (base == VARYING_SLOT_LAYER)
|
||||||
component = 1;
|
comp = 1;
|
||||||
else if (base == VARYING_SLOT_VIEWPORT)
|
else if (base == VARYING_SLOT_VIEWPORT)
|
||||||
component = 2;
|
comp = 2;
|
||||||
|
|
||||||
if (nir_dest_bit_size(instr->dest) == 64) {
|
if (nir_dest_bit_size(instr->dest) == 64) {
|
||||||
/* const_index is in 32-bit type size units that could not be aligned
|
/* const_index is in 32-bit type size units that could not be aligned
|
||||||
@@ -3392,7 +3392,7 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned int i = 0; i < num_components; i++) {
|
for (unsigned int i = 0; i < num_components; i++) {
|
||||||
struct brw_reg interp = interp_reg(base, component + i);
|
struct brw_reg interp = interp_reg(base, comp + i);
|
||||||
interp = suboffset(interp, 3);
|
interp = suboffset(interp, 3);
|
||||||
bld.emit(FS_OPCODE_CINTERP, offset(retype(dest, type), bld, i),
|
bld.emit(FS_OPCODE_CINTERP, offset(retype(dest, type), bld, i),
|
||||||
retype(fs_reg(interp), type));
|
retype(fs_reg(interp), type));
|
||||||
|
Reference in New Issue
Block a user