Lines Matching defs:blt

123 			      struct sna_blt_state *blt,
133 blt->bo[0] = bo;
135 blt->br13 = bo->pitch;
136 blt->cmd = XY_SCANLINE_BLT;
138 blt->cmd |= BLT_DST_TILED;
139 blt->br13 >>= 2;
141 assert(blt->br13 <= MAXSHORT);
152 blt->br13 |= 1<<31 | (fill_ROP[alu] << 16);
155 case 32: blt->br13 |= 1 << 25; /* RGB8888 */
156 case 16: blt->br13 |= 1 << 24; /* RGB565 */
160 blt->pixel = pixel;
161 blt->bpp = bpp;
162 blt->alu = alu;
195 b[1] = blt->br13;
215 b[1] = blt->br13;
241 const struct sna_blt_state *blt)
256 if (blt->bpp == 32)
258 if (blt->bo[0]->tiling)
260 b[1] = blt->br13;
264 kgem_add_reloc64(kgem, kgem->nbatch + 4, blt->bo[0],
269 b[6] = blt->pixel;
270 b[7] = blt->pixel;
276 if (blt->bpp == 32)
278 if (blt->bo[0]->tiling && kgem->gen >= 040)
280 b[1] = blt->br13;
283 b[4] = kgem_add_reloc(kgem, kgem->nbatch + 4, blt->bo[0],
288 b[5] = blt->pixel;
289 b[6] = blt->pixel;
297 const struct sna_blt_state *blt,
305 __FUNCTION__, x, y, width, height, blt->pixel));
309 assert((y+height) * blt->bo[0]->pitch <= kgem_bo_size(blt->bo[0]));
312 sna_blt_fill_begin(sna, blt);
319 b[0] = blt->cmd;
325 struct sna_blt_state *blt,
336 blt->bo[0] = src;
337 blt->bo[1] = dst;
339 blt->cmd = XY_SRC_COPY_BLT_CMD | (kgem->gen >= 0100 ? 8 : 6);
341 blt->cmd |= BLT_WRITE_ALPHA | BLT_WRITE_RGB;
343 blt->pitch[0] = src->pitch;
345 blt->cmd |= BLT_SRC_TILED;
346 blt->pitch[0] >>= 2;
348 assert(blt->pitch[0] <= MAXSHORT);
350 blt->pitch[1] = dst->pitch;
352 blt->cmd |= BLT_DST_TILED;
353 blt->pitch[1] >>= 2;
355 assert(blt->pitch[1] <= MAXSHORT);
357 blt->overwrites = alu == GXcopy || alu == GXclear || alu == GXset;
358 blt->br13 = (copy_ROP[alu] << 16) | blt->pitch[1];
361 case 32: blt->br13 |= 1 << 25; /* RGB8888 */
362 case 16: blt->br13 |= 1 << 24; /* RGB565 */
379 struct sna_blt_state *blt,
391 blt->bo[0] = src;
392 blt->bo[1] = dst;
394 blt->cmd = XY_FULL_MONO_PATTERN_BLT | (kgem->gen >= 0100 ? 12 : 10);
395 blt->pitch[0] = src->pitch;
397 blt->cmd |= BLT_SRC_TILED;
398 blt->pitch[0] >>= 2;
400 assert(blt->pitch[0] <= MAXSHORT);
402 blt->pitch[1] = dst->pitch;
404 blt->cmd |= BLT_DST_TILED;
405 blt->pitch[1] >>= 2;
407 assert(blt->pitch[1] <= MAXSHORT);
409 blt->overwrites = 1;
410 blt->br13 = (0xfc << 16) | blt->pitch[1];
413 case 32: blt->cmd |= BLT_WRITE_ALPHA | BLT_WRITE_RGB;
414 blt->br13 |= 1 << 25; /* RGB8888 */
415 case 16: blt->br13 |= 1 << 24; /* RGB565 */
418 blt->pixel = alpha;
433 const struct sna_blt_state *blt,
446 assert((src_y + height) * blt->bo[0]->pitch <= kgem_bo_size(blt->bo[0]));
449 assert((dst_y + height) * blt->bo[1]->pitch <= kgem_bo_size(blt->bo[1]));
461 b[0] = blt->cmd;
462 b[1] = blt->br13;
467 kgem_add_reloc64(kgem, kgem->nbatch + 4, blt->bo[1],
472 b[6] = blt->pitch[0];
475 kgem_add_reloc64(kgem, kgem->nbatch + 8, blt->bo[0],
479 b[10] = blt->pixel;
480 b[11] = blt->pixel;
485 b[4] = kgem_add_reloc(kgem, kgem->nbatch + 4, blt->bo[1],
490 b[5] = blt->pitch[0];
492 b[7] = kgem_add_reloc(kgem, kgem->nbatch + 7, blt->bo[0],
496 b[8] = blt->pixel;
497 b[9] = blt->pixel;
506 const struct sna_blt_state *blt,
519 assert((src_y + height) * blt->bo[0]->pitch <= kgem_bo_size(blt->bo[0]));
522 assert((dst_y + height) * blt->bo[1]->pitch <= kgem_bo_size(blt->bo[1]));
527 if (blt->overwrites &&
528 kgem->reloc[kgem->nreloc-1].target_handle == blt->bo[1]->target_handle) {
531 kgem->batch[kgem->nbatch-7] == (XY_COLOR_BLT | (blt->cmd & (BLT_DST_TILED | BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 5) &&
538 b[0] = blt->cmd;
539 b[1] = blt->br13;
541 b[7] = blt->pitch[0];
543 kgem_add_reloc64(kgem, kgem->nbatch + 8 - 7, blt->bo[0],
556 kgem->batch[kgem->nbatch-6] == (XY_COLOR_BLT | (blt->cmd & (BLT_DST_TILED | BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) &&
563 b[0] = blt->cmd;
564 b[1] = blt->br13;
566 b[6] = blt->pitch[0];
567 b[7] = kgem_add_reloc(kgem, kgem->nbatch + 7 - 6, blt->bo[0],
589 b[0] = blt->cmd;
590 b[1] = blt->br13;
595 kgem_add_reloc64(kgem, kgem->nbatch + 4, blt->bo[1],
601 b[7] = blt->pitch[0];
603 kgem_add_reloc64(kgem, kgem->nbatch + 8, blt->bo[0],
609 b[4] = kgem_add_reloc(kgem, kgem->nbatch + 4, blt->bo[1],
615 b[6] = blt->pitch[0];
616 b[7] = kgem_add_reloc(kgem, kgem->nbatch + 7, blt->bo[0],
944 sna_blt_fill_one(sna, &op->u.blt, x1, y1, x2-x1, y2-y1);
978 op->u.blt.pixel);
997 op->u.blt.pixel);
1017 op->u.blt.pixel);
1039 op->u.blt.pixel);
1060 op->u.blt.pixel);
1066 const struct sna_blt_state *blt,
1074 blt->pixel));
1078 assert(box->y2 * blt->bo[0]->pitch <= kgem_bo_size(blt->bo[0]));
1081 sna_blt_fill_begin(sna, blt);
1088 b[0] = blt->cmd;
1093 const struct sna_blt_state *blt,
1098 uint32_t cmd = blt->cmd;
1100 DBG(("%s: %08x x %d\n", __FUNCTION__, blt->pixel, nbox));
1103 sna_blt_fill_begin(sna, blt);
1152 sna_blt_fill_begin(sna, blt);
1163 priv->clear_color = op->u.blt.pixel;
1167 op->u.blt.pixel));
1176 _sna_blt_fill_box(sna, &op->u.blt, box);
1184 _sna_blt_fill_boxes(sna, &op->u.blt, box, n);
1192 const struct sna_blt_state *blt = &op->u.blt;
1193 uint32_t cmd = blt->cmd;
1195 DBG(("%s: %08x x %d\n", __FUNCTION__, blt->pixel, nbox));
1201 sna_blt_fill_begin(sna, blt);
1257 sna_blt_fill_begin(sna, blt);
1266 sna_blt_fill_one(sna, &op->u.blt,
1279 sna_blt_fill_one(sna, &op->u.blt,
1305 const struct sna_blt_state *blt = &op->u.blt;
1306 uint32_t cmd = blt->cmd;
1310 DBG(("%s: %08x x %d\n", __FUNCTION__, blt->pixel, nbox));
1316 sna_blt_fill_begin(sna, blt);
1372 sna_blt_fill_begin(sna, blt);
1418 op->blt = blt_composite_nop;
1432 op->blt = blt_composite_fill__cpu;
1443 op->u.blt.pixel = 0;
1447 op->blt = blt_composite_fill;
1459 if (!sna_blt_fill_init(sna, &op->u.blt,
1476 op->u.blt.pixel = pixel;
1477 op->blt = blt_composite_fill__cpu;
1491 op->blt = blt_composite_fill;
1503 if (!sna_blt_fill_init(sna, &op->u.blt, op->dst.bo,
1532 src_x = r->src.x - x1 + op->u.blt.sx;
1533 src_y = r->src.y - y1 + op->u.blt.sy;
1552 sna_blt_copy_one(sna, &op->u.blt,
1564 sna_blt_copy_one(sna, &op->u.blt,
1565 box->x1 + op->u.blt.sx,
1566 box->y1 + op->u.blt.sy,
1581 sna_blt_copy_one(sna, &op->u.blt,
1582 box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
1605 uint32_t cmd = op->u.blt.cmd;
1606 uint32_t br13 = op->u.blt.br13;
1607 struct kgem_bo *src_bo = op->u.blt.bo[0];
1608 struct kgem_bo *dst_bo = op->u.blt.bo[1];
1609 int src_pitch = op->u.blt.pitch[0];
1741 uint32_t cmd = op->u.blt.cmd;
1742 uint32_t br13 = op->u.blt.br13;
1743 struct kgem_bo *src_bo = op->u.blt.bo[0];
1744 struct kgem_bo *dst_bo = op->u.blt.bo[1];
1745 int src_pitch = op->u.blt.pitch[0];
1893 src_x = r->src.x - x1 + op->u.blt.sx;
1894 src_y = r->src.y - y1 + op->u.blt.sy;
1913 sna_blt_alpha_fixup_one(sna, &op->u.blt,
1926 sna_blt_alpha_fixup_one(sna, &op->u.blt,
1927 box->x1 + op->u.blt.sx,
1928 box->y1 + op->u.blt.sy,
1944 sna_blt_alpha_fixup_one(sna, &op->u.blt,
1945 box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
1958 PixmapPtr src = op->u.blt.src_pixmap;
1985 op->blt = blt_composite_copy_with_alpha;
1989 if (!sna_blt_alpha_fixup_init(sna, &op->u.blt, bo, op->dst.bo,
1994 op->blt = blt_composite_copy;
2002 if (!sna_blt_copy_init(sna, &op->u.blt, bo, op->dst.bo,
2017 PixmapPtr src = op->u.blt.src_pixmap;
2024 r->src.x + op->u.blt.sx, r->src.y + op->u.blt.sy,
2035 PixmapPtr src = op->u.blt.src_pixmap;
2042 box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
2053 PixmapPtr src = op->u.blt.src_pixmap;
2061 box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
2074 PixmapPtr src = op->u.blt.src_pixmap;
2081 r->src.x + op->u.blt.sx, r->src.y + op->u.blt.sy,
2084 0xffffffff, op->u.blt.pixel);
2094 PixmapPtr src = op->u.blt.src_pixmap;
2101 box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
2104 0xffffffff, op->u.blt.pixel);
2113 PixmapPtr src = op->u.blt.src_pixmap;
2121 box->x1 + op->u.blt.sx, box->y1 + op->u.blt.sy,
2124 0xffffffff, op->u.blt.pixel);
2135 PixmapPtr src = op->u.blt.src_pixmap;
2143 int16_t src_x = r->src.x + op->u.blt.sx;
2144 int16_t src_y = r->src.y + op->u.blt.sy;
2177 PixmapPtr src = op->u.blt.src_pixmap;
2181 op->u.blt.sx, op->u.blt.sy,
2193 data += (box->y1 + op->u.blt.sy) * pitch;
2194 data += (box->x1 + op->u.blt.sx) * bpp;
2205 op->u.blt.sx, op->u.blt.sy,
2216 PixmapPtr src = op->u.blt.src_pixmap;
2220 op->u.blt.sx, op->u.blt.sy,
2233 data += (box->y1 + op->u.blt.sy) * pitch;
2234 data += (box->x1 + op->u.blt.sx) * bpp;
2245 op->u.blt.sx, op->u.blt.sy,
2258 PixmapPtr src = op->u.blt.src_pixmap;
2265 int16_t src_x = r->src.x + op->u.blt.sx;
2266 int16_t src_y = r->src.y + op->u.blt.sy;
2282 0xffffffff, op->u.blt.pixel);
2295 0xffffffff, op->u.blt.pixel);
2304 PixmapPtr src = op->u.blt.src_pixmap;
2308 op->u.blt.sx, op->u.blt.sy,
2321 data += (box->y1 + op->u.blt.sy) * pitch;
2322 data += (box->x1 + op->u.blt.sx) * bpp;
2326 0xffffffff, op->u.blt.pixel);
2332 op->u.blt.sx, op->u.blt.sy,
2334 0xffffffff, op->u.blt.pixel);
2343 PixmapPtr src = op->u.blt.src_pixmap;
2347 op->u.blt.sx, op->u.blt.sy,
2361 data += (box->y1 + op->u.blt.sy) * pitch;
2362 data += (box->x1 + op->u.blt.sx) * bpp;
2366 0xffffffff, op->u.blt.pixel);
2372 op->u.blt.sx, op->u.blt.sy,
2374 0xffffffff, op->u.blt.pixel);
2390 op->u.blt.pixel = alpha_fixup;
2391 op->blt = blt_put_composite_with_alpha;
2395 op->blt = blt_put_composite;
2401 op->u.blt.pixel = alpha_fixup;
2402 op->blt = blt_put_composite_with_alpha__cpu;
2406 op->blt = blt_put_composite__cpu;
2776 tmp->u.blt.src_pixmap = src_pixmap;
2777 tmp->u.blt.sx = x - dst_x;
2778 tmp->u.blt.sy = y - dst_y;
2779 DBG(("%s: blt dst offset (%d, %d), source offset (%d, %d), with alpha fixup? %x\n",
2781 tmp->dst.x, tmp->dst.y, tmp->u.blt.sx, tmp->u.blt.sy, alpha_fixup));
2940 DBG(("%s: cannot blt from src or to dst\n", __FUNCTION__));
3006 DBG(("%s: blt dst offset (%d, %d), source offset (%d, %d), with alpha fixup? %x\n",
3010 tmp->u.blt.src_pixmap = NULL;
3011 tmp->u.blt.sx = sx;
3012 tmp->u.blt.sy = sy;
3028 tmp->blt = blt_composite_copy_with_alpha;
3032 if (!sna_blt_alpha_fixup_init(sna, &tmp->u.blt,
3038 tmp->blt = blt_composite_copy;
3043 if (!sna_blt_copy_init(sna, &tmp->u.blt,
3062 if (sna->blt_state.fill_bo != op->base.u.blt.bo[0]->unique_id) {
3063 const struct sna_blt_state *blt = &op->base.u.blt;
3065 sna_blt_fill_begin(sna, blt);
3067 sna->blt_state.fill_bo = blt->bo[0]->unique_id;
3068 sna->blt_state.fill_pixel = blt->pixel;
3069 sna->blt_state.fill_alu = blt->alu;
3072 sna_blt_fill_one(sna, &op->base.u.blt, x, y, width, height);
3079 if (sna->blt_state.fill_bo != op->base.u.blt.bo[0]->unique_id) {
3080 const struct sna_blt_state *blt = &op->base.u.blt;
3082 sna_blt_fill_begin(sna, blt);
3084 sna->blt_state.fill_bo = blt->bo[0]->unique_id;
3085 sna->blt_state.fill_pixel = blt->pixel;
3086 sna->blt_state.fill_alu = blt->alu;
3089 _sna_blt_fill_box(sna, &op->base.u.blt, box);
3097 if (sna->blt_state.fill_bo != op->base.u.blt.bo[0]->unique_id) {
3098 const struct sna_blt_state *blt = &op->base.u.blt;
3100 sna_blt_fill_begin(sna, blt);
3102 sna->blt_state.fill_bo = blt->bo[0]->unique_id;
3103 sna->blt_state.fill_pixel = blt->pixel;
3104 sna->blt_state.fill_alu = blt->alu;
3107 _sna_blt_fill_boxes(sna, &op->base.u.blt, box, nbox);
3128 const struct sna_blt_state *blt = &op->base.u.blt;
3132 DBG(("%s: %08x x %d\n", __FUNCTION__, blt->pixel, n));
3134 if (sna->blt_state.fill_bo != op->base.u.blt.bo[0]->unique_id) {
3135 sna_blt_fill_begin(sna, blt);
3137 sna->blt_state.fill_bo = blt->bo[0]->unique_id;
3138 sna->blt_state.fill_pixel = blt->pixel;
3139 sna->blt_state.fill_alu = blt->alu;
3143 sna_blt_fill_begin(sna, blt);
3146 if (kgem->gen >= 040 && op->base.u.blt.bo[0]->tiling)
3229 sna_blt_fill_begin(sna, blt);
3250 if (!sna_blt_fill_init(sna, &fill->base.u.blt,
3255 fill->blt = sna_blt_fill_op_blt;
3270 sna_blt_copy_one(sna, &op->base.u.blt,
3292 if (!sna_blt_copy_init(sna, &op->base.u.blt,
3297 op->blt = sna_blt_copy_op_blt;
3341 /* All too frequently one blt completely overwrites the previous */
3468 DBG(("%s: fallback -- cannot blt to dst\n", __FUNCTION__));
3686 DBG(("%s: cannot blt to src? %d or dst? %d\n",
4031 DBG(("%s: cannot blt to src? %d or dst? %d\n",