Remembering latest states of registers to eliminate redunant SET_CONTEXT_REG 
packets

Signed-off-by: Sonny Jiang <sonny.ji...@amd.com>
---
 src/gallium/drivers/radeonsi/si_state.c | 6 ++++--
 src/gallium/drivers/radeonsi/si_state.h | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c 
b/src/gallium/drivers/radeonsi/si_state.c
index 5f3ab45..199d740 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3250,8 +3250,10 @@ static void si_emit_msaa_sample_locs(struct si_context 
*sctx)
                    rs && !rs->multisample_enable)
                        small_prim_filter_cntl &= 
C_028830_SMALL_PRIM_FILTER_ENABLE;
 
-               radeon_set_context_reg(cs, 
R_028830_PA_SU_SMALL_PRIM_FILTER_CNTL,
-                                      small_prim_filter_cntl);
+               radeon_opt_set_context_reg(sctx,
+                                          
R_028830_PA_SU_SMALL_PRIM_FILTER_CNTL,
+                                          
SI_TRACKED_PA_SU_SMALL_PRIM_FILTER_CNTL,
+                                          small_prim_filter_cntl);
        }
 }
 
diff --git a/src/gallium/drivers/radeonsi/si_state.h 
b/src/gallium/drivers/radeonsi/si_state.h
index a5af7de..5ff4f57 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -227,6 +227,8 @@ enum si_tracked_reg {
        SI_TRACKED_DB_EQAA,
        SI_TRACKED_PA_SC_MODE_CNTL_1,
 
+       SI_TRACKED_PA_SU_SMALL_PRIM_FILTER_CNTL,
+
        SI_NUM_TRACKED_REGS,
 };
 
-- 
2.7.4

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

Reply via email to