xf86-video-intel: Branch 'exa' - 2 commits - src/i830_exa.c src/i915_exa_render.c

Zhenyu Wang zhen at kemper.freedesktop.org
Wed Jul 19 22:47:08 PDT 2006


 src/i830_exa.c        |   58 ++++++++++++++++++++++----------------------------
 src/i915_exa_render.c |   16 -------------
 2 files changed, 26 insertions(+), 48 deletions(-)

New commits:
diff-tree 3e86bf4273241daa23645f5a8104913e4205a74b (from 5c945bf9eb9f5bedd34d98dcc7abc3f1ea3cb962)
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Thu Jul 20 13:43:27 2006 +0800

    remove i915 default ctx setup.

diff --git a/src/i915_exa_render.c b/src/i915_exa_render.c
index 4912d97..ba54d53 100644
--- a/src/i915_exa_render.c
+++ b/src/i915_exa_render.c
@@ -318,20 +318,6 @@ I915TextureSetup(PicturePtr pPict, Pixma
     return TRUE;
 }
 
-static void
-I915DefCtxSetup(ScrnInfoPtr pScrn)
-{
-    I830Ptr pI830 = I830PTR(pScrn);
-
-    BEGIN_LP_RING(2);
-    /* set default texture binding, may be in prepare better */
-    OUT_RING(_3DSTATE_COORD_SET_BINDINGS | CSB_TCB(0,0) | CSB_TCB(1,1) |
-	CSB_TCB(2,2) | CSB_TCB(3,3) | CSB_TCB(4,4) | CSB_TCB(5,5) |
-	CSB_TCB(6,6) | CSB_TCB(7,7));
-    OUT_RING(0);
-    ADVANCE_LP_RING();
-}
-
 Bool
 I915EXAPrepareComposite(int op, PicturePtr pSrcPicture,
 			PicturePtr pMaskPicture, PicturePtr pDstPicture,
@@ -353,8 +339,6 @@ ErrorF("i915 prepareComposite\n");
     scale_units[2][1] = pDst->drawable.height;
     FS_LOCALS(20);
     
-    I915DefCtxSetup(pScrn);
-
     if (!I915TextureSetup(pSrcPicture, pSrc, 0))
 	I830FALLBACK("fail to setup src texture\n");
     if (pMask != NULL) {
diff-tree 5c945bf9eb9f5bedd34d98dcc7abc3f1ea3cb962 (from d5243d1b35ab1db608c81889819e4d4d87048154)
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Thu Jul 20 13:40:39 2006 +0800

    Revert "Fix several size error with STATE3D_LOAD_STATE_IMMEDIATE cmd."
    
    This reverts commit 433cb6ba82698676f6f72e09834aba4d64611d54.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 3975e6d..40f6868 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -55,7 +55,7 @@ do { 							\
 } while(0) 
 #endif
 
-float scale_units[3][2];
+float scale_units[2][2];
 int draw_coords[3][2];
 
 const int I830CopyROP[16] =
@@ -101,7 +101,7 @@ const int I830PatternROP[16] =
 /* move to common.h */
 union intfloat {
 	float f;
-	CARD32 ui;
+	unsigned int ui;
 };
 
 #define OUT_RING_F(x) do {			\
@@ -429,7 +429,6 @@ IntelEXAComposite(PixmapPtr pDst, int sr
     int srcXend, srcYend, maskXend, maskYend;
     PictVector v;
     int pMask = 1;
-    float src_scale_x, src_scale_y, mask_scale_x, mask_scale_y;
 
     DPRINTF(PFX, "Composite: srcX %d, srcY %d\n\t maskX %d, maskY %d\n\t"
 	     "dstX %d, dstY %d\n\twidth %d, height %d\n\t"
@@ -484,14 +483,9 @@ IntelEXAComposite(PixmapPtr pDst, int sr
 
     draw_coords[0][0] -= draw_coords[2][0];
     draw_coords[0][1] -= draw_coords[2][1];
-    src_scale_x = (float)scale_units[0][0] / (float)scale_units[2][0];
-    src_scale_y = (float)scale_units[0][1] / (float)scale_units[2][1];
-
     if (pMask) {
 	draw_coords[1][0] -= draw_coords[2][0];
 	draw_coords[1][1] -= draw_coords[2][1];
-	mask_scale_x = (float)scale_units[1][0] / (float)scale_units[2][0];
-	mask_scale_y = (float)scale_units[1][1] / (float)scale_units[2][1];
     }
 
     {
@@ -512,40 +506,40 @@ IntelEXAComposite(PixmapPtr pDst, int sr
 
 	OUT_RING(PRIM3D_INLINE | PRIM3D_TRIFAN | (vertex_count-1));
 
-	OUT_RING_F(dstX);
-	OUT_RING_F(dstY);
-	OUT_RING_F(((srcX - draw_coords[0][0]) * src_scale_x));
-	OUT_RING_F(((srcY - draw_coords[0][1]) * src_scale_y));
+	OUT_RING(dstX);
+	OUT_RING(dstY);
+	OUT_RING_F(((srcX - draw_coords[0][0]) / scale_units[0][0]));
+	OUT_RING_F(((srcY - draw_coords[0][1]) / scale_units[0][1]));
 	if (pMask) {
-		OUT_RING_F(((maskX - draw_coords[1][0]) * mask_scale_x));
-		OUT_RING_F(((maskY - draw_coords[1][1]) * mask_scale_y));
+		OUT_RING_F(((maskX - draw_coords[1][0]) / scale_units[1][0]));
+		OUT_RING_F(((maskY - draw_coords[1][1]) / scale_units[1][1]));
 	}
 
-	OUT_RING_F(dstX);
-	OUT_RING_F((dstY+h));
-	OUT_RING_F(((srcX - draw_coords[0][0]) * src_scale_x));
-	OUT_RING_F(((srcYend - draw_coords[0][1]) * src_scale_y));
+	OUT_RING(dstX);
+	OUT_RING((dstY+h));
+	OUT_RING_F(((srcX - draw_coords[0][0]) / scale_units[0][0]));
+	OUT_RING_F(((srcYend - draw_coords[0][1]) / scale_units[0][1]));
 	if (pMask) {
-		OUT_RING_F(((maskX - draw_coords[1][0]) * mask_scale_x));
-		OUT_RING_F(((maskYend - draw_coords[1][1]) * mask_scale_y));
+		OUT_RING_F(((maskX - draw_coords[1][0]) / scale_units[1][0]));
+		OUT_RING_F(((maskYend - draw_coords[1][1]) / scale_units[1][1]));
 	}
 
-	OUT_RING_F((dstX+w));
-	OUT_RING_F((dstY+h));
-	OUT_RING_F(((srcXend - draw_coords[0][0]) * src_scale_x));
-	OUT_RING_F(((srcYend - draw_coords[0][1]) * src_scale_y));
+	OUT_RING((dstX+w));
+	OUT_RING((dstY+h));
+	OUT_RING_F(((srcXend - draw_coords[0][0]) / scale_units[0][0]));
+	OUT_RING_F(((srcYend - draw_coords[0][1]) / scale_units[0][1]));
 	if (pMask) {
-		OUT_RING_F(((maskXend - draw_coords[1][0]) * mask_scale_x));
-		OUT_RING_F(((maskYend - draw_coords[1][1]) * mask_scale_y));
+		OUT_RING_F(((maskXend - draw_coords[1][0]) / scale_units[1][0]));
+		OUT_RING_F(((maskYend - draw_coords[1][1]) / scale_units[1][1]));
 	}
 
-	OUT_RING_F((dstX+w));
-	OUT_RING_F((dstY));
-	OUT_RING_F(((srcXend - draw_coords[0][0]) * src_scale_x));
-	OUT_RING_F(((srcY - draw_coords[0][1]) * src_scale_y));
+	OUT_RING((dstX+w));
+	OUT_RING((dstY));
+	OUT_RING_F(((srcXend - draw_coords[0][0]) / scale_units[0][0]));
+	OUT_RING_F(((srcY - draw_coords[0][1]) / scale_units[0][1]));
 	if (pMask) {
-		OUT_RING_F(((maskXend - draw_coords[1][0]) * mask_scale_x));
-		OUT_RING_F(((maskY - draw_coords[1][1]) * mask_scale_y));
+		OUT_RING_F(((maskXend - draw_coords[1][0]) / scale_units[1][0]));
+		OUT_RING_F(((maskY - draw_coords[1][1]) / scale_units[1][1]));
 	}
 	ADVANCE_LP_RING();
     }



More information about the xorg-commit mailing list