i965: Fix Sandybridge regression introduced by workaround-free math.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 7 Nov 2011 20:07:44 +0000 (12:07 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 7 Nov 2011 20:09:02 +0000 (12:09 -0800)
Commit a73c65c5342bf41fa0dfefe7daa9197ce6a11db4 had a typo which
accidentally enabled the workaround-free Gen7 code on Gen6.

Fixes GPU hangs in anything using pow() or integer division/modulus.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_emit.cpp

index b613fb081fc746bae5ec2276b51acc5215b7722e..ad4fae2c3b50ef49b9d29b3330f8bb5fefce3720 100644 (file)
@@ -833,7 +833,7 @@ fs_visitor::generate_code()
       case SHADER_OPCODE_INT_QUOTIENT:
       case SHADER_OPCODE_INT_REMAINDER:
       case SHADER_OPCODE_POW:
-        if (intel->gen >= 6) {
+        if (intel->gen >= 7) {
            generate_math2_gen7(inst, dst, src[0], src[1]);
         } else if (intel->gen == 6) {
            generate_math2_gen6(inst, dst, src[0], src[1]);