summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-22 11:42:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-22 11:51:59 +0000
commit6c08eb4d6f8789e692ef018e007d1ae97a57c25f (patch)
tree11a07be5fbfbaa1557b92dfad7d32ec1686b8f6c
parent354dc3c65b9cb86885b6927ee2b80cd2ee6a82ff (diff)
sna/gen2+: Prefer to use the CPU if we have a source alphamap and CPU pictures
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen2_render.c8
-rw-r--r--src/sna/gen3_render.c8
-rw-r--r--src/sna/gen4_render.c8
-rw-r--r--src/sna/gen5_render.c8
-rw-r--r--src/sna/gen6_render.c8
-rw-r--r--src/sna/gen7_render.c8
6 files changed, 42 insertions, 6 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index d10f03e6..53accbd1 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1304,9 +1304,15 @@ is_gradient(PicturePtr picture)
}
static bool
+has_alphamap(PicturePtr p)
+{
+ return p->alphaMap != NULL;
+}
+
+static bool
source_fallback(PicturePtr p)
{
- return is_gradient(p) || !gen2_check_filter(p) || !gen2_check_repeat(p);
+ return has_alphamap(p) || is_gradient(p) || !gen2_check_filter(p) || !gen2_check_repeat(p);
}
static bool
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 4ada863d..1dec2b3a 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2297,9 +2297,15 @@ is_solid(PicturePtr picture)
}
static bool
+has_alphamap(PicturePtr p)
+{
+ return p->alphaMap != NULL;
+}
+
+static bool
source_fallback(PicturePtr p)
{
- return !gen3_check_filter(p->filter) || !gen3_check_repeat(p);
+ return has_alphamap(p) || !gen3_check_filter(p->filter) || !gen3_check_repeat(p);
}
static bool
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index aec5ca04..150b7c83 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -1911,9 +1911,15 @@ is_gradient(PicturePtr picture)
}
static bool
+has_alphamap(PicturePtr p)
+{
+ return p->alphaMap != NULL;
+}
+
+static bool
source_fallback(PicturePtr p)
{
- return is_gradient(p) || !gen4_check_filter(p) || !gen4_check_repeat(p);
+ return has_alphamap(p) || is_gradient(p) || !gen4_check_filter(p) || !gen4_check_repeat(p);
}
static bool
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 6d89ca3a..e1117cc6 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -1953,9 +1953,15 @@ is_gradient(PicturePtr picture)
}
static bool
+has_alphamap(PicturePtr p)
+{
+ return p->alphaMap != NULL;
+}
+
+static bool
source_fallback(PicturePtr p)
{
- return is_gradient(p) || !gen5_check_filter(p) || !gen5_check_repeat(p);
+ return has_alphamap(p) || is_gradient(p) || !gen5_check_filter(p) || !gen5_check_repeat(p);
}
static bool
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index c276f7e8..7d481374 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2128,9 +2128,15 @@ is_gradient(PicturePtr picture)
}
static bool
+has_alphamap(PicturePtr p)
+{
+ return p->alphaMap != NULL;
+}
+
+static bool
source_fallback(PicturePtr p)
{
- return is_gradient(p) || !gen6_check_filter(p) || !gen6_check_repeat(p);
+ return has_alphamap(p) || is_gradient(p) || !gen6_check_filter(p) || !gen6_check_repeat(p);
}
static bool
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index dc97d181..885a5dcd 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2241,9 +2241,15 @@ is_gradient(PicturePtr picture)
}
static bool
+has_alphamap(PicturePtr p)
+{
+ return p->alphaMap != NULL;
+}
+
+static bool
source_fallback(PicturePtr p)
{
- return is_gradient(p) || !gen7_check_filter(p) || !gen7_check_repeat(p);
+ return has_alphamap(p) || is_gradient(p) || !gen7_check_filter(p) || !gen7_check_repeat(p);
}
static bool