Lines Matching refs:rect
75 struct rect { struct
297 struct rect *rect, uint32_t color, int bpp) in draw_rect_ptr_linear() argument
301 for (y = rect->y; y < rect->y + rect->h; y++) { in draw_rect_ptr_linear()
303 for (x = rect->x; x < rect->x + rect->w; x++) in draw_rect_ptr_linear()
309 int swizzle, struct rect *rect, uint32_t color, in draw_rect_ptr_tiled() argument
314 for (y = rect->y; y < rect->y + rect->h; y++) { in draw_rect_ptr_tiled()
315 for (x = rect->x; x < rect->x + rect->w; x++) { in draw_rect_ptr_tiled()
333 static void draw_rect_mmap_cpu(int fd, struct buf_data *buf, struct rect *rect, in draw_rect_mmap_cpu() argument
351 draw_rect_ptr_linear(ptr, buf->stride, rect, color, buf->bpp); in draw_rect_mmap_cpu()
355 draw_rect_ptr_tiled(ptr, buf->stride, tiling, swizzle, rect, in draw_rect_mmap_cpu()
368 static void draw_rect_mmap_gtt(int fd, struct buf_data *buf, struct rect *rect, in draw_rect_mmap_gtt() argument
379 draw_rect_ptr_linear(ptr, buf->stride, rect, color, buf->bpp); in draw_rect_mmap_gtt()
384 static void draw_rect_mmap_wc(int fd, struct buf_data *buf, struct rect *rect, in draw_rect_mmap_wc() argument
403 draw_rect_ptr_linear(ptr, buf->stride, rect, color, buf->bpp); in draw_rect_mmap_wc()
407 draw_rect_ptr_tiled(ptr, buf->stride, tiling, swizzle, rect, in draw_rect_mmap_wc()
419 struct rect *rect, uint32_t color) in draw_rect_pwrite_untiled() argument
423 uint8_t tmp[rect->w * pixel_size]; in draw_rect_pwrite_untiled()
425 for (i = 0; i < rect->w; i++) in draw_rect_pwrite_untiled()
428 for (y = rect->y; y < rect->y + rect->h; y++) { in draw_rect_pwrite_untiled()
429 offset = (y * buf->stride) + (rect->x * pixel_size); in draw_rect_pwrite_untiled()
430 gem_write(fd, buf->handle, offset, tmp, rect->w * pixel_size); in draw_rect_pwrite_untiled()
435 uint32_t tiling, struct rect *rect, in draw_rect_pwrite_tiled() argument
472 if (x >= rect->x && x < rect->x + rect->w && in draw_rect_pwrite_tiled()
473 y >= rect->y && y < rect->y + rect->h) { in draw_rect_pwrite_tiled()
489 if (pixels_written == rect->w * rect->h) in draw_rect_pwrite_tiled()
496 struct rect *rect, uint32_t color) in draw_rect_pwrite() argument
504 draw_rect_pwrite_untiled(fd, buf, rect, color); in draw_rect_pwrite()
508 draw_rect_pwrite_tiled(fd, buf, tiling, rect, color, swizzle); in draw_rect_pwrite()
517 struct buf_data *buf, struct rect *rect, in draw_rect_blt() argument
560 OUT_BATCH((rect->y << 16) | rect->x); in draw_rect_blt()
561 OUT_BATCH(((rect->y + rect->h) << 16) | (rect->x + rect->w)); in draw_rect_blt()
574 struct buf_data *buf, struct rect *rect, in draw_rect_render() argument
591 tmp.size = rect->w * rect->h * pixel_size; in draw_rect_render()
593 tmp.stride = rect->w * pixel_size; in draw_rect_render()
595 draw_rect_mmap_cpu(fd, &tmp, &(struct rect){0, 0, rect->w, rect->h}, in draw_rect_render()
617 rendercopy(batch, cmd_data->context, &src_buf, 0, 0, rect->w, in draw_rect_render()
618 rect->h, &dst_buf, rect->x, rect->y); in draw_rect_render()
661 struct rect rect = { in igt_draw_rect() local
670 draw_rect_mmap_cpu(fd, &buf, &rect, color); in igt_draw_rect()
673 draw_rect_mmap_gtt(fd, &buf, &rect, color); in igt_draw_rect()
676 draw_rect_mmap_wc(fd, &buf, &rect, color); in igt_draw_rect()
679 draw_rect_pwrite(fd, &buf, &rect, color); in igt_draw_rect()
682 draw_rect_blt(fd, &cmd_data, &buf, &rect, color); in igt_draw_rect()
685 draw_rect_render(fd, &cmd_data, &buf, &rect, color); in igt_draw_rect()