Mesa (master): i965: Fix Haswell discard regressions since Gen4-5 line AA fix.
Kenneth Graunke
kwg at kemper.freedesktop.org
Thu Jun 12 08:07:04 UTC 2014
Module: Mesa
Branch: master
Commit: a2ad771671d94feae16b35c26ed4d1907f74f50e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2ad771671d94feae16b35c26ed4d1907f74f50e
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Jun 10 18:50:03 2014 -0700
i965: Fix Haswell discard regressions since Gen4-5 line AA fix.
In commit dc2d3a7f5c217a7cee92380fbf503924a9591bea, Iago accidentally
moved fire_fb_write() above the brw_pop_insn_state(), which caused the
SEND to lose its predication and change from WE_normal to WE_all.
Haswell uses predicated SENDs for discards, so this broke Piglit's
tests for discards.
We want the Gen4-5 MOV to be uncompressed, unpredicated, and unmasked,
but the actual FB write itself should respect those. So, pop state
first, and force it again around the single MOV.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79903
---
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 3787d24..d21b4e2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -106,9 +106,14 @@ fs_generator::fire_fb_write(fs_inst *inst,
uint32_t msg_control;
if (brw->gen < 6) {
+ brw_push_insn_state(p);
+ 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_MOV(p,
brw_message_reg(base_reg + 1),
brw_vec8_grf(1, 0));
+ brw_pop_insn_state(p);
}
if (this->dual_source_output)
@@ -196,6 +201,8 @@ fs_generator::generate_fb_write(fs_inst *inst)
implied_header = brw_null_reg();
}
+ brw_pop_insn_state(p);
+
if (!runtime_check_aads_emit) {
fire_fb_write(inst, inst->base_mrf, implied_header, inst->mlen);
} else {
@@ -221,8 +228,6 @@ fs_generator::generate_fb_write(fs_inst *inst)
brw_land_fwd_jump(p, jmp);
fire_fb_write(inst, inst->base_mrf, implied_header, inst->mlen);
}
-
- brw_pop_insn_state(p);
}
void
More information about the mesa-commit
mailing list