i965: Fix hangs with FP KIL instructions pre-gen6.
authorEric Anholt <eric@anholt.net>
Wed, 14 Nov 2012 19:44:57 +0000 (11:44 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 26 Nov 2012 04:22:02 +0000 (20:22 -0800)
We can't support IF statements in 16-wide on these.  To get back to 16-wide
for these shaders, we need to support predicate on discard instructions in the
backend IR, which is something we've sort of got on the list to do anyway.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55828
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_fp.cpp

index 88b09761b88dc4f857fce9c64d6bd195e2fdbe3e..834f290a31547789191c9901807e982018c5e948 100644 (file)
@@ -255,6 +255,8 @@ fs_visitor::emit_fragment_program_code()
             emit(CMP(null, regoffset(src[0], i), fs_reg(0.0f),
                      BRW_CONDITIONAL_L));
 
+            if (intel->gen < 6 && c->dispatch_width == 16)
+               fail("Can't support (non-uniform) control flow on 16-wide");
             emit(IF(BRW_PREDICATE_NORMAL));
             emit(FS_OPCODE_DISCARD);
             emit(BRW_OPCODE_ENDIF);