diff options
author | Marek Olšák <[email protected]> | 2018-06-20 18:43:36 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-06-21 14:42:14 -0400 |
commit | 9410cd53c376be791dc40aad3ddfc659a3d8313b (patch) | |
tree | 965ad7d3337150beaa6a8bf019913e7bc865199f /src | |
parent | 9c21002f6ed0621fbd68f413eceb58a89ace7275 (diff) |
radeonsi: fix occlusion queries with 16x AA without FBO attachments on Stoney
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index cfe32bc7f5e..a7377f38745 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1378,9 +1378,17 @@ static void si_emit_db_render_state(struct si_context *sctx) bool perfect = sctx->num_perfect_occlusion_queries > 0; if (sctx->chip_class >= CIK) { + unsigned log_sample_rate = sctx->framebuffer.log_samples; + + /* Stoney doesn't increment occlusion query counters + * if the sample rate is 16x. Use 8x sample rate instead. + */ + if (sctx->family == CHIP_STONEY) + log_sample_rate = MIN2(log_sample_rate, 3); + db_count_control = S_028004_PERFECT_ZPASS_COUNTS(perfect) | - S_028004_SAMPLE_RATE(sctx->framebuffer.log_samples) | + S_028004_SAMPLE_RATE(log_sample_rate) | S_028004_ZPASS_ENABLE(1) | S_028004_SLICE_EVEN_ENABLE(1) | S_028004_SLICE_ODD_ENABLE(1); |