From: Marek Olšák <marek.ol...@amd.com>

---
 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 af1b9f0acc8..d3c63406dd4 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3254,24 +3254,22 @@ static void si_emit_msaa_sample_locs(struct si_context 
*sctx)
 
        /* Smoothing (only possible with nr_samples == 1) uses the same
         * sample locations as the MSAA it simulates.
         */
        if (nr_samples <= 1 && sctx->smoothing_enabled)
                nr_samples = SI_NUM_SMOOTH_AA_SAMPLES;
 
        /* 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);
        }
 
        if (sctx->family >= CHIP_POLARIS10) {
                unsigned small_prim_filter_cntl =
                        S_028830_SMALL_PRIM_FILTER_ENABLE(1) |
                        /* line bug */
                        S_028830_LINE_FILTER_DISABLE(sctx->family <= 
CHIP_POLARIS12);
 
-- 
2.17.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to