summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i965_render.c18
-rw-r--r--src/intel.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/i965_render.c b/src/i965_render.c
index c944ed04..fffcae7f 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1121,6 +1121,14 @@ i965_set_picture_surface_state(intel_screen_private *intel,
struct brw_surface_state *ss;
int offset;
+ if (is_dst) {
+ if (priv->dst_bound)
+ return priv->dst_bound;
+ } else {
+ if (priv->src_bound)
+ return priv->src_bound;
+ }
+
ss = (struct brw_surface_state *)
(intel->surface_data + intel->surface_used);
@@ -1170,6 +1178,11 @@ i965_set_picture_surface_state(intel_screen_private *intel,
offset = intel->surface_used;
intel->surface_used += sizeof(struct brw_surface_state_padded);
+ if (is_dst)
+ priv->dst_bound = offset;
+ else
+ priv->src_bound = offset;
+
return offset;
}
@@ -1511,6 +1524,8 @@ static Bool i965_composite_check_aperture(ScrnInfoPtr scrn)
static void i965_surface_flush(struct intel_screen_private *intel)
{
+ struct intel_pixmap *priv;
+
drm_intel_bo_subdata(intel->surface_bo,
0, intel->surface_used,
intel->surface_data);
@@ -1527,6 +1542,9 @@ static void i965_surface_flush(struct intel_screen_private *intel)
intel->surface_bo =
drm_intel_bo_alloc(intel->bufmgr, "surface data",
sizeof(intel->surface_data), 4096);
+
+ list_foreach_entry(priv, struct intel_pixmap, &intel->batch_pixmaps, batch)
+ priv->dst_bound = priv->src_bound = 0;
}
Bool
diff --git a/src/intel.h b/src/intel.h
index 490c221f..06bb740f 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -172,6 +172,7 @@ struct intel_pixmap {
struct list flush, batch, in_flight;
+ uint16_t src_bound, dst_bound;
uint16_t stride;
uint8_t tiling;
int8_t busy :2;