mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
i965/fs: Avoid register coalescing away gen6 MATH workarounds.
The code that generates MATH instructions attempts to work around
the hardware ignoring source modifiers (abs and negate) by emitting
moves into temporaries. Unfortunately, this pass coalesced those
registers, restoring the original problem. Avoid doing that.
Fixes several OpenGL ES2 conformance failures on Sandybridge.
NOTE: This is a candidate for the 7.10 branch.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 2c2686b912)
This commit is contained in:
parent
f13e45d45d
commit
ec4822a316
1 changed files with 10 additions and 0 deletions
|
|
@ -2980,6 +2980,8 @@ fs_visitor::register_coalesce()
|
|||
inst->dst.type != inst->src[0].type)
|
||||
continue;
|
||||
|
||||
bool has_source_modifiers = inst->src[0].abs || inst->src[0].negate;
|
||||
|
||||
/* Found a move of a GRF to a GRF. Let's see if we can coalesce
|
||||
* them: check for no writes to either one until the exit of the
|
||||
* program.
|
||||
|
|
@ -3012,6 +3014,14 @@ fs_visitor::register_coalesce()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* The gen6 MATH instruction can't handle source modifiers, so avoid
|
||||
* coalescing those for now. We should do something more specific.
|
||||
*/
|
||||
if (intel->gen == 6 && scan_inst->is_math() && has_source_modifiers) {
|
||||
interfered = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (interfered) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue