diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-04-13 17:21:20 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-04-17 10:24:59 -0400 |
commit | ec0cb51df81c6c9a1de640d227fa9c9c33161083 (patch) | |
tree | df10564dbe7992b65ecf23011157933a001d71cd /src/radeon_textured_videofuncs.c | |
parent | fde075a30a8ee2c333aa1bbe8fbd177258b085ba (diff) |
R2xx tex vid: append verts for clip boxes
rather than sending a new draw packet for each rect
Diffstat (limited to 'src/radeon_textured_videofuncs.c')
-rw-r--r-- | src/radeon_textured_videofuncs.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index d5cf47cc..360532ef 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -880,6 +880,21 @@ FUNC_NAME(R200DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) * render as a quad. */ +#ifdef ACCEL_CP + BEGIN_RING(nBox * 3 * vtx_count + 2); + OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, + nBox * 3 * vtx_count)); + OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | + RADEON_CP_VC_CNTL_PRIM_WALK_RING | + ((nBox * 3) << RADEON_CP_VC_CNTL_NUM_SHIFT)); +#else /* ACCEL_CP */ + BEGIN_ACCEL(nBox * 3 * vtx_count + 1); + OUT_ACCEL_REG(RADEON_SE_VF_CNTL, (RADEON_VF_PRIM_TYPE_RECTANGLE_LIST | + RADEON_VF_PRIM_WALK_DATA | + ((nBox * 3) << RADEON_VF_NUM_VERTICES_SHIFT))); + +#endif + while (nBox--) { int srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; @@ -896,20 +911,6 @@ FUNC_NAME(R200DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) srcw = (pPriv->src_w * dstw) / pPriv->dst_w; srch = (pPriv->src_h * dsth) / pPriv->dst_h; -#ifdef ACCEL_CP - BEGIN_RING(3 * vtx_count + 2); - OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, - 3 * vtx_count)); - OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | - RADEON_CP_VC_CNTL_PRIM_WALK_RING | - (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); -#else /* ACCEL_CP */ - BEGIN_ACCEL(1 + vtx_count * 3); - OUT_ACCEL_REG(RADEON_SE_VF_CNTL, (RADEON_VF_PRIM_TYPE_RECTANGLE_LIST | - RADEON_VF_PRIM_WALK_DATA | - (3 << RADEON_VF_NUM_VERTICES_SHIFT))); - -#endif if (isplanar) { /* * Just render a rect (using three coords). @@ -936,15 +937,15 @@ FUNC_NAME(R200DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) (float)(srcX + srcw) / info->accel_state->texW[0], (float)srcY / info->accel_state->texH[0]); } + pBox++; + } + #ifdef ACCEL_CP ADVANCE_RING(); #else FINISH_ACCEL(); #endif /* !ACCEL_CP */ - pBox++; - } - BEGIN_ACCEL(1); OUT_ACCEL_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); FINISH_ACCEL(); |