summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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