Mesa (master): r600g: reorder evergreen draw packets to be smaller.

Dave Airlie airlied at kemper.freedesktop.org
Wed Jun 8 01:47:37 UTC 2011


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jun  7 11:30:47 2011 +1000

r600g: reorder evergreen draw packets to be smaller.

We were always re-emitting lots of unnecessary changes here,
avoid doing that.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/winsys/r600/drm/evergreen_hw_context.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/winsys/r600/drm/evergreen_hw_context.c b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
index 3cf41c1..a951827 100644
--- a/src/gallium/winsys/r600/drm/evergreen_hw_context.c
+++ b/src/gallium/winsys/r600/drm/evergreen_hw_context.c
@@ -125,6 +125,8 @@ static const struct r600_reg evergreen_context_reg_list[] = {
 	{R_028244_PA_SC_GENERIC_SCISSOR_BR, 0, 0, 0},
 	{R_028250_PA_SC_VPORT_SCISSOR_0_TL, 0, 0, 0},
 	{R_028254_PA_SC_VPORT_SCISSOR_0_BR, 0, 0, 0},
+	{R_0282D0_PA_SC_VPORT_ZMIN_0, 0, 0, 0},
+	{R_0282D4_PA_SC_VPORT_ZMAX_0, 0, 0, 0},
 	{R_028350_SX_MISC, 0, 0, 0},
 	{R_028380_SQ_VTX_SEMANTIC_0, 0, 0, 0},
 	{R_028384_SQ_VTX_SEMANTIC_1, 0, 0, 0},
@@ -158,12 +160,12 @@ static const struct r600_reg evergreen_context_reg_list[] = {
 	{R_0283F4_SQ_VTX_SEMANTIC_29, 0, 0, 0},
 	{R_0283F8_SQ_VTX_SEMANTIC_30, 0, 0, 0},
 	{R_0283FC_SQ_VTX_SEMANTIC_31, 0, 0, 0},
-	{R_0282D0_PA_SC_VPORT_ZMIN_0, 0, 0, 0},
-	{R_0282D4_PA_SC_VPORT_ZMAX_0, 0, 0, 0},
+	{GROUP_FORCE_NEW_BLOCK, 0, 0, 0},
 	{R_028400_VGT_MAX_VTX_INDX, 0, 0, 0},
 	{R_028404_VGT_MIN_VTX_INDX, 0, 0, 0},
 	{R_028408_VGT_INDX_OFFSET, 0, 0, 0},
 	{R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 0, 0, 0},
+	{GROUP_FORCE_NEW_BLOCK, 0, 0, 0},
 	{R_028410_SX_ALPHA_TEST_CONTROL, 0, 0, 0},
 	{R_028414_CB_BLEND_RED, 0, 0, 0},
 	{R_028418_CB_BLEND_GREEN, 0, 0, 0},
@@ -487,6 +489,8 @@ static const struct r600_reg cayman_context_reg_list[] = {
 	{R_028244_PA_SC_GENERIC_SCISSOR_BR, 0, 0, 0},
 	{R_028250_PA_SC_VPORT_SCISSOR_0_TL, 0, 0, 0},
 	{R_028254_PA_SC_VPORT_SCISSOR_0_BR, 0, 0, 0},
+	{R_0282D0_PA_SC_VPORT_ZMIN_0, 0, 0, 0},
+	{R_0282D4_PA_SC_VPORT_ZMAX_0, 0, 0, 0},
 	{R_028350_SX_MISC, 0, 0, 0},
 	{R_028380_SQ_VTX_SEMANTIC_0, 0, 0, 0},
 	{R_028384_SQ_VTX_SEMANTIC_1, 0, 0, 0},
@@ -520,12 +524,12 @@ static const struct r600_reg cayman_context_reg_list[] = {
 	{R_0283F4_SQ_VTX_SEMANTIC_29, 0, 0, 0},
 	{R_0283F8_SQ_VTX_SEMANTIC_30, 0, 0, 0},
 	{R_0283FC_SQ_VTX_SEMANTIC_31, 0, 0, 0},
-	{R_0282D0_PA_SC_VPORT_ZMIN_0, 0, 0, 0},
-	{R_0282D4_PA_SC_VPORT_ZMAX_0, 0, 0, 0},
+	{GROUP_FORCE_NEW_BLOCK, 0, 0, 0},
 	{R_028400_VGT_MAX_VTX_INDX, 0, 0, 0},
 	{R_028404_VGT_MIN_VTX_INDX, 0, 0, 0},
 	{R_028408_VGT_INDX_OFFSET, 0, 0, 0},
 	{R_02840C_VGT_MULTI_PRIM_IB_RESET_INDX, 0, 0, 0},
+	{GROUP_FORCE_NEW_BLOCK, 0, 0, 0},
 	{R_028410_SX_ALPHA_TEST_CONTROL, 0, 0, 0},
 	{R_028414_CB_BLEND_RED, 0, 0, 0},
 	{R_028418_CB_BLEND_GREEN, 0, 0, 0},




More information about the mesa-commit mailing list