diff options
author | Jason Ekstrand <[email protected]> | 2018-05-17 15:40:48 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-28 13:19:38 -0700 |
commit | b1cc9a9ae18a6b4133b83107a3bd8a401b3a8010 (patch) | |
tree | 7528b6e494487126dfa4a62e2b29972afa61b7f2 /src/intel | |
parent | d91fa20655bbfbd42b0ddb6acb84db7482e7ddb1 (diff) |
intel/fs: Properly track implied header regs read by FB writes
The FB write opcode on gen4-5 does implied copies from g0 and g1 to the
message payload. With this commit, we start tracking that as part of
the IR by having the FB write read from g0-1.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 5c95e260aad..9b7a6b281df 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -816,6 +816,15 @@ fs_inst::size_read(int arg) const { switch (opcode) { case FS_OPCODE_FB_WRITE: + case FS_OPCODE_REP_FB_WRITE: + if (arg == 0) { + if (base_mrf >= 0) + return src[0].file == BAD_FILE ? 0 : 2 * REG_SIZE; + else + return mlen * REG_SIZE; + } + break; + case FS_OPCODE_FB_READ: case SHADER_OPCODE_URB_WRITE_SIMD8: case SHADER_OPCODE_URB_WRITE_SIMD8_PER_SLOT: @@ -4074,7 +4083,13 @@ lower_fb_write_logical_send(const fs_builder &bld, fs_inst *inst, if (devinfo->gen < 6 && bld.dispatch_width() == 16) load->dst.nr |= BRW_MRF_COMPR4; - inst->resize_sources(0); + if (devinfo->gen < 6) { + /* Set up src[0] for the implied MOV from grf0-1 */ + inst->resize_sources(1); + inst->src[0] = brw_vec8_grf(0, 0); + } else { + inst->resize_sources(0); + } inst->base_mrf = 1; } |