summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-11-11 18:02:23 -0800
committerMatt Turner <mattst88@gmail.com>2014-12-01 16:42:13 -0800
commite4d0299089fe3ea0a91abb3ec34c5c0436ef9e68 (patch)
tree92d1ee6f71be0042b3469734a2f3cc8b5f81446b /src/mesa/drivers
parentf1e5418f402c7ac087b1c127cb4476d0d02e0073 (diff)
downloadexternal_mesa3d-e4d0299089fe3ea0a91abb3ec34c5c0436ef9e68.zip
external_mesa3d-e4d0299089fe3ea0a91abb3ec34c5c0436ef9e68.tar.gz
external_mesa3d-e4d0299089fe3ea0a91abb3ec34c5c0436ef9e68.tar.bz2
i965/fs: Treat the FB_WRITE as predicated if we're discarding.
Pre-Haswell hardware couldn't actually predicate it, but it's easier to pretend as if it's predicated in the visitor since it will generate a MOV from f0.1. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_generator.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 8d3f093..bbed4cc 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -163,6 +163,10 @@ fs_generator::generate_fb_write(fs_inst *inst, struct brw_reg payload)
const brw_wm_prog_key * const key = (brw_wm_prog_key * const) this->key;
struct brw_reg implied_header;
+ if (brw->gen < 8 && !brw->is_haswell) {
+ brw_set_default_predicate_control(p, BRW_PREDICATE_NONE);
+ }
+
if (inst->base_mrf >= 0)
payload = brw_message_reg(inst->base_mrf);
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 0b62496..cc12e48 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -3334,7 +3334,7 @@ fs_visitor::emit_single_fb_write(fs_reg color0, fs_reg color1,
write->mlen = load->regs_written;
write->header_present = header_present;
- if ((brw->gen >= 8 || brw->is_haswell) && prog_data->uses_kill) {
+ if (prog_data->uses_kill) {
write->predicate = BRW_PREDICATE_NORMAL;
write->flag_subreg = 1;
}