diff options
author | Jason Ekstrand <[email protected]> | 2018-05-17 18:47:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-28 13:19:38 -0700 |
commit | c0a1c248b879af2d4726b2a2fce78e91045e6dd3 (patch) | |
tree | dccdd2a5896226c07da5b09b5eee829e17ef0c27 /src | |
parent | b1cc9a9ae18a6b4133b83107a3bd8a401b3a8010 (diff) |
intel/fs: Pull FB write implied headers from src[0]
Now that we have the implied header in src[0] for tracking purposes, we
may as well use it in the generator. This makes things a tiny bit more
general.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/compiler/brw_fs_generator.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp index 09839d0b4da..f72139d43c8 100644 --- a/src/intel/compiler/brw_fs_generator.cpp +++ b/src/intel/compiler/brw_fs_generator.cpp @@ -267,7 +267,8 @@ fs_generator::fire_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_MOV(p, offset(payload, 1), brw_vec8_grf(1, 0)); + brw_MOV(p, offset(retype(payload, BRW_REGISTER_TYPE_UD), 1), + offset(retype(implied_header, BRW_REGISTER_TYPE_UD), 1)); brw_pop_insn_state(p); } @@ -291,7 +292,7 @@ fs_generator::fire_fb_write(fs_inst *inst, brw_fb_WRITE(p, payload, - implied_header, + retype(implied_header, BRW_REGISTER_TYPE_UW), msg_control, surf_index, nr, @@ -308,12 +309,14 @@ fs_generator::generate_fb_write(fs_inst *inst, struct brw_reg payload) { struct brw_wm_prog_data *prog_data = brw_wm_prog_data(this->prog_data); const brw_wm_prog_key * const key = (brw_wm_prog_key * const) this->key; - struct brw_reg implied_header; if (devinfo->gen < 8 && !devinfo->is_haswell) { brw_set_default_predicate_control(p, BRW_PREDICATE_NONE); } + const struct brw_reg implied_header = + devinfo->gen < 6 ? payload : brw_null_reg(); + if (inst->base_mrf >= 0) payload = brw_message_reg(inst->base_mrf); @@ -375,15 +378,9 @@ fs_generator::generate_fb_write(fs_inst *inst, struct brw_reg payload) vec1(retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD)), brw_imm_ud(0x1 << 14)); } - - implied_header = brw_null_reg(); - } else { - implied_header = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW); } brw_pop_insn_state(p); - } else { - implied_header = brw_null_reg(); } if (!runtime_check_aads_emit) { |