sna: Correct check for overwriting last BLT fill
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Nov 2013 12:01:33 +0000 (12:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Nov 2013 12:02:43 +0000 (12:02 +0000)
Typo crept in from the reloc rework.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_blt.c

index 63153b7..48a7cf6 100644 (file)
@@ -3270,7 +3270,7 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
                        }
                } else {
                        if (kgem->nbatch >= 6 &&
-                           kgem->batch[kgem->nbatch-7] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) &&
+                           kgem->batch[kgem->nbatch-6] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) &&
                            kgem->batch[kgem->nbatch-4] == ((uint32_t)(box->y1 + dst_dy) << 16 | (uint16_t)(box->x1 + dst_dx)) &&
                            kgem->batch[kgem->nbatch-3] == ((uint32_t)(box->y2 + dst_dy) << 16 | (uint16_t)(box->x2 + dst_dx))) {
                                DBG(("%s: deleting last fill\n", __FUNCTION__));
@@ -3605,7 +3605,7 @@ bool sna_blt_copy_boxes__with_alpha(struct sna *sna, uint8_t alu,
                        }
                } else {
                        if (kgem->nbatch >= 6 &&
-                           kgem->batch[kgem->nbatch-7] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) &&
+                           kgem->batch[kgem->nbatch-6] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) &&
                            kgem->batch[kgem->nbatch-4] == ((uint32_t)(box->y1 + dst_dy) << 16 | (uint16_t)(box->x1 + dst_dx)) &&
                            kgem->batch[kgem->nbatch-3] == ((uint32_t)(box->y2 + dst_dy) << 16 | (uint16_t)(box->x2 + dst_dx))) {
                                DBG(("%s: deleting last fill\n", __FUNCTION__));