diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-06-09 14:39:54 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-06-09 14:39:54 -0400 |
commit | 43374c7420e378918bec062f4cbd581f16adb6f0 (patch) | |
tree | e9279c0d952f3b5bd4ed4215bd476481fb2409b9 /src/radeon_exa_render.c | |
parent | 74b0a38c75c1d6a6344015d32d84b43d9e80df1d (diff) |
r1xx/r2xx: clip 3D rendering to destination buffer
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r-- | src/radeon_exa_render.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 7885eb9a..4610d804 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -598,7 +598,7 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, info->accel_state->is_transform[1] = FALSE; } - BEGIN_ACCEL(8); + BEGIN_ACCEL(10); OUT_ACCEL_REG(RADEON_PP_CNTL, pp_cntl); OUT_ACCEL_REG(RADEON_RB3D_CNTL, dst_format | RADEON_ALPHA_BLEND_ENABLE); OUT_ACCEL_REG(RADEON_RB3D_COLOROFFSET, dst_offset); @@ -650,6 +650,10 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op, blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format); OUT_ACCEL_REG(RADEON_RB3D_BLENDCNTL, blendcntl); + + OUT_ACCEL_REG(RADEON_RE_TOP_LEFT, 0); + OUT_ACCEL_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width) << RADEON_RE_WIDTH_SHIFT) | + ((pDst->drawable.height) << RADEON_RE_HEIGHT_SHIFT))); FINISH_ACCEL(); return TRUE; @@ -918,7 +922,7 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, info->accel_state->is_transform[1] = FALSE; } - BEGIN_ACCEL(11); + BEGIN_ACCEL(13); OUT_ACCEL_REG(RADEON_PP_CNTL, pp_cntl); OUT_ACCEL_REG(RADEON_RB3D_CNTL, dst_format | RADEON_ALPHA_BLEND_ENABLE); @@ -978,6 +982,11 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, /* Op operator. */ blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format); OUT_ACCEL_REG(RADEON_RB3D_BLENDCNTL, blendcntl); + + OUT_ACCEL_REG(RADEON_RE_TOP_LEFT, 0); + OUT_ACCEL_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width) << RADEON_RE_WIDTH_SHIFT) | + ((pDst->drawable.height) << RADEON_RE_HEIGHT_SHIFT))); + FINISH_ACCEL(); return TRUE; |