summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-10-06 22:53:33 -0400
committerMarek Olšák <[email protected]>2018-10-16 17:23:25 -0400
commit25ddb15cfe36ff0d1f47e7b34161b545e6f329a8 (patch)
tree9b93b1245e8976cd56cec53bdd0f97ae6638b3a8 /src/gallium/drivers/radeonsi
parent9b331e462e5021d994859756d46cd2519d9c9c6e (diff)
radeonsi: emit sample locations for 1xAA only when the hw bug is present
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 8e4cdddf0b9..b63e70092db 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3261,10 +3261,8 @@ 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 (has_msaa_sample_loc_bug)
- nr_samples = MAX2(nr_samples, 1);
-
- if (nr_samples != sctx->sample_locs_num_samples) {
+ if ((nr_samples >= 2 || has_msaa_sample_loc_bug) &&
+ nr_samples != sctx->sample_locs_num_samples) {
sctx->sample_locs_num_samples = nr_samples;
si_emit_sample_locations(cs, nr_samples);
}