Mesa (master): i965/fs: Don't set flag_subreg_nr = 1 on predicated FB write setup.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Aug 12 20:53:38 UTC 2014


Module: Mesa
Branch: master
Commit: efc818e3a4dae5634b6296412771c995c156228e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=efc818e3a4dae5634b6296412771c995c156228e

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Aug 10 16:15:51 2014 -0700

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 at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

---

 src/mesa/drivers/dri/i965/brw_fs_generator.cpp |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index d3509a0..208b54f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -154,6 +154,7 @@ fs_generator::generate_fb_write(fs_inst *inst)
       brw_set_default_mask_control(p, BRW_MASK_DISABLE);
       brw_set_default_predicate_control(p, BRW_PREDICATE_NONE);
       brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
+      brw_set_default_flag_reg(p, 0, 0);
 
       /* On HSW, the GPU will use the predicate on SENDC, unless the header is
        * present.




More information about the mesa-commit mailing list