xf86-video-intel: 5 commits - src/i915_render.c uxa/uxa-accel.c uxa/uxa-render.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri May 14 16:52:10 PDT 2010
src/i915_render.c | 5 +
uxa/uxa-accel.c | 12 ++--
uxa/uxa-render.c | 147 +++++++++++++++++++++++++++---------------------------
3 files changed, 87 insertions(+), 77 deletions(-)
New commits:
commit 95654cffa8643f61f153218f27e800df75b9bdee
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat May 15 00:50:42 2010 +0100
uxa: Fix order of conditionals to only run fill_region for SRC or opaque
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index abbd3cf..fbecf00 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -1430,79 +1430,79 @@ uxa_composite(CARD8 op,
if (ret == 1)
goto done;
} else if (compatible_formats (op, pDst, pSrc) &&
- !pSrc->repeat &&
- transform_is_integer_translation(pSrc->transform, &tx, &ty) &&
- drawable_contains(pSrc->pDrawable,
+ transform_is_integer_translation(pSrc->transform, &tx, &ty)) {
+ if (!pSrc->repeat &&
+ drawable_contains(pSrc->pDrawable,
xSrc + tx, ySrc + ty,
width, height)) {
- xDst += pDst->pDrawable->x;
- yDst += pDst->pDrawable->y;
- xSrc += pSrc->pDrawable->x + tx;
- ySrc += pSrc->pDrawable->y + ty;
-
- if (!miComputeCompositeRegion
- (®ion, pSrc, pMask, pDst, xSrc, ySrc,
- xMask, yMask, xDst, yDst, width, height))
- goto done;
-
- uxa_copy_n_to_n(pSrc->pDrawable,
- pDst->pDrawable, NULL,
- REGION_RECTS(®ion),
- REGION_NUM_RECTS(®ion),
- xSrc - xDst, ySrc - yDst, FALSE,
- FALSE, 0, NULL);
- REGION_UNINIT(pDst->pDrawable->pScreen,
- ®ion);
- goto done;
- } else if (pSrc->pDrawable->type == DRAWABLE_PIXMAP &&
- pSrc->repeatType == RepeatNormal &&
- transform_is_integer_translation(pSrc->transform, &tx, &ty)) {
- DDXPointRec patOrg;
-
- /* Let's see if the driver can do the repeat
- * in one go
- */
- if (uxa_screen->info->prepare_composite) {
- ret = uxa_try_driver_composite(op, pSrc,
- pMask, pDst,
- xSrc, ySrc,
- xMask, yMask,
- xDst, yDst,
- width, height);
- if (ret == 1)
+ xDst += pDst->pDrawable->x;
+ yDst += pDst->pDrawable->y;
+ xSrc += pSrc->pDrawable->x + tx;
+ ySrc += pSrc->pDrawable->y + ty;
+
+ if (!miComputeCompositeRegion
+ (®ion, pSrc, pMask, pDst, xSrc, ySrc,
+ xMask, yMask, xDst, yDst, width, height))
goto done;
- }
- /* Now see if we can use
- * uxa_fill_region_tiled()
- */
- xDst += pDst->pDrawable->x;
- yDst += pDst->pDrawable->y;
- xSrc += pSrc->pDrawable->x + tx;
- ySrc += pSrc->pDrawable->y + ty;
-
- if (!miComputeCompositeRegion
- (®ion, pSrc, pMask, pDst, xSrc, ySrc,
- xMask, yMask, xDst, yDst, width, height))
+ uxa_copy_n_to_n(pSrc->pDrawable,
+ pDst->pDrawable, NULL,
+ REGION_RECTS(®ion),
+ REGION_NUM_RECTS(®ion),
+ xSrc - xDst, ySrc - yDst, FALSE,
+ FALSE, 0, NULL);
+ REGION_UNINIT(pDst->pDrawable->pScreen,
+ ®ion);
goto done;
+ } else if (pSrc->repeat && pSrc->repeatType == RepeatNormal &&
+ pSrc->pDrawable->type == DRAWABLE_PIXMAP) {
+ DDXPointRec patOrg;
+
+ /* Let's see if the driver can do the repeat
+ * in one go
+ */
+ if (uxa_screen->info->prepare_composite) {
+ ret = uxa_try_driver_composite(op, pSrc,
+ pMask, pDst,
+ xSrc, ySrc,
+ xMask, yMask,
+ xDst, yDst,
+ width, height);
+ if (ret == 1)
+ goto done;
+ }
- /* pattern origin is the point in the
- * destination drawable
- * corresponding to (0,0) in the source */
- patOrg.x = xDst - xSrc;
- patOrg.y = yDst - ySrc;
+ /* Now see if we can use
+ * uxa_fill_region_tiled()
+ */
+ xDst += pDst->pDrawable->x;
+ yDst += pDst->pDrawable->y;
+ xSrc += pSrc->pDrawable->x + tx;
+ ySrc += pSrc->pDrawable->y + ty;
+
+ if (!miComputeCompositeRegion
+ (®ion, pSrc, pMask, pDst, xSrc, ySrc,
+ xMask, yMask, xDst, yDst, width, height))
+ goto done;
- ret = uxa_fill_region_tiled(pDst->pDrawable,
- ®ion,
- (PixmapPtr) pSrc->
- pDrawable, &patOrg,
- FB_ALLONES, GXcopy);
+ /* pattern origin is the point in the
+ * destination drawable
+ * corresponding to (0,0) in the source */
+ patOrg.x = xDst - xSrc;
+ patOrg.y = yDst - ySrc;
- REGION_UNINIT(pDst->pDrawable->pScreen,
- ®ion);
+ ret = uxa_fill_region_tiled(pDst->pDrawable,
+ ®ion,
+ (PixmapPtr) pSrc->
+ pDrawable, &patOrg,
+ FB_ALLONES, GXcopy);
- if (ret)
- goto done;
+ REGION_UNINIT(pDst->pDrawable->pScreen,
+ ®ion);
+
+ if (ret)
+ goto done;
+ }
}
}
commit f67b45965b527699794ee21174809c5d71c03f22
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat May 15 00:50:20 2010 +0100
uxa: Expand the range of compatible formats to cover all bpp.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 1ded55e..abbd3cf 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -1320,10 +1320,13 @@ compatible_formats (CARD8 op, PicturePtr dst, PicturePtr src)
if (src->format == dst->format)
return 1;
- if (src->format == PICT_a8r8g8b8 && dst->format == PICT_x8r8g8b8)
- return 1;
-
- if (src->format == PICT_a8b8g8r8 && dst->format == PICT_x8b8g8r8)
+ /* Is the destination an alpha-less version of source? */
+ if (dst->format == PICT_FORMAT(PICT_FORMAT_BPP(src->format),
+ PICT_FORMAT_TYPE(src->format),
+ 0,
+ PICT_FORMAT_R(src->format),
+ PICT_FORMAT_G(src->format),
+ PICT_FORMAT_B(src->format)))
return 1;
/* XXX xrgb is promoted to argb during image upload... */
@@ -1332,11 +1335,10 @@ compatible_formats (CARD8 op, PicturePtr dst, PicturePtr src)
return 1;
#endif
} else if (op == PictOpOver) {
- if (src->format != dst->format)
+ if (PICT_FORMAT_A(src->format))
return 0;
- if (src->format == PICT_x8r8g8b8 || src->format == PICT_x8b8g8r8)
- return 1;
+ return src->format == dst->format;
}
return 0;
commit 82d07fdf10cac2211af74ebf7d519daacd7084c0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat May 15 00:49:39 2010 +0100
uxa: Only use 1x1R as a solid with an opaque format or SRC
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 010d663..1ded55e 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -1419,7 +1419,8 @@ uxa_composite(CARD8 op,
}
} else if (pSrc->pDrawable->width == 1 &&
pSrc->pDrawable->height == 1 &&
- pSrc->repeat) {
+ pSrc->repeat &&
+ (op == PictOpSrc || (op == PictOpOver && !PICT_FORMAT_A(pSrc->format)))) {
ret = uxa_try_driver_solid_fill(pSrc, pDst,
xSrc, ySrc,
xDst, yDst,
commit 3bca186a7ead84d4f0e71dfd83847ef77a4e390b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat May 15 00:48:31 2010 +0100
uxa: Call check_solid before running the solid blitter.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 9f4a89a..cfc2d38 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -909,12 +909,16 @@ uxa_fill_region_solid(DrawablePtr pDrawable,
int xoff, yoff;
Bool ret = FALSE;
- uxa_get_drawable_deltas(pDrawable, pPixmap, &xoff, &yoff);
+ if (uxa_screen->info->check_solid && !uxa_screen->info->check_solid(pDrawable, alu, planemask))
+ return FALSE;
+
+ pPixmap = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff);
+ if (!pPixmap)
+ return FALSE;
+
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
- if (uxa_pixmap_is_offscreen(pPixmap) &&
- (*uxa_screen->info->prepare_solid) (pPixmap, alu, planemask, pixel))
- {
+ if ((*uxa_screen->info->prepare_solid) (pPixmap, alu, planemask, pixel)) {
int nbox;
BoxPtr pBox;
commit 213816c30b5ca6146e26ded85b2aa31ca16ca9bf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat May 15 00:47:55 2010 +0100
i915: Load texture into directly into OC when possible.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/i915_render.c b/src/i915_render.c
index baaa58d..59d9248 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -627,12 +627,14 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
if (dst_format == COLR_BUF_8BIT)
src_reg = FS_R0;
else
- src_reg = FS_R0;
+ src_reg = FS_OC;
+
if (is_affine_src)
i915_fs_texld(src_reg, FS_S0, FS_T0);
else
i915_fs_texldp(src_reg, FS_S0, FS_T0);
}
+
if (src_reg != FS_OC) {
if (dst_format == COLR_BUF_8BIT)
i915_fs_mov(FS_OC, i915_fs_operand(src_reg, W, W, W, W));
@@ -647,6 +649,7 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
i915_fs_dcl(FS_T0 + t);
i915_fs_dcl(FS_S0 + t);
}
+
if (! is_solid_src) {
/* Load the source_picture texel */
if (is_affine_src) {
More information about the xorg-commit
mailing list