diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-08 13:18:56 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-08 13:20:13 +0100 |
commit | c3d7f4c1cf7d052163b7c4e74bb202c618f0eb76 (patch) | |
tree | 03e5445bf0169cc49229b38f5d545df4dadc4b27 /src/sna/gen3_render.c | |
parent | 701473d20485a0557b4fb36efcbfbb8656e2f619 (diff) |
sna/gen3: Reset accumulated constants for each composite
In particular the glyph routines require the composite setup to
reinitialise state between glyph runs. This affects anything trying to
use glyphs without a mask with a gradient source, for example.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r-- | src/sna/gen3_render.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 529884c4..ed2eaf1e 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -2437,7 +2437,7 @@ try_blt(struct sna *sna, static void gen3_align_vertex(struct sna *sna, - struct sna_composite_op *op) + const struct sna_composite_op *op) { if (op->floats_per_vertex != sna->render_state.gen3.last_floats_per_vertex) { if (sna->render.vertex_size - sna->render.vertex_used < 2*op->floats_per_rect) @@ -2450,6 +2450,7 @@ gen3_align_vertex(struct sna *sna, (sna->render.vertex_used + op->floats_per_vertex - 1) / op->floats_per_vertex)); sna->render.vertex_index = (sna->render.vertex_used + op->floats_per_vertex - 1) / op->floats_per_vertex; sna->render.vertex_used = sna->render.vertex_index * op->floats_per_vertex; + assert(sna->render.vertex_used < sna->render.vertex_size - op->floats_per_rect); sna->render_state.gen3.last_floats_per_vertex = op->floats_per_vertex; } } @@ -2824,6 +2825,7 @@ gen3_render_composite(struct sna *sna, return FALSE; } + tmp->u.gen3.num_constants = 0; tmp->src.u.gen3.type = SHADER_TEXTURE; tmp->src.is_affine = TRUE; DBG(("%s: preparing source\n", __FUNCTION__)); |