diff options
author | Francisco Jerez <[email protected]> | 2017-01-13 14:01:45 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-05-29 15:44:50 -0700 |
commit | 4bd2047deea31e877ae023a3845f925aab69cdc7 (patch) | |
tree | 2712d1885b93f5220a5cf6b54c6f766fd8b558ad | |
parent | d3cd6b7215c11054b587fb0fd621c53c6d62c64b (diff) |
intel/fs: Add explicit last_rt flag to fb writes orthogonal to eot.
When using multiple RT write messages to the same RT such as for
dual-source blending or all RT writes in SIMD32, we have to set the
"Last Render Target Select" bit on all write messages that target the
last RT but only set EOT on the last RT write in the shader.
Special-casing for dual-source blend works today because that is the
only case which requires multiple RT write messages per RT. When we
start doing SIMD32, this will become much more common so we add a
dedicated bit for it.
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 1 | ||||
-rw-r--r-- | src/intel/compiler/brw_fs_generator.cpp | 6 | ||||
-rw-r--r-- | src/intel/compiler/brw_fs_visitor.cpp | 2 | ||||
-rw-r--r-- | src/intel/compiler/brw_ir_fs.h | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 8d9278684fd..d67c0a41922 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -3246,6 +3246,7 @@ fs_visitor::emit_repclear_shader() } } write->eot = true; + write->last_rt = true; calculate_cfg(); diff --git a/src/intel/compiler/brw_fs_generator.cpp b/src/intel/compiler/brw_fs_generator.cpp index f310a84e25a..f49ab442fb2 100644 --- a/src/intel/compiler/brw_fs_generator.cpp +++ b/src/intel/compiler/brw_fs_generator.cpp @@ -289,10 +289,6 @@ fs_generator::fire_fb_write(fs_inst *inst, */ const uint32_t surf_index = inst->target; - bool last_render_target = inst->eot || - (prog_data->dual_src_blend && dispatch_width == 16); - - brw_fb_WRITE(p, payload, implied_header, @@ -301,7 +297,7 @@ fs_generator::fire_fb_write(fs_inst *inst, nr, 0, inst->eot, - last_render_target, + inst->last_rt, inst->header_size != 0); brw_mark_surface_used(&prog_data->base, surf_index); diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index 41dbd76106e..a24808eac69 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -103,6 +103,7 @@ fs_visitor::emit_dummy_fs() fs_inst *write; write = bld.emit(FS_OPCODE_FB_WRITE); write->eot = true; + write->last_rt = true; if (devinfo->gen >= 6) { write->base_mrf = 2; write->mlen = 4 * reg_width; @@ -459,6 +460,7 @@ fs_visitor::emit_fb_writes() inst->target = 0; } + inst->last_rt = true; inst->eot = true; } diff --git a/src/intel/compiler/brw_ir_fs.h b/src/intel/compiler/brw_ir_fs.h index f06a33c516d..92dad269a34 100644 --- a/src/intel/compiler/brw_ir_fs.h +++ b/src/intel/compiler/brw_ir_fs.h @@ -374,6 +374,7 @@ public: uint8_t sources; /**< Number of fs_reg sources. */ + bool last_rt:1; bool pi_noperspective:1; /**< Pixel interpolator noperspective flag */ }; |