commit 8cfaf35
Michael Forney
·
2013-07-19 06:43:51 +0000 UTC
parent 68bd56b
Ensure that we send another XY_SETUP_BLT if we need to flush in the middle of drawing text
1 files changed,
+16,
-6
M
intel.c
M
intel.c
+16,
-6
1@@ -177,12 +177,22 @@ void intel_draw_text_utf8(struct wld_drawable * drawable,
2 byte += (glyph->bitmap.width + 7) / 8;
3 }
4
5- xy_text_immediate_blt(&intel->context->batch, intel->bo,
6- x + glyph->x, y + glyph->y,
7- x + glyph->x + glyph->bitmap.width,
8- y + glyph->y + glyph->bitmap.rows,
9- (byte - immediate + 3) / 4,
10- (uint32_t *) immediate);
11+ retry:
12+ ret = xy_text_immediate_blt(&intel->context->batch, intel->bo,
13+ x + glyph->x, y + glyph->y,
14+ x + glyph->x + glyph->bitmap.width,
15+ y + glyph->y + glyph->bitmap.rows,
16+ (byte - immediate + 3) / 4,
17+ (uint32_t *) immediate);
18+
19+ if (ret == INTEL_BATCH_NO_SPACE)
20+ {
21+ intel_batch_flush(&intel->context->batch);
22+ xy_setup_blt(&intel->context->batch, true,
23+ INTEL_BLT_RASTER_OPERATION_SRC, 0, color,
24+ intel->bo, intel->drm.pitch);
25+ goto retry;
26+ }
27
28 advance:
29 x += glyph->advance;