i965: Fix writemask != 0 assertions on Sandybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 17 Sep 2013 18:54:05 +0000 (11:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Sep 2013 17:52:58 +0000 (10:52 -0700)
commit34b11334d417fae65ebe9cf96980aea581e24893
treef85f17d803469d6e20a8f3d0804cdabbf5667df6
parentd2d90d66d81d5f147b03628e1913bf7f9d2a0563
i965: Fix writemask != 0 assertions on Sandybridge.

This fixes myriads of regressions since commit 169f9c030c16d1247a3a7629
("i965: Add an assertion that writemask != NULL for non-ARFs.").

On Sandybridge, our control flow handling (such as brw_IF) does:

   brw_set_dest(p, insn, brw_imm_w(0));
   insn->bits1.branch_gen6.jump_count = 0;

This results in a IMM destination with zero for the writemask.  IMM
destinations are rather bizarre, but the code has been working for ages,
so I'm loathe to change it.

Fixes glxgears on Sandybridge.

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