From ab7234c8520499fcfeed153e0aefeb6b43758d1f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 8 Sep 2014 18:34:28 -0700 Subject: [PATCH] i965/fs: Use the var_from_vgrf helper function instead of doing it manually Signed-off-by: Jason Ekstrand Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp index 0d26103cc66..7838775dd17 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp @@ -78,19 +78,19 @@ fs_visitor::dead_code_eliminate() if (inst->dst.file == GRF) { if (!inst->is_partial_write()) { - int var = live_intervals->var_from_vgrf[inst->dst.reg]; + int var = live_intervals->var_from_reg(&inst->dst); for (int i = 0; i < inst->regs_written; i++) { - BITSET_CLEAR(live, var + inst->dst.reg_offset + i); + BITSET_CLEAR(live, var + i); } } } for (int i = 0; i < inst->sources; i++) { if (inst->src[i].file == GRF) { - int var = live_intervals->var_from_vgrf[inst->src[i].reg]; + int var = live_intervals->var_from_reg(&inst->src[i]); for (int j = 0; j < inst->regs_read(this, i); j++) { - BITSET_SET(live, var + inst->src[i].reg_offset + j); + BITSET_SET(live, var + j); } } } -- 2.30.2