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>
Mon, 9 Sep 2013 18:26:53 +0000 (11:26 -0700)
commit6c3db2167c64ecf2366862f15f8e2d4a91f1028c
tree703175e988392b7e7f7c1308f40215045a6426b3
parent2924b5f73bd9468e59da9bf53e88c314669a729f
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>
Cc: Chris Forbes <chrisf@ijw.co.nz>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp