diff options
author | Marek Olšák <[email protected]> | 2014-08-23 11:12:01 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-09-01 21:18:51 +0200 |
commit | 78aa71760161e7293cdb3f77ede27d36c2aae39b (patch) | |
tree | 84f8e5d8a0b4cd7a5ff331bd7d3e20027bbfe238 /src/gallium/drivers/radeonsi | |
parent | ab9ad9177981757e7f1d17c61fd123855620c875 (diff) |
radeonsi: disable occlusion queries if they are not needed
We always left them enabled, which turned off HiZ in some cases.
This should improve performace with Hyper-Z.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index b0fcb071e2e..3926e5ff15b 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -729,6 +729,14 @@ static void si_state_draw(struct si_context *sctx, S_028004_PERFECT_ZPASS_COUNTS(1) | S_028004_SAMPLE_RATE(sctx->framebuffer.log_samples)); } + } else { + /* Disable occlusion queries. */ + if (sctx->b.chip_class >= CIK) { + si_pm4_set_reg(pm4, R_028004_DB_COUNT_CONTROL, 0); + } else { + si_pm4_set_reg(pm4, R_028004_DB_COUNT_CONTROL, + S_028004_ZPASS_INCREMENT_DISABLE(1)); + } } if (info->count_from_stream_output) { |