diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-07 22:54:37 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-08 11:23:02 +0000 |
commit | c69b4389abc324533a9a311c17a667bf8a1e1673 (patch) | |
tree | ed7897e81fdfff4cb7724baa6eb5d8465d00ac28 /src/sna/gen2_render.c | |
parent | bec99de812ce6a1bbc2c8e4cfd05f4f74c560ea6 (diff) |
sna/gen4: Split the have_render flag in separate prefer_gpu hints
The idea is to implement more fine-grained checks as we may want
different heuristics for desktops with GT1s than for mobile GT2s, etc.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen2_render.c')
-rw-r--r-- | src/sna/gen2_render.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index b539e278..4d92adcf 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -2227,7 +2227,7 @@ gen2_check_composite_spans(struct sna *sna, return false; if (need_tiling(sna, width, height)) { - if (!is_gpu(dst->pDrawable)) { + if (!is_gpu(sna, dst->pDrawable, PREFER_GPU_SPANS)) { DBG(("%s: fallback, tiled operation not on GPU\n", __FUNCTION__)); return false; @@ -3143,10 +3143,12 @@ bool gen2_render_init(struct sna *sna) */ #if !NO_COMPOSITE render->composite = gen2_render_composite; + render->prefer_gpu |= PREFER_GPU_RENDER; #endif #if !NO_COMPOSITE_SPANS render->check_composite_spans = gen2_check_composite_spans; render->composite_spans = gen2_render_composite_spans; + render->prefer_gpu |= PREFER_GPU_SPANS; #endif render->fill_boxes = gen2_render_fill_boxes; render->fill = gen2_render_fill; |