[Mesa-dev] [PATCH 09/53] intel/fs: Fix Gen4-5 FB write AA data payload munging for non-EOT writes.
Jason Ekstrand
jason at jlekstrand.net
Thu May 24 21:55:51 UTC 2018
From: Francisco Jerez <currojerez at riseup.net>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/compiler/brw_fs_generator.cpp | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp
index f49ab44..467a390 100644
--- a/src/intel/compiler/brw_fs_generator.cpp
+++ b/src/intel/compiler/brw_fs_generator.cpp
@@ -395,23 +395,29 @@ fs_generator::generate_fb_write(fs_inst *inst, struct brw_reg payload)
struct brw_reg v1_null_ud = vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD));
/* Check runtime bit to detect if we have to send AA data or not */
- brw_push_insn_state(p);
- brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
- brw_set_default_exec_size(p, BRW_EXECUTE_1);
brw_AND(p,
v1_null_ud,
retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_UD),
brw_imm_ud(1<<26));
brw_inst_set_cond_modifier(p->devinfo, brw_last_inst, BRW_CONDITIONAL_NZ);
+ brw_inst_set_qtr_control(p->devinfo, brw_last_inst, BRW_COMPRESSION_NONE);
+ brw_inst_set_exec_size(p->devinfo, brw_last_inst, BRW_EXECUTE_1);
+
+ /* Jump over the send without AA data if the bit was set. */
+ const unsigned skip_noaa_send =
+ brw_JMPI(p, brw_imm_ud(0), BRW_PREDICATE_NORMAL) - p->store;
+
+ fire_fb_write(inst, offset(payload, 1), implied_header, inst->mlen - 1);
+
+ /* Otherwise jump over the send with AA data. */
+ const unsigned skip_aa_send =
+ brw_JMPI(p, brw_imm_ud(0), BRW_PREDICATE_NONE) - p->store;
+
+ brw_land_fwd_jump(p, skip_noaa_send);
- int jmp = brw_JMPI(p, brw_imm_ud(0), BRW_PREDICATE_NORMAL) - p->store;
- brw_pop_insn_state(p);
- {
- /* Don't send AA data */
- fire_fb_write(inst, offset(payload, 1), implied_header, inst->mlen-1);
- }
- brw_land_fwd_jump(p, jmp);
fire_fb_write(inst, payload, implied_header, inst->mlen);
+
+ brw_land_fwd_jump(p, skip_aa_send);
}
}
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list