diff options
author | Nicolai Hähnle <[email protected]> | 2016-11-15 15:42:18 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-11-18 09:48:46 +0100 |
commit | 9882ed85bd603bf729c6d56c7f1922a477159b36 (patch) | |
tree | 0e59fd86b3c4c74d6c298da03f230a9986976262 /src/gallium | |
parent | 70454f5b55d72c86d9a73bb149f20f66ae43ded7 (diff) |
radeonsi: emit sample locations also when nr_samples == 1
Since the state tracker now enables MSAA in the hardware for the case
nr_samples == 1 as well, we need to set sample locations correctly for
this case.
The Polaris override is still needed for the non-MSAA case (when
nr_samples == 0).
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index c64bb5b0460..818a393f4d5 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2632,7 +2632,10 @@ static void si_emit_msaa_sample_locs(struct si_context *sctx, /* On Polaris, the small primitive filter uses the sample locations * even when MSAA is off, so we need to make sure they're set to 0. */ - if ((nr_samples > 1 || sctx->b.family >= CHIP_POLARIS10) && + if (sctx->b.family >= CHIP_POLARIS10) + nr_samples = MAX2(nr_samples, 1); + + if (nr_samples >= 1 && (nr_samples != sctx->msaa_sample_locs.nr_samples)) { sctx->msaa_sample_locs.nr_samples = nr_samples; cayman_emit_msaa_sample_locs(cs, nr_samples); |