Ping On Fri, Jun 1, 2018 at 1:21 AM, Marek Olšák <mar...@gmail.com> wrote:
> From: Marek Olšák <marek.ol...@amd.com> > > --- > src/gallium/drivers/radeonsi/si_state_binning.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/src/gallium/drivers/radeonsi/si_state_binning.c > b/src/gallium/drivers/radeonsi/si_state_binning.c > index 9948a95488c..6d07492ced7 100644 > --- a/src/gallium/drivers/radeonsi/si_state_binning.c > +++ b/src/gallium/drivers/radeonsi/si_state_binning.c > @@ -332,32 +332,28 @@ void si_emit_dpbb_state(struct si_context *sctx) > if (!sscreen->dpbb_allowed || !blend || !dsa || > sctx->dpbb_force_off) { > si_emit_dpbb_disable(sctx); > return; > } > > bool ps_can_kill = G_02880C_KILL_ENABLE(db_shader_control) || > G_02880C_MASK_EXPORT_ENABLE(db_shader_control) > || > G_02880C_COVERAGE_TO_MASK_ENABLE(db_shader_control) > || > blend->alpha_to_coverage; > > - /* This is ported from Vulkan, but it doesn't make much sense to > me. > - * Maybe it's for RE-Z? But Vulkan doesn't use RE-Z. TODO: Clarify > this. > - */ > - bool ps_can_reject_z_trivially = > + bool db_can_reject_z_trivially = > !G_02880C_Z_EXPORT_ENABLE(db_shader_control) || > - G_02880C_CONSERVATIVE_Z_EXPORT(db_shader_control); > + G_02880C_CONSERVATIVE_Z_EXPORT(db_shader_control) || > + G_02880C_DEPTH_BEFORE_SHADER(db_shader_control); > > - /* Disable binning if PS can kill trivially with DB writes. > - * Ported from Vulkan. (heuristic?) > - */ > + /* Disable DPBB when it's believed to be inefficient. */ > if (ps_can_kill && > - ps_can_reject_z_trivially && > + db_can_reject_z_trivially && > sctx->framebuffer.state.zsbuf && > dsa->db_can_write) { > si_emit_dpbb_disable(sctx); > return; > } > > /* Compute the bin size. */ > /* TODO: We could also look at enabled pixel shader outputs. */ > unsigned cb_target_enabled_4bit = > sctx->framebuffer.colorbuf_enabled_4bit > & > blend->cb_target_enabled_4bit; > -- > 2.17.0 > >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev