diff options
author | Pierre Ossman <pierre@ossman.eu> | 2008-12-05 17:52:02 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-12-05 17:52:02 -0500 |
commit | b89d434011787fb71593395f462d142375783e35 (patch) | |
tree | 77058910aa66937c8590c6467d190fab8111ac2b | |
parent | 83c1115333cbe763f86422fa5aabf4ab21951e68 (diff) |
Fix scissor setup for Xv
We need to adjust the scissoring for each clip box, so move the setup
to inside the while loop.
-rw-r--r-- | src/radeon_textured_videofuncs.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index e324fd96..908f4b67 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -1475,6 +1475,17 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv } } + FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap, + radeon_covering_crtc_num(pScrn, + pPriv->drw_x, + pPriv->drw_x + pPriv->dst_w, + pPriv->drw_y, + pPriv->drw_y + pPriv->dst_h, + pPriv->desired_crtc), + pPriv->drw_y, + pPriv->drw_y + pPriv->dst_h, + pPriv->vsync); + /* * Rendering of the actual polygon is done in two different * ways depending on chip generation: @@ -1492,38 +1503,6 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv * functionality to restrict it to the desired rectangle. */ - if (IS_R300_3D || IS_R500_3D) { - /* - * Set up the scissor area to that of the output size. - */ - - BEGIN_ACCEL(2); - if (IS_R300_3D) { - /* R300 has an offset */ - OUT_ACCEL_REG(R300_SC_SCISSOR0, (((pPriv->drw_x + 1088) << R300_SCISSOR_X_SHIFT) | - ((pPriv->drw_y + 1088) << R300_SCISSOR_Y_SHIFT))); - OUT_ACCEL_REG(R300_SC_SCISSOR1, (((pPriv->drw_x + pPriv->dst_w + 1088 - 1) << R300_SCISSOR_X_SHIFT) | - ((pPriv->drw_y + pPriv->dst_h + 1088 - 1) << R300_SCISSOR_Y_SHIFT))); - } else { - OUT_ACCEL_REG(R300_SC_SCISSOR0, (((pPriv->drw_x) << R300_SCISSOR_X_SHIFT) | - ((pPriv->drw_y) << R300_SCISSOR_Y_SHIFT))); - OUT_ACCEL_REG(R300_SC_SCISSOR1, (((pPriv->drw_x + pPriv->dst_w - 1) << R300_SCISSOR_X_SHIFT) | - ((pPriv->drw_y + pPriv->dst_h - 1) << R300_SCISSOR_Y_SHIFT))); - } - FINISH_ACCEL(); - } - - FUNC_NAME(RADEONWaitForVLine)(pScrn, pPixmap, - radeon_covering_crtc_num(pScrn, - pPriv->drw_x, - pPriv->drw_x + pPriv->dst_w, - pPriv->drw_y, - pPriv->drw_y + pPriv->dst_h, - pPriv->desired_crtc), - pPriv->drw_y, - pPriv->drw_y + pPriv->dst_h, - pPriv->vsync); - while (nBox--) { int srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; @@ -1545,6 +1524,27 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv ErrorF("src: %d, %d, %d, %d\n", srcX, srcY, srcw, srch); #endif + if (IS_R300_3D || IS_R500_3D) { + /* + * Set up the scissor area to that of the output size. + */ + + BEGIN_ACCEL(2); + if (IS_R300_3D) { + /* 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))); + } else { + OUT_ACCEL_REG(R300_SC_SCISSOR0, (((dstX) << R300_SCISSOR_X_SHIFT) | + ((dstY) << R300_SCISSOR_Y_SHIFT))); + OUT_ACCEL_REG(R300_SC_SCISSOR1, (((dstX + dstw - 1) << R300_SCISSOR_X_SHIFT) | + ((dstY + dsth - 1) << R300_SCISSOR_Y_SHIFT))); + } + FINISH_ACCEL(); + } + #ifdef ACCEL_CP if (info->ChipFamily < CHIP_FAMILY_R200) { BEGIN_RING(3 * vtx_count + 3); |