i965/vec4: Only zero out unused message components when there are any.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Sep 2013 18:11:03 +0000 (11:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Sep 2013 00:52:56 +0000 (17:52 -0700)
commit4e5eb8ba25054ede4798fa424e6f32b23aba0f98
tree9b4575c91085cab5646854851232e4ee91e09867
parent17eb1df7b8af800f03c5b1f35fdf4292abe32ea1
i965/vec4: Only zero out unused message components when there are any.

Otherwise, coordinates with four components would result in a MOV
with a destination writemask that has no channels enabled:

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

At best, this is stupid: we emit code that shouldn't do anything.
Worse, it apparently causes GPU hangs (observable with Chris's
textureGather test on CubeArrays.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp