radeonsi: emit sample locations for 1xAA only when the hw bug is present

This commit is contained in:
Marek Olšák
2018-10-06 22:53:33 -04:00
parent 9b331e462e
commit 25ddb15cfe
+2 -4
View File
@@ -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);
}