i965: Add an assertion that writemask != NULL for non-ARFs.
i965: Add an assertion that writemask != NULL for non-ARFs.

We've observed GPU hangs on Ivybridge from the following instruction:

mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q };

There should be no reason to ever set the writemask on a destination
register to zero, except for perhaps the ARF NULL register.

This patch adds an assertion to enforce this for non-ARF registers.
Excluding ARFs is conservative yet should still catch the majority
of mistakes.

Signed-off-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Chris Forbes <5dcac483e7a6e31a5cbe89f38cc69dff8ee93dac@ijw.co.nz>

djreep81/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,metora/MesaGLSLCompiler,zeux/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer