sna: Assert that the GPU damage is NULL before destroy a proxy
If the GPU bo is a proxy, then it really is a pointer into a upload buffer for CPU data. In these cases, there should never be any GPU damage lying around. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
d90a123db7
commit
1e2fd66ade
|
|
@ -11783,6 +11783,7 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect)
|
|||
if (region_subsumes_damage(®ion, priv->cpu_damage)) {
|
||||
DBG(("%s: discarding existing CPU damage\n", __FUNCTION__));
|
||||
if (priv->gpu_bo && priv->gpu_bo->proxy) {
|
||||
assert(priv->gpu_damage == NULL);
|
||||
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
|
||||
priv->gpu_bo = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -921,6 +921,7 @@ sna_composite_rectangles(CARD8 op,
|
|||
region_subsumes_damage(®ion, priv->cpu_damage)) {
|
||||
DBG(("%s: discarding existing CPU damage\n", __FUNCTION__));
|
||||
if (priv->gpu_bo && priv->gpu_bo->proxy) {
|
||||
assert(priv->gpu_damage == NULL);
|
||||
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
|
||||
priv->gpu_bo = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue