sna/gen2+: Remove assertion on draw->type for fills
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Jul 2014 06:19:03 +0000 (07:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Jul 2014 06:19:03 +0000 (07:19 +0100)
I overlooked the tiling-fill path passing down a temporary DrawableRec
into the fill_boxes callback - invalidating the assertion.

Fixes regression from
commit 43176b9bfafe389c4b9ed676f4e50e3b06f858c4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jun 30 21:01:11 2014 +0100

    sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn bo

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c62
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/gen2_render.c
src/sna/gen3_render.c
src/sna/gen4_render.c
src/sna/gen5_render.c
src/sna/gen6_render.c
src/sna/gen7_render.c
src/sna/gen8_render.c
src/sna/sna_render.c

index 4cc8dcd..379079d 100644 (file)
@@ -2821,7 +2821,6 @@ gen2_render_fill_boxes(struct sna *sna,
 
        memset(&tmp, 0, sizeof(tmp));
        tmp.op = op;
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width = dst->width;
        tmp.dst.height = dst->height;
index 8897f52..bb18dd1 100644 (file)
@@ -5927,7 +5927,6 @@ gen3_render_fill_boxes(struct sna *sna,
             __FUNCTION__, op, (int)format, pixel));
 
        tmp.op = op;
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width = dst->width;
        tmp.dst.height = dst->height;
index 0bef20f..32ad868 100644 (file)
@@ -2732,7 +2732,6 @@ gen4_render_fill_boxes(struct sna *sna,
 
        tmp.op = op;
 
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width  = dst->width;
        tmp.dst.height = dst->height;
index 965e60f..93bc0d2 100644 (file)
@@ -2728,7 +2728,6 @@ gen5_render_fill_boxes(struct sna *sna,
 
        tmp.op = op;
 
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width  = dst->width;
        tmp.dst.height = dst->height;
index ab6e296..4ee786b 100644 (file)
@@ -3097,7 +3097,6 @@ gen6_render_fill_boxes(struct sna *sna,
             __FUNCTION__, pixel, n,
             box[0].x1, box[0].y1, box[0].x2, box[0].y2));
 
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width  = dst->width;
        tmp.dst.height = dst->height;
index b1faac4..59b954d 100644 (file)
@@ -3331,7 +3331,6 @@ gen7_render_fill_boxes(struct sna *sna,
             __FUNCTION__, pixel, n,
             box[0].x1, box[0].y1, box[0].x2, box[0].y2));
 
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width  = dst->width;
        tmp.dst.height = dst->height;
index 2eb44a9..826675c 100644 (file)
@@ -3161,7 +3161,6 @@ gen8_render_fill_boxes(struct sna *sna,
             __FUNCTION__, pixel, n,
             box[0].x1, box[0].y1, box[0].x2, box[0].y2));
 
-       assert(dst->type == DRAWABLE_PIXMAP);
        tmp.dst.pixmap = (PixmapPtr)dst;
        tmp.dst.width  = dst->width;
        tmp.dst.height = dst->height;
index 89be5a5..0200102 100644 (file)
@@ -2181,7 +2181,6 @@ sna_render_copy_boxes__overlap(struct sna *sna, uint8_t alu,
        pixman_box16_t stack_boxes[64], *boxes = stack_boxes;
        int num_boxes, i;
 
-       assert(draw->type == DRAWABLE_PIXMAP);
        DBG(("%s: pixmap=%ld, handle=%d, %d x [(%d, %d), (%d, %d)], dst=(%d, %d), src=(%d, %d)\n",
             __FUNCTION__, draw->serialNumber, bo->handle,
             n, extents->x1, extents->y1, extents->x2, extents->y2,