diff options
author | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2006-07-21 01:02:38 +0800 |
---|---|---|
committer | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2006-07-21 01:02:38 +0800 |
commit | 4737955a62c39177e7a7ce7749a2f20e111afc68 (patch) | |
tree | ea452a095a57374d39d84ba0e683b4932052496a | |
parent | a7e30bb051bc03063fe699473610a57054a64973 (diff) |
move i830 default coord set into I830EmitInvarientState
-rw-r--r-- | src/i830_3d.c | 10 | ||||
-rw-r--r-- | src/i830_exa_render.c | 21 |
2 files changed, 7 insertions, 24 deletions
diff --git a/src/i830_3d.c b/src/i830_3d.c index 0efd6e43..214beb60 100644 --- a/src/i830_3d.c +++ b/src/i830_3d.c @@ -33,13 +33,11 @@ #include "i830_reg.h" -#define CMD_3D (0x3<<29) - void I830EmitInvarientState( ScrnInfoPtr pScrn ) { I830Ptr pI830 = I830PTR(pScrn); - BEGIN_LP_RING(38); + BEGIN_LP_RING(40); OUT_RING(_3DSTATE_MAP_CUBE | MAP_UNIT(0)); OUT_RING(_3DSTATE_MAP_CUBE | MAP_UNIT(1)); @@ -98,6 +96,12 @@ void I830EmitInvarientState( ScrnInfoPtr pScrn ) OUT_RING(_3DSTATE_MAP_COORD_TRANSFORM); OUT_RING(DISABLE_TEX_TRANSFORM | TEXTURE_SET(3)); + OUT_RING(_3DSTATE_MAP_COORD_SETBIND_CMD); + OUT_RING(TEXBIND_SET3(TEXCOORDSRC_VTXSET_3) | + TEXBIND_SET2(TEXCOORDSRC_VTXSET_2) | + TEXBIND_SET1(TEXCOORDSRC_VTXSET_1) | + TEXBIND_SET0(TEXCOORDSRC_VTXSET_0)); + OUT_RING(_3DSTATE_RASTER_RULES_CMD | ENABLE_POINT_RASTER_RULE | OGL_POINT_RASTER_RULE | diff --git a/src/i830_exa_render.c b/src/i830_exa_render.c index f51e6a4e..7a22e7d5 100644 --- a/src/i830_exa_render.c +++ b/src/i830_exa_render.c @@ -365,25 +365,6 @@ I830EXACheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, return TRUE; } - -static void -I830DefCtxSetup(ScrnInfoPtr pScrn) -{ - /* coord binding */ - CARD32 mcb; - I830Ptr pI830 = I830PTR(pScrn); - - BEGIN_LP_RING(2); - OUT_RING(_3DSTATE_MAP_COORD_SETBIND_CMD); - mcb = TEXBIND_SET3(TEXCOORDSRC_VTXSET_3); - mcb |= TEXBIND_SET2(TEXCOORDSRC_VTXSET_2); - mcb |= TEXBIND_SET1(TEXCOORDSRC_VTXSET_1); - mcb |= TEXBIND_SET0(TEXCOORDSRC_VTXSET_0); - OUT_RING(mcb); - ADVANCE_LP_RING(); -} - - Bool I830EXAPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, @@ -400,8 +381,6 @@ I830EXAPrepareComposite(int op, PicturePtr pSrcPicture, draw_coords[2][0] = pDst->drawable.x; draw_coords[2][1] = pDst->drawable.y; - I830DefCtxSetup(pScrn); - if (!I830TextureSetup(pSrcPicture, pSrc, 0)) I830FALLBACK("fail to setup src texture\n"); if (pMask != NULL) { |