sna/gen5: If we need to flush the composite op, check to see if we can blit
If we need to halt the 3D engine in order to flush the pipeline for a dirty source, we may as well re-evaluate whether we can use the BLT instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
de530f89a3
commit
507debe801
|
|
@ -2174,8 +2174,19 @@ gen5_render_composite(struct sna *sna,
|
|||
tmp->dst.bo, tmp->src.bo, tmp->mask.bo, NULL))
|
||||
kgem_submit(&sna->kgem);
|
||||
|
||||
if (kgem_bo_is_dirty(tmp->src.bo) || kgem_bo_is_dirty(tmp->mask.bo))
|
||||
if (kgem_bo_is_dirty(tmp->src.bo) || kgem_bo_is_dirty(tmp->mask.bo)) {
|
||||
if (mask == NULL &&
|
||||
tmp->redirect.real_bo == NULL &&
|
||||
sna_blt_composite(sna, op,
|
||||
src, dst,
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height, tmp)) {
|
||||
kgem_bo_destroy(&sna->kgem, tmp->src.bo);
|
||||
return TRUE;
|
||||
}
|
||||
kgem_emit_flush(&sna->kgem);
|
||||
}
|
||||
|
||||
gen5_bind_surfaces(sna, tmp);
|
||||
gen5_align_vertex(sna, tmp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue