uxa: Remove caching of surface binding location

If the pixmap were to be used multiple times within a batch with
mulitple formats, the cache would only return the initial location with
the incorrect format and so cause rendering glitches. For instance, GTK+
uses the same pixmap as an xrgb source and as an argb mask in order to
premultiply and composite in a single pass. Rather than introduce an
overly complication caching (handle, format) mechanism, kiss and remove
the invalid implementation.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40926
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-03 20:41:31 +00:00
parent a1b40a20bb
commit 2174f84015
3 changed files with 0 additions and 33 deletions

View File

@ -1292,14 +1292,6 @@ gen4_set_picture_surface_state(intel_screen_private *intel,
}
intel_batch_mark_pixmap_domains(intel, priv,
read_domains, write_domain);
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);
@ -1330,11 +1322,6 @@ gen4_set_picture_surface_state(intel_screen_private *intel,
offset = intel->surface_used;
intel->surface_used += SURFACE_STATE_PADDED_SIZE;
if (is_dst)
priv->dst_bound = offset;
else
priv->src_bound = offset;
return offset;
}
@ -1357,14 +1344,6 @@ gen7_set_picture_surface_state(intel_screen_private *intel,
}
intel_batch_mark_pixmap_domains(intel, priv,
read_domains, write_domain);
if (is_dst) {
if (priv->dst_bound)
return priv->dst_bound;
} else {
if (priv->src_bound)
return priv->src_bound;
}
ss = (struct gen7_surface_state *)
(intel->surface_data + intel->surface_used);
@ -1393,11 +1372,6 @@ gen7_set_picture_surface_state(intel_screen_private *intel,
offset = intel->surface_used;
intel->surface_used += SURFACE_STATE_PADDED_SIZE;
if (is_dst)
priv->dst_bound = offset;
else
priv->src_bound = offset;
return offset;
}
@ -1750,8 +1724,6 @@ static Bool i965_composite_check_aperture(intel_screen_private *intel)
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);
@ -1768,9 +1740,6 @@ 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;
}
static void

View File

@ -176,7 +176,6 @@ 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;

View File

@ -636,7 +636,6 @@ void intel_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
if (priv->bo == bo)
return;
priv->dst_bound = priv->src_bound = 0;
if (list_is_empty(&priv->batch)) {
dri_bo_unreference(priv->bo);
} else if (!drm_intel_bo_is_reusable(priv->bo)) {