summaryrefslogtreecommitdiff
path: root/src/sna/gen3_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-25 10:53:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-25 10:53:11 +0100
commit598dae9af99495cb738c6ddbe8602f8fa19dc0df (patch)
tree15c942ad6168ec379d96aac7e36e5263a43f5f19 /src/sna/gen3_render.c
parent3a05b1a4aa96f4d4484e7397b8e8d901819a3799 (diff)
sna/gen[35]: Remove dead code for choosing between BLT/render composite
For these gen, we always want to use BLT where possible - even if it incurs a context switch. 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.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index cb8f046d..4c058e1a 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -3119,52 +3119,6 @@ gen3_composite_picture(struct sna *sna,
x, y, w, h, dst_x, dst_y);
}
-static inline bool
-source_use_blt(struct sna *sna, PicturePtr picture)
-{
- /* If it is a solid, try to use the BLT paths */
- if (!picture->pDrawable)
- return picture->pSourcePict->type == SourcePictTypeSolidFill;
-
- if (picture->pDrawable->width == 1 &&
- picture->pDrawable->height == 1 &&
- picture->repeat)
- return true;
-
- if (too_large(picture->pDrawable->width, picture->pDrawable->height))
- return true;
-
- return !is_gpu(sna, picture->pDrawable, PREFER_GPU_RENDER);
-}
-
-static bool
-try_blt(struct sna *sna,
- PicturePtr dst,
- PicturePtr src,
- int width, int height)
-{
- if (sna->kgem.mode != KGEM_RENDER) {
- DBG(("%s: already performing BLT\n", __FUNCTION__));
- return true;
- }
-
- if (too_large(width, height)) {
- DBG(("%s: operation too large for 3D pipe (%d, %d)\n",
- __FUNCTION__, width, height));
- return true;
- }
-
- if (too_large(dst->pDrawable->width, dst->pDrawable->height)) {
- DBG(("%s: target too large for 3D pipe (%d, %d)\n",
- __FUNCTION__,
- dst->pDrawable->width, dst->pDrawable->height));
- return true;
- }
-
- /* is the source picture only in cpu memory e.g. a shm pixmap? */
- return source_use_blt(sna, src);
-}
-
static void
gen3_align_vertex(struct sna *sna,
const struct sna_composite_op *op)
@@ -3530,7 +3484,6 @@ gen3_render_composite(struct sna *sna,
* 3D -> 2D context switch.
*/
if (mask == NULL &&
- try_blt(sna, dst, src, width, height) &&
sna_blt_composite(sna,
op, src, dst,
src_x, src_y,