diff options
author | Jason Ekstrand <[email protected]> | 2014-09-08 18:34:28 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-09-30 10:29:13 -0700 |
commit | ab7234c8520499fcfeed153e0aefeb6b43758d1f (patch) | |
tree | 045c1276c3c88c7bd844412c7ab1dcf63255a26a | |
parent | c24dd54f973d1a42b0e2cc81aa219bb58f7523d9 (diff) |
i965/fs: Use the var_from_vgrf helper function instead of doing it manually
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 8 |
1 files 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); } } } |