diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-04 11:43:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-04 12:54:27 +0100 |
commit | 2cdd57c804706bcf558d16d3370c1880ef482af1 (patch) | |
tree | 82e47790af6f68b3b1d67eee95d75d00fd0ae19b /src | |
parent | 1f7e20d812ef46fa0cba492e06a8f9f5a326d3c5 (diff) |
sna/trapezoids: Some minor DBG to investigate threaded rendering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen4_vertex.c | 6 | ||||
-rw-r--r-- | src/sna/sna_trapezoids.c | 16 | ||||
-rw-r--r-- | src/sna/sna_video_sprite.c | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/sna/gen4_vertex.c b/src/sna/gen4_vertex.c index a82f9618..dab11e8b 100644 --- a/src/sna/gen4_vertex.c +++ b/src/sna/gen4_vertex.c @@ -1906,9 +1906,9 @@ emit_composite_spans_primitive(struct sna *sna, sse2 fastcall static void emit_span_solid(struct sna *sna, - const struct sna_composite_spans_op *op, - const BoxRec *box, - float opacity) + const struct sna_composite_spans_op *op, + const BoxRec *box, + float opacity) { float *v; union { diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index feb1d40d..04c8448c 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -4123,15 +4123,15 @@ choose_span(struct sna_composite_spans_op *tmp, /* XXX An imprecise approximation */ if (maskFormat && !operator_is_bounded(tmp->base.op)) { span = tor_blt_span_mono_unbounded; - if (REGION_NUM_RECTS(clip) > 1) + if (clip->data) span = tor_blt_span_mono_unbounded_clipped; } else { span = tor_blt_span_mono; - if (REGION_NUM_RECTS(clip) > 1) + if (clip->data) span = tor_blt_span_mono_clipped; } } else { - if (REGION_NUM_RECTS(clip) > 1) + if (clip->data) span = tor_blt_span_clipped; else if (tmp->base.damage == NULL) span = tor_blt_span__no_damage; @@ -4485,13 +4485,18 @@ thread_choose_span(struct sna_composite_spans_op *tmp, { span_func_t span; - if (tmp->base.damage) + if (tmp->base.damage) { + DBG(("%s: damaged -> no thread support\n", __FUNCTION__)); return NULL; + } if (is_mono(dst, maskFormat)) { + DBG(("%s: mono rendering -> no thread support\n", __FUNCTION__)); return NULL; } else { - if (REGION_NUM_RECTS(clip) > 1) + assert(tmp->thread_boxes); + DBG(("%s: clipped? %d\n", __FUNCTION__, clip->data != NULL)); + if (clip->data) span = span_thread_clipped_box; else span = span_thread_box; @@ -4667,6 +4672,7 @@ trapezoid_span_converter(struct sna *sna, num_threads = sna_use_threads(extents.x2-extents.x1, extents.y2-extents.y1, 16); + DBG(("%s: using %d threads\n", __FUNCTION__, num_threads)); if (num_threads == 1) { struct tor tor; diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c index 71482539..07e59bd4 100644 --- a/src/sna/sna_video_sprite.c +++ b/src/sna/sna_video_sprite.c @@ -87,7 +87,7 @@ static int sna_video_sprite_set_attr(ClientPtr client, if (attribute == xvColorKey) { video->color_key_changed = true; video->color_key = value; - DBG(("COLORKEY = %d\n", value)); + DBG(("COLORKEY = %ld\n", (long)value)); } else return BadMatch; |