xf86-video-intel: 3 commits - src/sna/sna_accel.c src/sna/sna_blt.c src/sna/sna_glyphs.c src/sna/sna_io.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Mar 11 05:06:11 PDT 2014
src/sna/sna_accel.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++---
src/sna/sna_blt.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/sna/sna_glyphs.c | 49 +++++++++++++++++++++++++++++++++----------------
src/sna/sna_io.c | 4 ++--
4 files changed, 128 insertions(+), 21 deletions(-)
New commits:
commit fd189c868908c81e7c57abf442ec1659efc2637a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Mar 11 11:37:01 2014 +0000
sna/glyphs: Add a smattering of DBG for validating the glyph mask
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index 8b44f1f..445d8b9 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1419,9 +1419,8 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs)
return NULL;
}
- x = 0;
- y = 0;
- for (i = 0; i < nlist; i++) {
+ x = y = 0; i = 0;
+ while (nlist--) {
BoxRec extents;
bool first = true;
int n = list->len;
@@ -1432,12 +1431,11 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs)
* If we overlap then we cannot substitute a mask as the
* rendering will be altered.
*/
- extents.x1 = 0;
- extents.y1 = 0;
- extents.x2 = 0;
- extents.y2 = 0;
-
if (format->format != list->format->format) {
+ DBG(("%s: switching formats from %x to %x\n",
+ __FUNCTION__,
+ (unsigned)format->format,
+ (unsigned)list->format->format));
format = NULL;
goto out;
}
@@ -1472,6 +1470,10 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs)
*/
if (x1 < extents.x2-1 && x2 > extents.x1+1 &&
y1 < extents.y2-1 && y2 > extents.y1+1) {
+ DBG(("%s: overlapping glyph inside line, current bbox (%d, %d), (%d, %d), glyph (%d, %d), (%d, %d)\n",
+ __FUNCTION__,
+ extents.x1, extents.y1, extents.x2, extents.y2,
+ x1, y1, x2, y2));
format = NULL;
goto out;
}
@@ -1494,16 +1496,23 @@ skip_glyph:
* the number of lists to be small, so just keep a list
* of the previous boxes and walk those.
*/
- for (j = 0; j < i; j++) {
- if (extents.x1 < list_extents[j].x2-1 &&
- extents.x2 > list_extents[j].x1+1 &&
- extents.y1 < list_extents[j].y2-1 &&
- extents.y2 > list_extents[j].y1+1) {
- format = NULL;
- goto out;
+ if (!first) {
+ for (j = 0; j < i; j++) {
+ if (extents.x1 < list_extents[j].x2-1 &&
+ extents.x2 > list_extents[j].x1+1 &&
+ extents.y1 < list_extents[j].y2-1 &&
+ extents.y2 > list_extents[j].y1+1) {
+ DBG(("%s: overlapping lines, current bbox (%d, %d), (%d, %d), previous line (%d, %d), (%d, %d)\n",
+ __FUNCTION__,
+ extents.x1, extents.y1, extents.x2, extents.y2,
+ list_extents[j].x1, list_extents[j].y1,
+ list_extents[j].x2, list_extents[j].y2));
+ format = NULL;
+ goto out;
+ }
}
+ list_extents[i++] = extents;
}
- list_extents[i] = extents;
}
out:
@@ -1521,6 +1530,11 @@ static bool can_discard_mask(uint8_t op, PicturePtr src, PictFormatPtr mask,
if (NO_DISCARD_MASK)
return false;
+ DBG(("%s: nlist=%d, mask=%08x, depth %d, op=%d (bounded? %d)\n",
+ __FUNCTION__, nlist,
+ mask ? (unsigned)mask->format : 0, mask ? mask->depth : 0,
+ op, op_is_bounded(op)));
+
if (nlist == 1 && list->len == 1)
return true;
@@ -1532,6 +1546,9 @@ static bool can_discard_mask(uint8_t op, PicturePtr src, PictFormatPtr mask,
if (mask == g)
return true;
+ DBG(("%s: preferred mask format %08x, depth %d\n",
+ __FUNCTION__, g ? (unsigned)g->format : 0, g ? g->depth : 0));
+
/* Otherwise if the glyphs are all bitmaps and we have an
* opaque source we can also render directly to the dst.
*/
commit d31569455ca25b7050a240cad58bea492c58194a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Mar 11 10:46:06 2014 +0000
sna: Avoid using the wrong pitch for comparing replacement sizes
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index acb2d56..716a9fe 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1555,7 +1555,7 @@ static inline bool pixmap_inplace(struct sna *sna,
return false;
}
- return (pixmap->devKind * pixmap->drawable.height >> 12) >
+ return (priv->stride * pixmap->drawable.height >> 12) >
sna->kgem.half_cpu_cache_pages;
}
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 0aac61e..2e9204f 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -1730,10 +1730,10 @@ indirect_replace(struct sna *sna,
DBG(("%s: size=%d vs %d\n",
__FUNCTION__,
- (int)pixmap->devKind * pixmap->drawable.height >> 12,
+ stride * pixmap->drawable.height >> 12,
kgem->half_cpu_cache_pages));
- if ((int)pixmap->devKind * pixmap->drawable.height >> 12 > kgem->half_cpu_cache_pages)
+ if (stride * pixmap->drawable.height >> 12 > kgem->half_cpu_cache_pages)
return false;
if (!kgem_bo_can_blt(kgem, bo) &&
commit 8c5593037f31159532da992ae3b503c3b4a42f8e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Mar 11 10:44:52 2014 +0000
sna: Assert that the pixmap pitch is initialised before use
This is a sanity check that the pixmap is mapped for use by the CPU
prior to us actually using it.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 7be43c7..acb2d56 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2147,6 +2147,7 @@ skip_inplace_map:
assert(pixmap->devPrivate.ptr == MAP(priv->cpu_bo->map__cpu));
}
+ assert(pixmap->devKind);
if (priv->clear_color == 0 ||
pixmap->drawable.bitsPerPixel == 8 ||
priv->clear_color == (1 << pixmap->drawable.depth) - 1) {
@@ -2712,6 +2713,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
assert(pixmap->devPrivate.ptr == MAP(priv->cpu_bo->map__cpu));
}
+ assert(pixmap->devKind);
do {
pixman_fill(pixmap->devPrivate.ptr,
pixmap->devKind/sizeof(uint32_t),
@@ -3251,6 +3253,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
if (pixmap->devPrivate.ptr == NULL)
return NULL;
+ assert(pixmap->devKind);
if (n == 1 && !priv->pinned &&
box->x1 <= 0 && box->y1 <= 0 &&
box->x2 >= pixmap->drawable.width &&
@@ -3288,13 +3291,15 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
}
if (!ok) {
sna_pixmap_unmap(pixmap, priv);
- if (pixmap->devPrivate.ptr != NULL)
+ if (pixmap->devPrivate.ptr != NULL) {
+ assert(pixmap->devKind);
ok = sna_write_boxes(sna, pixmap,
priv->gpu_bo, 0, 0,
pixmap->devPrivate.ptr,
pixmap->devKind,
0, 0,
box, 1);
+ }
}
if (!ok)
return NULL;
@@ -3315,13 +3320,15 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl
}
if (!ok) {
sna_pixmap_unmap(pixmap, priv);
- if (pixmap->devPrivate.ptr != NULL)
+ if (pixmap->devPrivate.ptr != NULL) {
+ assert(pixmap->devKind);
ok = sna_write_boxes(sna, pixmap,
priv->gpu_bo, 0, 0,
pixmap->devPrivate.ptr,
pixmap->devKind,
0, 0,
box, n);
+ }
}
if (!ok)
return NULL;
@@ -4020,6 +4027,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
if (pixmap->devPrivate.ptr == NULL)
return NULL;
+ assert(pixmap->devKind);
if (n == 1 && !priv->pinned &&
(box->x2 - box->x1) >= pixmap->drawable.width &&
(box->y2 - box->y1) >= pixmap->drawable.height) {
@@ -4618,6 +4626,7 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
assert(box->y2 - y <= h);
assert(has_coherent_ptr(to_sna_from_pixmap(pixmap), sna_pixmap(pixmap), MOVE_WRITE));
+ assert(pixmap->devKind);
memcpy_blt(bits, pixmap->devPrivate.ptr,
pixmap->drawable.bitsPerPixel,
stride, pixmap->devKind,
@@ -5320,6 +5329,7 @@ fallback:
goto free_boxes;
if (alu == GXcopy && pixmap->drawable.bitsPerPixel >= 8) {
+ assert(pixmap->devKind);
if (sigtrap_get() == 0) {
FbBits *dst_bits, *src_bits;
int stride = pixmap->devKind;
@@ -5561,6 +5571,7 @@ sna_copy_boxes__inplace(struct sna *sna, RegionPtr region, int alu,
n = RegionNumRects(region);
if (src_priv->gpu_bo->tiling) {
DBG(("%s: copy from a tiled CPU map\n", __FUNCTION__));
+ assert(dst_pixmap->devKind);
do {
memcpy_from_tiled_x(&sna->kgem, ptr, dst_pixmap->devPrivate.ptr,
src_pixmap->drawable.bitsPerPixel,
@@ -5573,6 +5584,7 @@ sna_copy_boxes__inplace(struct sna *sna, RegionPtr region, int alu,
} while (--n);
} else {
DBG(("%s: copy from a linear CPU map\n", __FUNCTION__));
+ assert(dst_pixmap->devKind);
do {
memcpy_blt(ptr, dst_pixmap->devPrivate.ptr,
src_pixmap->drawable.bitsPerPixel,
@@ -5683,6 +5695,7 @@ upload_inplace:
if (dst_priv->gpu_bo->tiling) {
DBG(("%s: copy to a tiled CPU map\n", __FUNCTION__));
assert(dst_priv->gpu_bo->tiling == I915_TILING_X);
+ assert(src_pixmap->devKind);
do {
memcpy_to_tiled_x(&sna->kgem, src_pixmap->devPrivate.ptr, ptr,
src_pixmap->drawable.bitsPerPixel,
@@ -5695,6 +5708,7 @@ upload_inplace:
} while (--n);
} else {
DBG(("%s: copy to a linear CPU map\n", __FUNCTION__));
+ assert(src_pixmap->devKind);
do {
memcpy_blt(src_pixmap->devPrivate.ptr, ptr,
src_pixmap->drawable.bitsPerPixel,
@@ -6041,6 +6055,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
DBG(("%s: upload through a temporary map\n",
__FUNCTION__));
+ assert(src_pixmap->devKind);
src_bo = kgem_create_map(&sna->kgem,
src_pixmap->devPrivate.ptr,
src_pixmap->devKind * src_pixmap->drawable.height,
@@ -6102,6 +6117,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
assert(has_coherent_ptr(sna, sna_pixmap(src_pixmap), MOVE_READ));
assert(has_coherent_ptr(sna, sna_pixmap(tmp), MOVE_WRITE));
+ assert(src_pixmap->devKind);
+ assert(tmp->devKind);
memcpy_blt(src_pixmap->devPrivate.ptr,
tmp->devPrivate.ptr,
src_pixmap->drawable.bitsPerPixel,
@@ -6143,6 +6160,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
DBG(("%s: dst is on the GPU, src is on the CPU, uploading into dst\n",
__FUNCTION__));
+ assert(src_pixmap->devKind);
if (!dst_priv->pinned && replaces) {
stride = src_pixmap->devKind;
bits = src_pixmap->devPrivate.ptr;
@@ -6201,6 +6219,7 @@ fallback:
}
assert(dst_pixmap->devPrivate.ptr);
+ assert(dst_pixmap->devKind);
do {
pixman_fill(dst_pixmap->devPrivate.ptr,
dst_pixmap->devKind/sizeof(uint32_t),
@@ -6255,6 +6274,8 @@ fallback:
}
assert(dst_priv == sna_pixmap(dst_pixmap));
+ assert(dst_pixmap->devKind);
+ assert(src_pixmap->devKind);
dst_stride = dst_pixmap->devKind;
src_stride = src_pixmap->devKind;
@@ -6284,6 +6305,8 @@ fallback:
assert(box->y2 + src_dy <= src_pixmap->drawable.height);
assert(has_coherent_ptr(sna, src_priv, MOVE_READ));
assert(has_coherent_ptr(sna, dst_priv, MOVE_WRITE));
+ assert(src_stride);
+ assert(dst_stride);
memcpy_blt(src_bits, dst_bits, bpp,
src_stride, dst_stride,
box->x1, box->y1,
@@ -7675,6 +7698,7 @@ sna_copy_bitmap_blt(DrawablePtr _bitmap, DrawablePtr drawable, GCPtr gc,
sna->kgem.nbatch += 7 + src_stride;
}
+ assert(bitmap->devKind);
src_stride = bitmap->devKind;
src = bitmap->devPrivate.ptr;
src += (box->y1 + sy) * src_stride + bx1/8;
@@ -7756,6 +7780,7 @@ sna_copy_bitmap_blt(DrawablePtr _bitmap, DrawablePtr drawable, GCPtr gc,
}
dst = ptr;
+ assert(bitmap->devKind);
src_stride = bitmap->devKind;
src = bitmap->devPrivate.ptr;
src += (box->y1 + sy) * src_stride + bx1/8;
@@ -7861,6 +7886,7 @@ sna_copy_plane_blt(DrawablePtr source, DrawablePtr drawable, GCPtr gc,
if (sigtrap_get() == 0) {
uint32_t *b;
+ assert(src_pixmap->devKind);
switch (source->bitsPerPixel) {
case 32:
{
@@ -11477,6 +11503,7 @@ sna_pixmap_get_source_bo(PixmapPtr pixmap)
}
assert(has_coherent_ptr(sna, sna_pixmap(pixmap), MOVE_READ));
+ assert(pixmap->devKind);
memcpy_blt(pixmap->devPrivate.ptr, ptr,
pixmap->drawable.bitsPerPixel,
pixmap->devKind, upload->pitch,
@@ -11954,6 +11981,7 @@ sna_poly_fill_rect_tiled_nxm_blt(DrawablePtr drawable,
assert(has_coherent_ptr(sna, sna_pixmap(tile), MOVE_READ));
upload->pitch = 8*tile->drawable.bitsPerPixel >> 3; /* for sanity checks */
+ assert(tile->devKind);
cpp = tile->drawable.bitsPerPixel/8;
for (h = 0; h < tile->drawable.height; h++) {
uint8_t *src = (uint8_t *)tile->devPrivate.ptr + tile->devKind*h;
@@ -12319,6 +12347,7 @@ sna_poly_fill_rect_stippled_8x8_blt(DrawablePtr drawable,
br13 |= fill_ROP[gc->alu] << 16;
}
+ assert(gc->stipple->devKind);
{
uint8_t *dst = (uint8_t *)pat;
const uint8_t *src = gc->stipple->devPrivate.ptr;
@@ -12659,6 +12688,7 @@ sna_poly_fill_rect_stippled_nxm_blt(DrawablePtr drawable,
stipple = gc->stipple;
gc->stipple = scratch;
+ assert(stipple->devKind);
stride = stipple->devKind;
src = stipple->devPrivate.ptr;
end = src + stride * stipple->drawable.height;
@@ -12787,6 +12817,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
dst = (uint8_t *)&b[7];
sna->kgem.nbatch += 7 + src_stride;
}
+ assert(stipple->devKind);
src_stride = stipple->devKind;
src = stipple->devPrivate.ptr;
src += (r->y - origin->y) * src_stride + bx1/8;
@@ -12822,6 +12853,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
if (sigtrap_get() == 0) {
dst = ptr;
+ assert(stipple->devKind);
src_stride = stipple->devKind;
src = stipple->devPrivate.ptr;
src += (r->y - origin->y) * src_stride + bx1/8;
@@ -12978,6 +13010,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
sna->kgem.nbatch += 7 + src_stride;
}
+ assert(stipple->devKind);
src_stride = stipple->devKind;
src = stipple->devPrivate.ptr;
src += (box.y1 - pat.y) * src_stride + bx1/8;
@@ -13010,6 +13043,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
if (sigtrap_get() == 0) {
dst = ptr;
+ assert(stipple->devKind);
src_stride = stipple->devKind;
src = stipple->devPrivate.ptr;
src += (box.y1 - pat.y) * src_stride + bx1/8;
@@ -13165,6 +13199,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
dst = (uint8_t *)&b[7];
sna->kgem.nbatch += 7 + src_stride;
}
+ assert(stipple->devKind);
src_stride = stipple->devKind;
src = stipple->devPrivate.ptr;
src += (box.y1 - pat.y) * src_stride + bx1/8;
@@ -13197,6 +13232,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
if (sigtrap_get() == 0) {
dst = ptr;
+ assert(stipple->devKind);
src_stride = stipple->devKind;
src = stipple->devPrivate.ptr;
src += (box.y1 - pat.y) * src_stride + bx1/8;
@@ -13358,6 +13394,7 @@ sna_poly_fill_rect_stippled_n_box__imm(struct sna *sna,
sna->kgem.nbatch += 7 + len;
}
+ assert(gc->stipple->devKind);
len = gc->stipple->devKind;
src = gc->stipple->devPrivate.ptr;
src += oy*len + ox/8;
@@ -13390,6 +13427,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
int stride = gc->stipple->devKind;
uint32_t *b;
+ assert(stride);
if ((((box->y2-box->y1) | (box->x2-box->x1)) & ~31) == 0) {
br00 = XY_MONO_SRC_COPY_IMM |(br00 & (BLT_DST_TILED | 3 << 20));
sna_poly_fill_rect_stippled_n_box__imm(sna, bo,
@@ -13492,6 +13530,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
sna->kgem.nbatch += 7 + len;
}
+ assert(gc->stipple->devKind);
len = gc->stipple->devKind;
src = gc->stipple->devPrivate.ptr;
src += oy*len + ox/8;
@@ -15656,6 +15695,7 @@ sna_push_pixels_solid_blt(GCPtr gc,
uint8_t *src;
uint32_t *b;
+ assert(src_stride);
src = (uint8_t*)bitmap->devPrivate.ptr;
src += (box->y1 - region->extents.y1) * src_stride + bx1/8;
src_stride -= bstride;
@@ -16193,6 +16233,7 @@ sna_get_image(DrawablePtr drawable,
region.extents.x2, region.extents.y2));
assert(has_coherent_ptr(to_sna_from_pixmap(pixmap), sna_pixmap(pixmap), MOVE_READ));
if (sigtrap_get() == 0) {
+ assert(pixmap->devKind);
memcpy_blt(pixmap->devPrivate.ptr, dst, drawable->bitsPerPixel,
pixmap->devKind, PixmapBytePad(w, drawable->depth),
region.extents.x1, region.extents.y1, 0, 0, w, h);
@@ -16606,6 +16647,8 @@ fallback:
assert(has_coherent_ptr(sna, sna_pixmap(src), MOVE_READ));
assert(has_coherent_ptr(sna, sna_pixmap(dst), MOVE_WRITE));
+ assert(src->devKind);
+ assert(dst->devKind);
memcpy_blt(src->devPrivate.ptr,
dst->devPrivate.ptr,
src->drawable.bitsPerPixel,
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index d1d5ccd..4b2076a 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -932,6 +932,8 @@ static void blt_composite_fill__cpu(struct sna *sna,
if (x2 <= x1 || y2 <= y1)
return;
+ assert(op->dst.pixmap->devPrivate.ptr);
+ assert(op->dst.pixmap->devKind);
pixman_fill(op->dst.pixmap->devPrivate.ptr,
op->dst.pixmap->devKind / sizeof(uint32_t),
op->dst.pixmap->drawable.bitsPerPixel,
@@ -949,6 +951,8 @@ blt_composite_fill_box_no_offset__cpu(struct sna *sna,
assert(box->x2 <= op->dst.pixmap->drawable.width);
assert(box->y2 <= op->dst.pixmap->drawable.height);
+ assert(op->dst.pixmap->devPrivate.ptr);
+ assert(op->dst.pixmap->devKind);
pixman_fill(op->dst.pixmap->devPrivate.ptr,
op->dst.pixmap->devKind / sizeof(uint32_t),
op->dst.pixmap->drawable.bitsPerPixel,
@@ -967,6 +971,8 @@ blt_composite_fill_boxes_no_offset__cpu(struct sna *sna,
assert(box->x2 <= op->dst.pixmap->drawable.width);
assert(box->y2 <= op->dst.pixmap->drawable.height);
+ assert(op->dst.pixmap->devPrivate.ptr);
+ assert(op->dst.pixmap->devKind);
pixman_fill(op->dst.pixmap->devPrivate.ptr,
op->dst.pixmap->devKind / sizeof(uint32_t),
op->dst.pixmap->drawable.bitsPerPixel,
@@ -986,6 +992,8 @@ blt_composite_fill_box__cpu(struct sna *sna,
assert(box->x2 + op->dst.x <= op->dst.pixmap->drawable.width);
assert(box->y2 + op->dst.y <= op->dst.pixmap->drawable.height);
+ assert(op->dst.pixmap->devPrivate.ptr);
+ assert(op->dst.pixmap->devKind);
pixman_fill(op->dst.pixmap->devPrivate.ptr,
op->dst.pixmap->devKind / sizeof(uint32_t),
op->dst.pixmap->drawable.bitsPerPixel,
@@ -1005,6 +1013,8 @@ blt_composite_fill_boxes__cpu(struct sna *sna,
assert(box->x2 + op->dst.x <= op->dst.pixmap->drawable.width);
assert(box->y2 + op->dst.y <= op->dst.pixmap->drawable.height);
+ assert(op->dst.pixmap->devPrivate.ptr);
+ assert(op->dst.pixmap->devKind);
pixman_fill(op->dst.pixmap->devPrivate.ptr,
op->dst.pixmap->devKind / sizeof(uint32_t),
op->dst.pixmap->drawable.bitsPerPixel,
@@ -1928,6 +1938,10 @@ blt_put_composite__cpu(struct sna *sna,
{
PixmapPtr dst = op->dst.pixmap;
PixmapPtr src = op->u.blt.src_pixmap;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+ assert(dst->devPrivate.ptr);
+ assert(dst->devKind);
memcpy_blt(src->devPrivate.ptr, dst->devPrivate.ptr,
src->drawable.bitsPerPixel, src->devKind, dst->devKind,
r->src.x + op->u.blt.sx, r->src.y + op->u.blt.sy,
@@ -1942,6 +1956,10 @@ blt_put_composite_box__cpu(struct sna *sna,
{
PixmapPtr dst = op->dst.pixmap;
PixmapPtr src = op->u.blt.src_pixmap;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+ assert(dst->devPrivate.ptr);
+ assert(dst->devKind);
memcpy_blt(src->devPrivate.ptr, dst->devPrivate.ptr,
src->drawable.bitsPerPixel, src->devKind, dst->devKind,
box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
@@ -1956,6 +1974,10 @@ blt_put_composite_boxes__cpu(struct sna *sna,
{
PixmapPtr dst = op->dst.pixmap;
PixmapPtr src = op->u.blt.src_pixmap;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+ assert(dst->devPrivate.ptr);
+ assert(dst->devKind);
do {
memcpy_blt(src->devPrivate.ptr, dst->devPrivate.ptr,
src->drawable.bitsPerPixel, src->devKind, dst->devKind,
@@ -1973,6 +1995,10 @@ blt_put_composite_with_alpha__cpu(struct sna *sna,
{
PixmapPtr dst = op->dst.pixmap;
PixmapPtr src = op->u.blt.src_pixmap;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+ assert(dst->devPrivate.ptr);
+ assert(dst->devKind);
memcpy_xor(src->devPrivate.ptr, dst->devPrivate.ptr,
src->drawable.bitsPerPixel, src->devKind, dst->devKind,
r->src.x + op->u.blt.sx, r->src.y + op->u.blt.sy,
@@ -1989,6 +2015,10 @@ blt_put_composite_box_with_alpha__cpu(struct sna *sna,
{
PixmapPtr dst = op->dst.pixmap;
PixmapPtr src = op->u.blt.src_pixmap;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+ assert(dst->devPrivate.ptr);
+ assert(dst->devKind);
memcpy_xor(src->devPrivate.ptr, dst->devPrivate.ptr,
src->drawable.bitsPerPixel, src->devKind, dst->devKind,
box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
@@ -2004,6 +2034,10 @@ blt_put_composite_boxes_with_alpha__cpu(struct sna *sna,
{
PixmapPtr dst = op->dst.pixmap;
PixmapPtr src = op->u.blt.src_pixmap;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+ assert(dst->devPrivate.ptr);
+ assert(dst->devKind);
do {
memcpy_xor(src->devPrivate.ptr, dst->devPrivate.ptr,
src->drawable.bitsPerPixel, src->devKind, dst->devKind,
@@ -2070,6 +2104,8 @@ fastcall static void blt_put_composite_box(struct sna *sna,
op->u.blt.sx, op->u.blt.sy,
op->dst.x, op->dst.y));
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
if (!dst_priv->pinned &&
box->x2 - box->x1 == op->dst.width &&
box->y2 - box->y1 == op->dst.height) {
@@ -2108,6 +2144,8 @@ static void blt_put_composite_boxes(struct sna *sna,
op->dst.x, op->dst.y,
box->x1, box->y1, box->x2, box->y2, n));
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
if (n == 1 && !dst_priv->pinned &&
box->x2 - box->x1 == op->dst.width &&
box->y2 - box->y1 == op->dst.height) {
@@ -2150,6 +2188,9 @@ blt_put_composite_with_alpha(struct sna *sna,
int16_t src_x = r->src.x + op->u.blt.sx;
int16_t src_y = r->src.y + op->u.blt.sy;
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+
if (!dst_priv->pinned &&
dst_x <= 0 && dst_y <= 0 &&
dst_x + r->width >= op->dst.width &&
@@ -2190,6 +2231,9 @@ blt_put_composite_box_with_alpha(struct sna *sna,
op->u.blt.sx, op->u.blt.sy,
op->dst.x, op->dst.y));
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+
if (!dst_priv->pinned &&
box->x2 - box->x1 == op->dst.width &&
box->y2 - box->y1 == op->dst.height) {
@@ -2227,6 +2271,9 @@ blt_put_composite_boxes_with_alpha(struct sna *sna,
op->dst.x, op->dst.y,
box->x1, box->y1, box->x2, box->y2, n));
+ assert(src->devPrivate.ptr);
+ assert(src->devKind);
+
if (n == 1 && !dst_priv->pinned &&
box->x2 - box->x1 == op->dst.width &&
box->y2 - box->y1 == op->dst.height) {
More information about the xorg-commit
mailing list