diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2008-07-30 00:54:32 -0700 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-08-25 06:22:36 -0400 |
commit | a4ec30a677906ec2ff9824c7ddca586655f6d1a8 (patch) | |
tree | 0a9acb45670f97f88b7e38a3dd9e6631ee14f355 /src/radeon_textured_videofuncs.c | |
parent | f3b81c7582aed307fa44e134ee161cd8a3158657 (diff) |
Merge upstream changes to vertices, and also add Xv attributes for textured video, including bicubic filtering.
Diffstat (limited to 'src/radeon_textured_videofuncs.c')
-rw-r--r-- | src/radeon_textured_videofuncs.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index ce500a1d..93d48b28 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -1147,15 +1147,15 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv OUT_VIDEO_REG(R500_GA_US_VECTOR_INDEX, (1 << 16)); /* const0 = {1 / texture[0].width, 0, 0, 0} */ - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, r300PackFloat32(1.0/(float)pPriv->w)); - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, 0x0); - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, 0x0); - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, 0x0); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, (1.0/(float)pPriv->w)); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, 0x0); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, 0x0); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, 0x0); /* const1 = {0, 1 / -texture[0].height, 0, 0) */ - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, 0x0); - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, r300PackFloat32(-1.0/(float)pPriv->h)); - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, 0x0); - OUT_VIDEO_REG(R500_GA_US_VECTOR_DATA, 0x0); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, 0x0); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, (-1.0/(float)pPriv->h)); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, 0x0); + OUT_VIDEO_REG_F(R500_GA_US_VECTOR_DATA, 0x0); FINISH_VIDEO(); @@ -1490,7 +1490,7 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv if (pPriv->bicubic_enabled) { VTX_OUT_FILTER((float)dstX, (float)dstY, xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0], - xFixedToFloat(srcTopLeft.x) + 0.5, xFixedToFloat(srcTopLeft.y) + 0.5)); + xFixedToFloat(srcTopLeft.x) + 0.5, xFixedToFloat(srcTopLeft.y) + 0.5); VTX_OUT_FILTER((float)dstX, (float)dstY, xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0], xFixedToFloat(srcTopLeft.x) + 0.5, xFixedToFloat(srcTopLeft.y) + 0.5); @@ -1504,9 +1504,10 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv xFixedToFloat(srcTopRight.x) / info->texW[0], xFixedToFloat(srcTopRight.y) / info->texH[0], xFixedToFloat(srcTopRight.x) + 0.5, xFixedToFloat(srcTopRight.y) + 0.5); } else { - if (info->ChipFamily >= CHIP_FAMILY_R200) + if (info->ChipFamily >= CHIP_FAMILY_R200) { VTX_OUT((float)dstX, (float)(dstY + dsth), xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0]); + } VTX_OUT((float)dstX, (float)dstY, xFixedToFloat(srcTopLeft.x) / info->texW[0], xFixedToFloat(srcTopLeft.y) / info->texH[0]); VTX_OUT((float)dstX, (float)(dstY + dsth), |