diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-05-03 19:42:44 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-05-03 19:42:44 -0400 |
commit | a1c64ea5224009779ccad66b0f84d861eae966ac (patch) | |
tree | e47e8f3a798596c0e28ec5e8841e0e7a71e926e5 | |
parent | 3880bc3c95764acccd62cfa438932458df95daf6 (diff) |
r3xx-r5xx: switch to 1/12 subpixel precision
- based on similar patch in Jerome's cs ddx tree
- also fix clipping offsets
- should eventually allow for 4k render targets
- mesa driver uses 1/12 mode, this avoids changing the
subpixel mode when switching between ddx and mesa
-rw-r--r-- | src/radeon_accel.c | 2 | ||||
-rw-r--r-- | src/radeon_commonfuncs.c | 40 | ||||
-rw-r--r-- | src/radeon_exa_render.c | 8 | ||||
-rw-r--r-- | src/radeon_textured_videofuncs.c | 8 |
4 files changed, 31 insertions, 27 deletions
diff --git a/src/radeon_accel.c b/src/radeon_accel.c index 70347fe9..f90b3864 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -493,7 +493,7 @@ void RADEONEngineInit(ScrnInfoPtr pScrn) "num quad-pipes is %d\n", info->accel_state->num_gb_pipes); if (IS_R300_3D || IS_R500_3D) { - uint32_t gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16 | R300_SUBPIXEL_1_16); + uint32_t gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16); switch(info->accel_state->num_gb_pipes) { case 2: gb_tile_config |= R300_PIPE_COUNT_R300; break; diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c index 3dbe6173..ba358ab6 100644 --- a/src/radeon_commonfuncs.c +++ b/src/radeon_commonfuncs.c @@ -69,7 +69,7 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) OUT_ACCEL_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_3D_IDLECLEAN); FINISH_ACCEL(); - gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16 | R300_SUBPIXEL_1_16); + gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16); switch(info->accel_state->num_gb_pipes) { case 2: gb_tile_config |= R300_PIPE_COUNT_R300; break; @@ -105,21 +105,21 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) OUT_ACCEL_REG(R300_GB_AA_CONFIG, 0); OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D | R300_DC_FREE_3D); OUT_ACCEL_REG(R300_RB3D_ZCACHE_CTLSTAT, R300_ZC_FLUSH | R300_ZC_FREE); - OUT_ACCEL_REG(R300_GB_MSPOS0, ((8 << R300_MS_X0_SHIFT) | - (8 << R300_MS_Y0_SHIFT) | - (8 << R300_MS_X1_SHIFT) | - (8 << R300_MS_Y1_SHIFT) | - (8 << R300_MS_X2_SHIFT) | - (8 << R300_MS_Y2_SHIFT) | - (8 << R300_MSBD0_Y_SHIFT) | - (7 << R300_MSBD0_X_SHIFT))); - OUT_ACCEL_REG(R300_GB_MSPOS1, ((8 << R300_MS_X3_SHIFT) | - (8 << R300_MS_Y3_SHIFT) | - (8 << R300_MS_X4_SHIFT) | - (8 << R300_MS_Y4_SHIFT) | - (8 << R300_MS_X5_SHIFT) | - (8 << R300_MS_Y5_SHIFT) | - (8 << R300_MSBD1_SHIFT))); + OUT_ACCEL_REG(R300_GB_MSPOS0, ((6 << R300_MS_X0_SHIFT) | + (6 << R300_MS_Y0_SHIFT) | + (6 << R300_MS_X1_SHIFT) | + (6 << R300_MS_Y1_SHIFT) | + (6 << R300_MS_X2_SHIFT) | + (6 << R300_MS_Y2_SHIFT) | + (6 << R300_MSBD0_Y_SHIFT) | + (6 << R300_MSBD0_X_SHIFT))); + OUT_ACCEL_REG(R300_GB_MSPOS1, ((6 << R300_MS_X3_SHIFT) | + (6 << R300_MS_Y3_SHIFT) | + (6 << R300_MS_X4_SHIFT) | + (6 << R300_MS_Y4_SHIFT) | + (6 << R300_MS_X5_SHIFT) | + (6 << R300_MS_Y5_SHIFT) | + (6 << R300_MSBD1_SHIFT))); FINISH_ACCEL(); BEGIN_ACCEL(5); @@ -552,10 +552,10 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn) OUT_ACCEL_REG(R300_SC_EDGERULE, 0xA5294A5); if (IS_R300_3D) { /* clip has offset 1440 */ - OUT_ACCEL_REG(R300_SC_CLIP_0_A, ((1088 << R300_CLIP_X_SHIFT) | - (1088 << R300_CLIP_Y_SHIFT))); - OUT_ACCEL_REG(R300_SC_CLIP_0_B, (((1080 + 2920) << R300_CLIP_X_SHIFT) | - ((1080 + 2920) << R300_CLIP_Y_SHIFT))); + OUT_ACCEL_REG(R300_SC_CLIP_0_A, ((1440 << R300_CLIP_X_SHIFT) | + (1440 << R300_CLIP_Y_SHIFT))); + OUT_ACCEL_REG(R300_SC_CLIP_0_B, ((4080 << R300_CLIP_X_SHIFT) | + (4080 << R300_CLIP_Y_SHIFT))); } else { OUT_ACCEL_REG(R300_SC_CLIP_0_A, ((0 << R300_CLIP_X_SHIFT) | (0 << R300_CLIP_Y_SHIFT))); diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 99020a40..8dbbee94 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -1940,8 +1940,12 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, /* Clear out scissoring */ BEGIN_ACCEL(2); - OUT_ACCEL_REG(R300_SC_SCISSOR0, ((0 << R300_SCISSOR_X_SHIFT) | - (0 << R300_SCISSOR_Y_SHIFT))); + if (IS_R300_3D) + OUT_ACCEL_REG(R300_SC_SCISSOR0, ((1440 << R300_SCISSOR_X_SHIFT) | + (1440 << R300_SCISSOR_Y_SHIFT))); + else + OUT_ACCEL_REG(R300_SC_SCISSOR0, ((0 << R300_SCISSOR_X_SHIFT) | + (0 << R300_SCISSOR_Y_SHIFT))); OUT_ACCEL_REG(R300_SC_SCISSOR1, ((8191 << R300_SCISSOR_X_SHIFT) | (8191 << R300_SCISSOR_Y_SHIFT))); FINISH_ACCEL(); diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index 41e99b14..e5a70d1b 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -2272,10 +2272,10 @@ FUNC_NAME(R300DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) */ BEGIN_ACCEL(2); /* R300 has an offset */ - OUT_ACCEL_REG(R300_SC_SCISSOR0, (((dstX + 1088) << R300_SCISSOR_X_SHIFT) | - ((dstY + 1088) << R300_SCISSOR_Y_SHIFT))); - OUT_ACCEL_REG(R300_SC_SCISSOR1, (((dstX + dstw + 1088 - 1) << R300_SCISSOR_X_SHIFT) | - ((dstY + dsth + 1088 - 1) << R300_SCISSOR_Y_SHIFT))); + OUT_ACCEL_REG(R300_SC_SCISSOR0, (((dstX + 1440) << R300_SCISSOR_X_SHIFT) | + ((dstY + 1440) << R300_SCISSOR_Y_SHIFT))); + OUT_ACCEL_REG(R300_SC_SCISSOR1, (((dstX + dstw + 1440 - 1) << R300_SCISSOR_X_SHIFT) | + ((dstY + dsth + 1440 - 1) << R300_SCISSOR_Y_SHIFT))); FINISH_ACCEL(); #ifdef ACCEL_CP |