nir: Remove the const_offset from nir_tex_instr
When NIR was originally drafted, there was no easy way to determine if something was constant or not. The result was that we had lots of special-casing for constant values such as this. Now that load_const instructions are SSA-only, it's really easy to find constants and this isn't really needed anymore. Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Rob Clark <robclark@gmail.com>
This commit is contained in:
@@ -637,20 +637,6 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
|
||||
fprintf(fp, ", ");
|
||||
}
|
||||
|
||||
bool has_nonzero_offset = false;
|
||||
for (unsigned i = 0; i < 4; i++) {
|
||||
if (instr->const_offset[i] != 0) {
|
||||
has_nonzero_offset = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_nonzero_offset) {
|
||||
fprintf(fp, "[%i %i %i %i] (offset), ",
|
||||
instr->const_offset[0], instr->const_offset[1],
|
||||
instr->const_offset[2], instr->const_offset[3]);
|
||||
}
|
||||
|
||||
if (instr->op == nir_texop_tg4) {
|
||||
fprintf(fp, "%u (gather_component), ", instr->component);
|
||||
}
|
||||
|
Reference in New Issue
Block a user