summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-08 13:15:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-08 13:15:46 +0000
commit4d8369f8e60fd4f5a0ef49f3e9866ea5ecb21927 (patch)
tree27e98c84e1231f8f46819e93c53735c3185a39c3 /src/sna/gen6_render.c
parent8634d461bd9e5a3d3f75b0efc11db87b8d3e1245 (diff)
sna/gen2+: Force upload rather than perform source transformations on the CPU
If both the source and destination is on the CPU, then the thinking was it would be quicker to operate on those on the CPU rather than copy both to the GPU and then perform the operation. This turns out to be a false assumption if transformation is involved -- something to be reconsidered if pixman should ever be improved. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 17789e96..1476ff7f 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2325,9 +2325,15 @@ has_alphamap(PicturePtr p)
}
static bool
+untransformed(PicturePtr p)
+{
+ return !p->transform || pixman_transform_is_int_translate(p->transform);
+}
+
+static bool
need_upload(PicturePtr p)
{
- return p->pDrawable && unattached(p->pDrawable);
+ return p->pDrawable && unattached(p->pDrawable) && untransformed(p);
}
static bool