summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-04 13:43:03 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-04 13:43:03 +0000
commit567cfa508f788b4dd5de9aafbe2f148bb6a8dbc6 (patch)
tree9c355b3c03c9ab462be4739a4acf2c0e691f90c8 /src
parent465515a1446fd05fdc4691522803c94515187b4c (diff)
sna/gen6: Enable spans interface for boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen2_render.c1
-rw-r--r--src/sna/gen3_render.c1
-rw-r--r--src/sna/gen6_render.c10
-rw-r--r--src/sna/sna_render.h2
-rw-r--r--src/sna/sna_trapezoids.c5
5 files changed, 16 insertions, 3 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 2577493b..8908ae2a 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1684,6 +1684,7 @@ gen2_render_composite_spans(struct sna *sna,
int16_t src_x, int16_t src_y,
int16_t dst_x, int16_t dst_y,
int16_t width, int16_t height,
+ unsigned flags,
struct sna_composite_spans_op *tmp)
{
DBG(("%s(src=(%d, %d), dst=(%d, %d), size=(%d, %d))\n", __FUNCTION__,
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index 7f68b00a..c326364f 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2810,6 +2810,7 @@ gen3_render_composite_spans(struct sna *sna,
int16_t src_x, int16_t src_y,
int16_t dst_x, int16_t dst_y,
int16_t width, int16_t height,
+ unsigned flags,
struct sna_composite_spans_op *tmp)
{
bool no_offset;
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 99655b8a..7cb8e71f 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -50,7 +50,7 @@
#endif
#define NO_COMPOSITE 0
-#define NO_COMPOSITE_SPANS 1
+#define NO_COMPOSITE_SPANS 0
#define NO_COPY 0
#define NO_COPY_BOXES 0
#define NO_FILL 0
@@ -2465,10 +2465,14 @@ gen6_render_composite_spans(struct sna *sna,
int16_t src_x, int16_t src_y,
int16_t dst_x, int16_t dst_y,
int16_t width, int16_t height,
+ unsigned flags,
struct sna_composite_spans_op *tmp)
{
- DBG(("%s: %dx%d, current mode=%d\n", __FUNCTION__,
- width, height, sna->kgem.ring));
+ DBG(("%s: %dx%d with flags=%x, current mode=%d\n", __FUNCTION__,
+ width, height, flags, sna->kgem.ring));
+
+ if ((flags & COMPOSITE_SPANS_RECTILINEAR) == 0)
+ return FALSE;
if (op >= ARRAY_SIZE(gen6_blend_op))
return FALSE;
diff --git a/src/sna/sna_render.h b/src/sna/sna_render.h
index 774c576a..95720fa2 100644
--- a/src/sna/sna_render.h
+++ b/src/sna/sna_render.h
@@ -193,7 +193,9 @@ struct sna_render {
int16_t src_x, int16_t src_y,
int16_t dst_x, int16_t dst_y,
int16_t w, int16_t h,
+ unsigned flags,
struct sna_composite_spans_op *tmp);
+#define COMPOSITE_SPANS_RECTILINEAR 0x1
Bool (*video)(struct sna *sna,
struct sna_video *video,
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index a6b8562e..573841e7 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -2494,6 +2494,7 @@ composite_unaligned_boxes(CARD8 op,
extents.x1, extents.y1,
extents.x2 - extents.x1,
extents.y2 - extents.y1,
+ COMPOSITE_SPANS_RECTILINEAR,
&tmp)) {
DBG(("%s: composite spans render op not supported\n",
__FUNCTION__));
@@ -2790,6 +2791,7 @@ trapezoid_span_converter(CARD8 op, PicturePtr src, PicturePtr dst,
extents.x1, extents.y1,
extents.x2 - extents.x1,
extents.y2 - extents.y1,
+ 0,
&tmp)) {
DBG(("%s: fallback -- composite spans render op not supported\n",
__FUNCTION__));
@@ -3237,6 +3239,7 @@ trap_span_converter(PicturePtr dst,
extents.x1, extents.y1,
extents.x2 - extents.x1,
extents.y2 - extents.y1,
+ 0,
&tmp)) {
DBG(("%s: fallback -- composite spans render op not supported\n",
__FUNCTION__));
@@ -3773,6 +3776,7 @@ triangles_span_converter(CARD8 op, PicturePtr src, PicturePtr dst,
extents.x1, extents.y1,
extents.x2 - extents.x1,
extents.y2 - extents.y1,
+ 0,
&tmp)) {
DBG(("%s: fallback -- composite spans render op not supported\n",
__FUNCTION__));
@@ -4123,6 +4127,7 @@ tristrip_span_converter(CARD8 op, PicturePtr src, PicturePtr dst,
extents.x1, extents.y1,
extents.x2 - extents.x1,
extents.y2 - extents.y1,
+ 0,
&tmp)) {
DBG(("%s: fallback -- composite spans render op not supported\n",
__FUNCTION__));