From: Jason Ekstrand Date: Sat, 6 Sep 2014 17:37:22 +0000 (-0700) Subject: i965/fs_live_variables: Use var_from_vgrf insead of repeating the calculation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9da0740e22f27a6f8bd429f0bb768752b311398;p=mesa.git i965/fs_live_variables: Use var_from_vgrf insead of repeating the calculation Signed-off-by: Jason Ekstrand Reviewed-by: Matt Turner --- 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 79070c1a878..e5936e023c6 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);