summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-23 10:17:34 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-23 10:28:47 +0000
commita48e6e0db970ad07cd7452ba24c362d0c2fcf1bf (patch)
treeb0f3dcc726fe1e2dbdcb3ad6ee44e45d38153801 /src
parent57c19b10db2b512c52a593fad98b5ac5db4f1497 (diff)
sna/gen3+: Force a batch flush when run out of CA vbo
As we prematurely end the batch if we bail on extending the vbo for CA glyphs, we need to force the flush. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen3_render.c3
-rw-r--r--src/sna/gen4_render.c1
-rw-r--r--src/sna/gen5_render.c1
-rw-r--r--src/sna/gen6_render.c15
-rw-r--r--src/sna/gen7_render.c15
5 files changed, 6 insertions, 29 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 5253a8c4..cb85cb9f 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -1761,6 +1761,7 @@ flush:
gen3_vertex_flush(sna);
gen3_magic_ca_pass(sna, op);
}
+ _kgem_submit(&sna->kgem);
return 0;
}
@@ -3109,7 +3110,7 @@ gen3_render_composite_spans_box(struct sna *sna,
box->x2 - box->x1,
box->y2 - box->y1));
- if (gen3_get_rectangles(sna, &op->base, 1) == 0) {
+ if (!gen3_get_rectangles(sna, &op->base, 1)) {
gen3_emit_composite_state(sna, &op->base);
gen3_get_rectangles(sna, &op->base, 1);
}
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 4bc2938b..cccdf4c6 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -1185,6 +1185,7 @@ flush:
gen4_vertex_flush(sna);
gen4_magic_ca_pass(sna, op);
}
+ _kgem_submit(&sna->kgem);
return 0;
}
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index ac55b09a..8d6a3e9f 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -1193,6 +1193,7 @@ flush:
gen5_vertex_flush(sna);
gen5_magic_ca_pass(sna, op);
}
+ _kgem_submit(&sna->kgem);
return 0;
}
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 035da78e..e9753289 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1658,6 +1658,7 @@ flush:
gen6_vertex_flush(sna);
gen6_magic_ca_pass(sna, op);
}
+ _kgem_submit(&sna->kgem);
return 0;
}
@@ -1772,7 +1773,6 @@ gen6_render_composite_blt(struct sna *sna,
const struct sna_composite_rectangles *r)
{
if (unlikely(!gen6_get_rectangles(sna, op, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_composite_state(sna, op);
gen6_get_rectangles(sna, op, 1);
}
@@ -1788,7 +1788,6 @@ gen6_render_composite_box(struct sna *sna,
struct sna_composite_rectangles r;
if (unlikely(!gen6_get_rectangles(sna, op, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_composite_state(sna, op);
gen6_get_rectangles(sna, op, 1);
}
@@ -1816,7 +1815,6 @@ gen6_render_composite_boxes(struct sna *sna,
do {
int nbox_this_time = gen6_get_rectangles(sna, op, nbox);
if (unlikely(nbox_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen6_emit_composite_state(sna, op);
nbox_this_time = gen6_get_rectangles(sna, op, nbox);
assert(nbox_this_time);
@@ -2071,7 +2069,6 @@ gen6_render_video(struct sna *sna,
r.y2 = box->y2 + pix_yoff;
if (unlikely(!gen6_get_rectangles(sna, &tmp, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_video_state(sna, &tmp, frame);
gen6_get_rectangles(sna, &tmp, 1);
}
@@ -2953,7 +2950,6 @@ gen6_render_composite_spans_box(struct sna *sna,
box->y2 - box->y1));
if (unlikely(gen6_get_rectangles(sna, &op->base, 1) == 0)) {
- _kgem_submit(&sna->kgem);
gen6_emit_composite_state(sna, &op->base);
gen6_get_rectangles(sna, &op->base, 1);
}
@@ -2978,7 +2974,6 @@ gen6_render_composite_spans_boxes(struct sna *sna,
nbox_this_time = gen6_get_rectangles(sna, &op->base, nbox);
if (unlikely(nbox_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen6_emit_composite_state(sna, &op->base);
nbox_this_time = gen6_get_rectangles(sna, &op->base, nbox);
assert(nbox_this_time);
@@ -3378,7 +3373,6 @@ fallback_blt:
float *v;
int n_this_time = gen6_get_rectangles(sna, &tmp, n);
if (unlikely(n_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen6_emit_copy_state(sna, &tmp);
n_this_time = gen6_get_rectangles(sna, &tmp, n);
}
@@ -3432,7 +3426,6 @@ gen6_render_copy_blt(struct sna *sna,
int16_t dx, int16_t dy)
{
if (unlikely(!gen6_get_rectangles(sna, &op->base, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_copy_state(sna, &op->base);
gen6_get_rectangles(sna, &op->base, 1);
}
@@ -3707,7 +3700,6 @@ gen6_render_fill_boxes(struct sna *sna,
do {
int n_this_time = gen6_get_rectangles(sna, &tmp, n);
if (unlikely(n_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen6_emit_fill_state(sna, &tmp);
n_this_time = gen6_get_rectangles(sna, &tmp, n);
}
@@ -3744,7 +3736,6 @@ gen6_render_op_fill_blt(struct sna *sna,
DBG(("%s: (%d, %d)x(%d, %d)\n", __FUNCTION__, x, y, w, h));
if (unlikely(!gen6_get_rectangles(sna, &op->base, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_fill_state(sna, &op->base);
gen6_get_rectangles(sna, &op->base, 1);
}
@@ -3771,7 +3762,6 @@ gen6_render_op_fill_box(struct sna *sna,
box->x1, box->y1, box->x2, box->y2));
if (unlikely(!gen6_get_rectangles(sna, &op->base, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_fill_state(sna, &op->base);
gen6_get_rectangles(sna, &op->base, 1);
}
@@ -3801,7 +3791,6 @@ gen6_render_op_fill_boxes(struct sna *sna,
do {
int nbox_this_time = gen6_get_rectangles(sna, &op->base, nbox);
if (unlikely(nbox_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen6_emit_fill_state(sna, &op->base);
nbox_this_time = gen6_get_rectangles(sna, &op->base, nbox);
}
@@ -3999,7 +3988,6 @@ gen6_render_fill_one(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo,
gen6_align_vertex(sna, &tmp);
if (unlikely(!gen6_get_rectangles(sna, &tmp, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_fill_state(sna, &tmp);
gen6_get_rectangles(sna, &tmp, 1);
}
@@ -4098,7 +4086,6 @@ gen6_render_clear(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo)
gen6_align_vertex(sna, &tmp);
if (unlikely(!gen6_get_rectangles(sna, &tmp, 1))) {
- _kgem_submit(&sna->kgem);
gen6_emit_fill_state(sna, &tmp);
gen6_get_rectangles(sna, &tmp, 1);
}
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index c872c633..d039a485 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1691,6 +1691,7 @@ flush:
gen7_vertex_flush(sna);
gen7_magic_ca_pass(sna, op);
}
+ _kgem_submit(&sna->kgem);
return 0;
}
@@ -1801,7 +1802,6 @@ gen7_render_composite_blt(struct sna *sna,
const struct sna_composite_rectangles *r)
{
if (unlikely(!gen7_get_rectangles(sna, op, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_composite_state(sna, op);
gen7_get_rectangles(sna, op, 1);
}
@@ -1817,7 +1817,6 @@ gen7_render_composite_box(struct sna *sna,
struct sna_composite_rectangles r;
if (unlikely(!gen7_get_rectangles(sna, op, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_composite_state(sna, op);
gen7_get_rectangles(sna, op, 1);
}
@@ -1845,7 +1844,6 @@ gen7_render_composite_boxes(struct sna *sna,
do {
int nbox_this_time = gen7_get_rectangles(sna, op, nbox);
if (unlikely(nbox_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen7_emit_composite_state(sna, op);
nbox_this_time = gen7_get_rectangles(sna, op, nbox);
}
@@ -2097,7 +2095,6 @@ gen7_render_video(struct sna *sna,
r.y2 = box->y2 + pix_yoff;
if (unlikely(!gen7_get_rectangles(sna, &tmp, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_video_state(sna, &tmp, frame);
gen7_get_rectangles(sna, &tmp, 1);
}
@@ -2945,7 +2942,6 @@ gen7_render_composite_spans_box(struct sna *sna,
box->y2 - box->y1));
if (unlikely(gen7_get_rectangles(sna, &op->base, 1) == 0)) {
- _kgem_submit(&sna->kgem);
gen7_emit_composite_state(sna, &op->base);
gen7_get_rectangles(sna, &op->base, 1);
}
@@ -2970,7 +2966,6 @@ gen7_render_composite_spans_boxes(struct sna *sna,
nbox_this_time = gen7_get_rectangles(sna, &op->base, nbox);
if (unlikely(nbox_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen7_emit_composite_state(sna, &op->base);
nbox_this_time = gen7_get_rectangles(sna, &op->base, nbox);
}
@@ -3363,7 +3358,6 @@ fallback_blt:
float *v;
int n_this_time = gen7_get_rectangles(sna, &tmp, n);
if (unlikely(n_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen7_emit_copy_state(sna, &tmp);
n_this_time = gen7_get_rectangles(sna, &tmp, n);
}
@@ -3417,7 +3411,6 @@ gen7_render_copy_blt(struct sna *sna,
int16_t dx, int16_t dy)
{
if (unlikely(!gen7_get_rectangles(sna, &op->base, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_copy_state(sna, &op->base);
gen7_get_rectangles(sna, &op->base, 1);
}
@@ -3689,7 +3682,6 @@ gen7_render_fill_boxes(struct sna *sna,
do {
int n_this_time = gen7_get_rectangles(sna, &tmp, n);
if (unlikely(n_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen7_emit_fill_state(sna, &tmp);
n_this_time = gen7_get_rectangles(sna, &tmp, n);
}
@@ -3726,7 +3718,6 @@ gen7_render_fill_op_blt(struct sna *sna,
DBG(("%s: (%d, %d)x(%d, %d)\n", __FUNCTION__, x, y, w, h));
if (unlikely(!gen7_get_rectangles(sna, &op->base, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_fill_state(sna, &op->base);
gen7_get_rectangles(sna, &op->base, 1);
}
@@ -3753,7 +3744,6 @@ gen7_render_fill_op_box(struct sna *sna,
box->x1, box->y1, box->x2, box->y2));
if (unlikely(!gen7_get_rectangles(sna, &op->base, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_fill_state(sna, &op->base);
gen7_get_rectangles(sna, &op->base, 1);
}
@@ -3783,7 +3773,6 @@ gen7_render_fill_op_boxes(struct sna *sna,
do {
int nbox_this_time = gen7_get_rectangles(sna, &op->base, nbox);
if (unlikely(nbox_this_time == 0)) {
- _kgem_submit(&sna->kgem);
gen7_emit_fill_state(sna, &op->base);
nbox_this_time = gen7_get_rectangles(sna, &op->base, nbox);
}
@@ -3979,7 +3968,6 @@ gen7_render_fill_one(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo,
gen7_align_vertex(sna, &tmp);
if (unlikely(!gen7_get_rectangles(sna, &tmp, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_fill_state(sna, &tmp);
gen7_get_rectangles(sna, &tmp, 1);
}
@@ -4078,7 +4066,6 @@ gen7_render_clear(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo)
gen7_align_vertex(sna, &tmp);
if (unlikely(!gen7_get_rectangles(sna, &tmp, 1))) {
- _kgem_submit(&sna->kgem);
gen7_emit_fill_state(sna, &tmp);
gen7_get_rectangles(sna, &tmp, 1);
}