i965: Avoid register coalescing away MATH workarounds on Ivybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 11 May 2011 14:54:57 +0000 (07:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:33:02 +0000 (23:33 -0700)
The MATH instruction cannot handle source modifiers, even on Gen7.
So, apply this workaround for Sandybridge on Ivybridge as well.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 8dee849edd423e07923681085bebafc15b5e743d..1b0e7e82fbedf3f460143586a6fd176b8c8f3b4a 100644 (file)
@@ -3386,7 +3386,7 @@ fs_visitor::register_coalesce()
         /* 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) {
+        if (intel->gen >= 6 && scan_inst->is_math() && has_source_modifiers) {
            interfered = true;
            break;
         }