i965/fs: Don't set flag_subreg_nr = 1 on predicated FB write setup.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 10 Aug 2014 23:15:51 +0000 (16:15 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Aug 2014 20:39:25 +0000 (13:39 -0700)
commitefc818e3a4dae5634b6296412771c995c156228e
tree698a091e3793802b0440325599f3a225b7a7e67f
parent2e180e4c09ef40c3c85a5f5e26ba673028326e73
i965/fs: Don't set flag_subreg_nr = 1 on predicated FB write setup.

On Haswell, we implement "discard" via predicated SEND messages, using
f0.1 instead of f0.0.  To accomplish this, we set inst->flag_subreg to 1
on the FS_OPCODE_FB_WRITE.

Most instructions using fs_inst::flag_subreg expand to a single assembly
instruction.  However, FS_OPCODE_FB_WRITE can generate several MOVs for
setting up header information.  We don't want to set flag_subreg on
those, so override the default state back to 0.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp