From f9da0740e22f27a6f8bd429f0bb768752b311398 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 6 Sep 2014 10:37:22 -0700 Subject: [PATCH] i965/fs_live_variables: Use var_from_vgrf insead of repeating the calculation Signed-off-by: Jason Ekstrand Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp index 79070c1..e5936e0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp @@ -56,7 +56,7 @@ void fs_live_variables::setup_one_read(bblock_t *block, fs_inst *inst, int ip, fs_reg reg) { - int var = var_from_vgrf[reg.reg] + reg.reg_offset; + int var = var_from_reg(®); assert(var < num_vars); /* In most cases, a register can be written over safely by the @@ -108,7 +108,7 @@ void fs_live_variables::setup_one_write(bblock_t *block, fs_inst *inst, int ip, fs_reg reg) { - int var = var_from_vgrf[reg.reg] + reg.reg_offset; + int var = var_from_reg(®); assert(var < num_vars); start[var] = MIN2(start[var], ip); -- 2.7.4