summaryrefslogtreecommitdiff
path: root/src/radeon_textured_videofuncs.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-05-15 16:35:13 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-05-15 16:35:13 -0400
commit76fffd51027820b3a6ea10de2be67d5fd4f3e843 (patch)
tree410642640aadaa8b6b55adc66144ccad58d94bb1 /src/radeon_textured_videofuncs.c
parent1a1eef31e36f98b7a30e27e567c1b66e0e4cf7dc (diff)
R100: switch to normalized texture coordinates
for consistency with the other asics
Diffstat (limited to 'src/radeon_textured_videofuncs.c')
-rw-r--r--src/radeon_textured_videofuncs.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index 8ead2a40..227e19ac 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -398,30 +398,30 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv
srcw = (pPriv->src_w * dstw) / pPriv->dst_w;
srch = (pPriv->src_h * dsth) / pPriv->dst_h;
+
if (isplanar) {
/*
* Just render a rect (using three coords).
- * Filter is a bit a misnomer, it's just texcoords...
*/
- VTX_OUT_6((float)dstX, (float)(dstY + dsth),
- (float)srcX, (float)(srcY + srch),
- (float)srcX, (float)(srcY + (srch / 2)));
- VTX_OUT_6((float)(dstX + dstw), (float)(dstY + dsth),
- (float)(srcX + srcw), (float)(srcY + srch),
- (float)(srcX + (srcw / 2)), (float)(srcY + (srch / 2)));
- VTX_OUT_6((float)(dstX + dstw), (float)dstY,
- (float)(srcX + srcw), (float)srcY,
- (float)(srcX + (srcw / 2)), (float)srcY);
+ VTX_OUT_6((float)dstX, (float)(dstY + dsth),
+ (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h,
+ (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h);
+ VTX_OUT_6((float)(dstX + dstw), (float)(dstY + dsth),
+ (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h,
+ (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h);
+ VTX_OUT_6((float)(dstX + dstw), (float)dstY,
+ (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h,
+ (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h);
} else {
/*
* Just render a rect (using three coords).
*/
- VTX_OUT_4((float)dstX, (float)(dstY + dsth),
- (float)srcX, (float)(srcY + srch));
- VTX_OUT_4((float)(dstX + dstw), (float)(dstY + dsth),
- (float)(srcX + srcw), (float)(srcY + srch));
- VTX_OUT_4((float)(dstX + dstw), (float)dstY,
- (float)(srcX + srcw), (float)srcY);
+ VTX_OUT_4((float)dstX, (float)(dstY + dsth),
+ (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h);
+ VTX_OUT_4((float)(dstX + dstw), (float)(dstY + dsth),
+ (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h);
+ VTX_OUT_4((float)(dstX + dstw), (float)dstY,
+ (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h);
}
pBox++;