Mesa (master): radeonsi: emit sample locations for 1xAA only when the hw bug is present

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 16 22:58:09 UTC 2018


Module: Mesa
Branch: master
Commit: 25ddb15cfe36ff0d1f47e7b34161b545e6f329a8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=25ddb15cfe36ff0d1f47e7b34161b545e6f329a8

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Oct  6 22:53:33 2018 -0400

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

---

 src/gallium/drivers/radeonsi/si_state.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 8e4cdddf0b..b63e70092d 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);
 	}




More information about the mesa-commit mailing list