Mesa (staging/20.2): radeonsi: various fixes for gfx10.3

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 7 17:46:08 UTC 2020


Module: Mesa
Branch: staging/20.2
Commit: 1edc9549d29b1ec531d324e3c860f00d7439b43e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1edc9549d29b1ec531d324e3c860f00d7439b43e

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Jul 30 05:27:47 2020 -0400

radeonsi: various fixes for gfx10.3

The magic numbers fix sample shading.
The bypass flag is optional.

Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>
(cherry picked from commit 0cdd411b6d78d15e8bc54e1ce5c3493cdbcadc1d)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/radeonsi/si_state.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 33b2d315036..0066fb903f1 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -13,7 +13,7 @@
         "description": "radeonsi: various fixes for gfx10.3",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "a23802bcb9a42a02d34a5a36d6e66d6532813a0d"
     },
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index b960583327a..3c0540ca9a8 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -763,6 +763,7 @@ static void si_emit_clip_regs(struct si_context *sctx)
    unsigned initial_cdw = sctx->gfx_cs->current.cdw;
    unsigned pa_cl_cntl = S_02881C_VS_OUT_CCDIST0_VEC_ENA((total_mask & 0x0F) != 0) |
                          S_02881C_VS_OUT_CCDIST1_VEC_ENA((total_mask & 0xF0) != 0) |
+                         S_02881C_BYPASS_VTX_RATE_COMBINER_GFX103(sctx->chip_class >= GFX10_3) |
                          S_02881C_BYPASS_PRIM_RATE_COMBINER_GFX103(sctx->chip_class >= GFX10_3) |
                          clipdist_mask | (culldist_mask << 8);
 
@@ -5353,6 +5354,7 @@ void si_init_cs_preamble_state(struct si_context *sctx, bool uses_reg_shadowing)
 
    if (sctx->chip_class >= GFX10_3) {
       si_pm4_set_reg(pm4, R_028750_SX_PS_DOWNCONVERT_CONTROL_GFX103, 0xff);
+      si_pm4_set_reg(pm4, 0x28848, 1 << 9); /* This fixes sample shading. */
    }
 
    sctx->cs_preamble_state = pm4;



More information about the mesa-commit mailing list