diff options
author | Eric Anholt <eric@anholt.net> | 2010-11-19 13:53:28 +0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-11-19 17:42:06 -0800 |
commit | 61126278a39fbff9a66aff9ecc37893e87950091 (patch) | |
tree | 9ef1f2be3b3bfaaa0d6157fa6ffbb717e5888229 /src/mesa/drivers/dri | |
parent | 6b1d7dd781d77705be0270be32124dceab2053b6 (diff) |
i965: Fix compute_to_mrf to not move a MRF write up into another live range.
Fixes glsl-fs-copy-propagation-texcoords-1.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 610b7e3c3e..f202385e8f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2975,15 +2975,13 @@ fs_visitor::compute_to_mrf() } if (scan_inst->mlen > 0) { - /* Found a SEND instruction, which will do some amount of - * implied write that may overwrite our MRF that we were - * hoping to compute-to-MRF somewhere above it. Nothing - * we have implied-writes more than 2 MRFs from base_mrf, - * though. + /* Found a SEND instruction, which means that there are + * live values in MRFs from base_mrf to base_mrf + + * scan_inst->mlen - 1. Don't go pushing our MRF write up + * above it. */ - int implied_write_len = MIN2(scan_inst->mlen, 2); if (inst->dst.hw_reg >= scan_inst->base_mrf && - inst->dst.hw_reg < scan_inst->base_mrf + implied_write_len) { + inst->dst.hw_reg < scan_inst->base_mrf + scan_inst->mlen) { break; } } |