diff options
author | Marek Olšák <[email protected]> | 2018-06-01 00:33:57 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-06-13 22:00:43 -0400 |
commit | a4312742a5a01270e1bf38a18a3ce776ea96e970 (patch) | |
tree | 70571c51e38493ec0a621f81a5b80c6dcbe13ea6 /src/gallium/drivers | |
parent | 47b780be21d917eaa6a6a6c9e30ba9fba52d9acd (diff) |
radeonsi/gfx9: update & clean up a DPBB heuristic
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_binning.c | 14 |
1 files 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 6877cc0a62d..19b403f9bd8 100644 --- a/src/gallium/drivers/radeonsi/si_state_binning.c +++ b/src/gallium/drivers/radeonsi/si_state_binning.c @@ -339,18 +339,14 @@ void si_emit_dpbb_state(struct si_context *sctx) 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); |