summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2008-02-19 20:47:40 -0500
committerAlex Deucher <alex@botch2.(none)>2008-02-19 20:47:40 -0500
commitb5bd442b60dbc72fe4c1e928ab864aeb0fd7a3cb (patch)
tree9cc7a1c9c96c5490ea22470f01e2a598f9f974a1
parenta0a73208a21546ac120fb9a463261836c9ea7b55 (diff)
R100: fix render accel for transforms
Not sure why we had a separate broken path for r100 vertex submission.
-rw-r--r--src/radeon_exa_render.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 60035872..da1fa47f 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -1103,7 +1103,6 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
int w, int h)
{
RINFO_FROM_SCREEN(pDst->drawable.pScreen);
- int srcXend, srcYend, maskXend, maskYend;
int vtx_count;
xPointFixed srcTopLeft, srcTopRight, srcBottomLeft, srcBottomRight;
xPointFixed maskTopLeft, maskTopRight, maskBottomLeft, maskBottomRight;
@@ -1114,11 +1113,6 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
/* ErrorF("RadeonComposite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n",
srcX, srcY, maskX, maskY,dstX, dstY, w, h); */
- srcXend = srcX + w;
- srcYend = srcY + h;
- maskXend = maskX + w;
- maskYend = maskY + h;
-
srcTopLeft.x = IntToxFixed(srcX);
srcTopLeft.y = IntToxFixed(srcY);
srcTopRight.x = IntToxFixed(srcX + w);
@@ -1202,26 +1196,18 @@ static void FUNC_NAME(RadeonComposite)(PixmapPtr pDst,
}
#endif
- if (info->texW[0] == 1 && info->texH[0] == 1 &&
- info->texW[1] == 1 && info->texH[1] == 1) {
- VTX_OUT(dstX, dstY, srcX, srcY, maskX, maskY);
- VTX_OUT(dstX, dstY + h, srcX, srcYend, maskX, maskYend);
- VTX_OUT(dstX + w, dstY + h, srcXend, srcYend, maskXend, maskYend);
- VTX_OUT(dstX + w, dstY, srcXend, srcY, maskXend, maskY);
- } else {
- VTX_OUT((float)dstX, (float)dstY,
- xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0],
- xFixedToFloat(maskTopLeft.x) / info->texW[1], xFixedToFloat(maskTopLeft.y) / info->texH[1]);
- VTX_OUT((float)dstX, (float)(dstY + h),
- xFixedToFloat(srcBottomLeft.x) / info->texW[0], xFixedToFloat(srcBottomLeft.y) / info->texH[0],
- xFixedToFloat(maskBottomLeft.x) / info->texW[1], xFixedToFloat(maskBottomLeft.y) / info->texH[1]);
- VTX_OUT((float)(dstX + w), (float)(dstY + h),
- xFixedToFloat(srcBottomRight.x) / info->texW[0], xFixedToFloat(srcBottomRight.y) / info->texH[0],
- xFixedToFloat(maskBottomRight.x) / info->texW[1], xFixedToFloat(maskBottomRight.y) / info->texH[1]);
- VTX_OUT((float)(dstX + w), (float)dstY,
- xFixedToFloat(srcTopRight.x) / info->texW[0], xFixedToFloat(srcTopRight.y) / info->texH[0],
- xFixedToFloat(maskTopRight.x) / info->texW[1], xFixedToFloat(maskTopRight.y) / info->texH[1]);
- }
+ VTX_OUT((float)dstX, (float)dstY,
+ xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0],
+ xFixedToFloat(maskTopLeft.x) / info->texW[1], xFixedToFloat(maskTopLeft.y) / info->texH[1]);
+ VTX_OUT((float)dstX, (float)(dstY + h),
+ xFixedToFloat(srcBottomLeft.x) / info->texW[0], xFixedToFloat(srcBottomLeft.y) / info->texH[0],
+ xFixedToFloat(maskBottomLeft.x) / info->texW[1], xFixedToFloat(maskBottomLeft.y) / info->texH[1]);
+ VTX_OUT((float)(dstX + w), (float)(dstY + h),
+ xFixedToFloat(srcBottomRight.x) / info->texW[0], xFixedToFloat(srcBottomRight.y) / info->texH[0],
+ xFixedToFloat(maskBottomRight.x) / info->texW[1], xFixedToFloat(maskBottomRight.y) / info->texH[1]);
+ VTX_OUT((float)(dstX + w), (float)dstY,
+ xFixedToFloat(srcTopRight.x) / info->texW[0], xFixedToFloat(srcTopRight.y) / info->texH[0],
+ xFixedToFloat(maskTopRight.x) / info->texW[1], xFixedToFloat(maskTopRight.y) / info->texH[1]);
if (IS_R300_VARIANT) {
OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, 0xA);