i965: Fix compute_to_mrf to not move a MRF write up into another live range.
Fixes glsl-fs-copy-propagation-texcoords-1.
This commit is contained in:
parent
6b1d7dd781
commit
61126278a3
|
@ -2975,15 +2975,13 @@ fs_visitor::compute_to_mrf()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scan_inst->mlen > 0) {
|
if (scan_inst->mlen > 0) {
|
||||||
/* Found a SEND instruction, which will do some amount of
|
/* Found a SEND instruction, which means that there are
|
||||||
* implied write that may overwrite our MRF that we were
|
* live values in MRFs from base_mrf to base_mrf +
|
||||||
* hoping to compute-to-MRF somewhere above it. Nothing
|
* scan_inst->mlen - 1. Don't go pushing our MRF write up
|
||||||
* we have implied-writes more than 2 MRFs from base_mrf,
|
* above it.
|
||||||
* though.
|
|
||||||
*/
|
*/
|
||||||
int implied_write_len = MIN2(scan_inst->mlen, 2);
|
|
||||||
if (inst->dst.hw_reg >= scan_inst->base_mrf &&
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue