diff options
author | Alex Deucher <alex@botch2.com> | 2008-04-14 11:50:59 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.com> | 2008-04-14 11:50:59 -0400 |
commit | 4cd4acf1092aeb696b086a382a033aee471d2de9 (patch) | |
tree | 0ce1e288ffd33699d4523136b8386c546a8c562d | |
parent | 3c523c9a07402e17dff588fad842224c57e98223 (diff) |
R300: move more common code to init3d()
-rw-r--r-- | src/radeon_commonfuncs.c | 21 | ||||
-rw-r--r-- | src/radeon_exa_render.c | 20 | ||||
-rw-r--r-- | src/radeon_textured_videofuncs.c | 18 |
3 files changed, 23 insertions, 36 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c index aa94b237..66edc72d 100644 --- a/src/radeon_commonfuncs.c +++ b/src/radeon_commonfuncs.c @@ -414,8 +414,25 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) FINISH_ACCEL(); } - - BEGIN_ACCEL(4); + if (IS_R300_3D) { + BEGIN_ACCEL(7); + OUT_ACCEL_REG(R300_US_CODE_ADDR_0, + (R300_ALU_START(0) | + R300_ALU_SIZE(0) | + R300_TEX_START(0) | + R300_TEX_SIZE(0))); + OUT_ACCEL_REG(R300_US_CODE_ADDR_1, + (R300_ALU_START(0) | + R300_ALU_SIZE(0) | + R300_TEX_START(0) | + R300_TEX_SIZE(0))); + OUT_ACCEL_REG(R300_US_CODE_ADDR_2, + (R300_ALU_START(0) | + R300_ALU_SIZE(0) | + R300_TEX_START(0) | + R300_TEX_SIZE(0))); + } else + BEGIN_ACCEL(4); OUT_ACCEL_REG(R300_US_W_FMT, 0); OUT_ACCEL_REG(R300_US_OUT_FMT_1, (R300_OUT_FMT_UNUSED | R300_OUT_FMT_C0_SEL_BLUE | diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 8c27ce28..926f7c59 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -1254,7 +1254,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, /* setup the rasterizer */ if (pMask) { - BEGIN_ACCEL(20); + BEGIN_ACCEL(17); /* 4 components: 2 for tex0, 2 for tex1 */ OUT_ACCEL_REG(R300_RS_COUNT, ((4 << R300_RS_COUNT_IT_COUNT_SHIFT) | @@ -1299,7 +1299,7 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, R300_TEX_CODE_SIZE(1))); } else { - BEGIN_ACCEL(17); + BEGIN_ACCEL(14); /* 2 components: 2 for tex0 */ OUT_ACCEL_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | @@ -1325,22 +1325,6 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, } - OUT_ACCEL_REG(R300_US_CODE_ADDR_0, - (R300_ALU_START(0) | - R300_ALU_SIZE(0) | - R300_TEX_START(0) | - R300_TEX_SIZE(0))); - OUT_ACCEL_REG(R300_US_CODE_ADDR_1, - (R300_ALU_START(0) | - R300_ALU_SIZE(0) | - R300_TEX_START(0) | - R300_TEX_SIZE(0))); - OUT_ACCEL_REG(R300_US_CODE_ADDR_2, - (R300_ALU_START(0) | - R300_ALU_SIZE(0) | - R300_TEX_START(0) | - R300_TEX_SIZE(0))); - if (pMask) { OUT_ACCEL_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index c60eedc6..4f0f5679 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -245,7 +245,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv /* setup pixel shader */ if (IS_R300_3D) { - BEGIN_VIDEO(16); + BEGIN_VIDEO(13); /* 2 components: 2 for tex0 */ OUT_VIDEO_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | @@ -277,21 +277,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv R300_ALU_CODE_SIZE(1) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(1))); - OUT_VIDEO_REG(R300_US_CODE_ADDR_0, - (R300_ALU_START(0) | - R300_ALU_SIZE(0) | - R300_TEX_START(0) | - R300_TEX_SIZE(0))); - OUT_VIDEO_REG(R300_US_CODE_ADDR_1, - (R300_ALU_START(0) | - R300_ALU_SIZE(0) | - R300_TEX_START(0) | - R300_TEX_SIZE(0))); - OUT_VIDEO_REG(R300_US_CODE_ADDR_2, - (R300_ALU_START(0) | - R300_ALU_SIZE(0) | - R300_TEX_START(0) | - R300_TEX_SIZE(0))); + OUT_VIDEO_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | R300_ALU_SIZE(0) | |