From 87e732673598ef3fd08a3432c7975b421b14c8c4 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 18 Jan 2014 12:49:58 -0800 Subject: [PATCH] i965: Use get_element_ud to shorten texture header access. This is shorter, easier to read, and further from the 80 column limit. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner Reviewed-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index e701fc524d2..efccd924a04 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -550,8 +550,7 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src brw_MOV(p, header_reg, brw_vec8_grf(0, 0)); /* Then set the offset bits in DWord 2. */ - brw_MOV(p, retype(brw_vec1_reg(header_reg.file, - header_reg.nr, 2), BRW_REGISTER_TYPE_UD), + brw_MOV(p, get_element_ud(header_reg, 2), brw_imm_ud(inst->texture_offset)); brw_pop_insn_state(p); } else if (inst->header_present) { -- 2.30.2