summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-08-04 18:05:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-08-04 18:05:03 +0100
commitd917a276bff4e933590e78404526b929b6b3b497 (patch)
tree2d02f49394aa7d7df48cb31a99f3293a25e43803 /src
parentd754bc3435889b5d19085588c9c888dc08f9522e (diff)
sna/gen4: Restore the w/a flush for fill/copy as well
So far, it looks like that the only one we can indeed drop is the composite with mask. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen4_render.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index d2dc3669..7dab92b7 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -60,13 +60,15 @@
#define NO_VIDEO 0
#if FLUSH_EVERY_VERTEX
+#define _FLUSH() do { \
+ gen4_vertex_flush(sna); \
+ OUT_BATCH(MI_FLUSH | MI_INHIBIT_RENDER_CACHE_FLUSH); \
+} while (0)
#define FLUSH(OP) do { \
- if ((OP)->mask.bo == NULL) { \
- gen4_vertex_flush(sna); \
- OUT_BATCH(MI_FLUSH | MI_INHIBIT_RENDER_CACHE_FLUSH); \
- } \
+ if ((OP)->mask.bo == NULL) _FLUSH(); \
} while (0)
#else
+#define _FLUSH()
#define FLUSH(OP)
#endif
@@ -1682,7 +1684,7 @@ gen4_render_video(struct sna *sna,
OUT_VERTEX_F((box->x1 - dxo) * src_scale_x);
OUT_VERTEX_F((box->y1 - dyo) * src_scale_y);
- FLUSH(&tmp);
+ _FLUSH();
if (!DAMAGE_IS_ALL(priv->gpu_damage)) {
sna_damage_add_box(&priv->gpu_damage, &r);
@@ -2750,6 +2752,8 @@ gen4_render_copy_one(struct sna *sna,
OUT_VERTEX(dx, dy);
OUT_VERTEX_F(sx*op->src.scale[0]);
OUT_VERTEX_F(sy*op->src.scale[1]);
+
+ _FLUSH();
}
static inline bool prefer_blt_copy(struct sna *sna, unsigned flags)
@@ -3075,6 +3079,8 @@ gen4_render_fill_rectangle(struct sna *sna,
OUT_VERTEX(x, y);
OUT_VERTEX_F(0);
OUT_VERTEX_F(0);
+
+ _FLUSH();
}
static bool