sna/dri2: Initialize priv->cache_size

Silence a valgrind warning, though it should have no runtime impace.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-02-13 08:46:58 +00:00
parent 9df8119e1e
commit 8f04d6721f
2 changed files with 2 additions and 0 deletions

View File

@ -2910,6 +2910,7 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
DBG(("%s: handle=%d, size=%d\n", __FUNCTION__, bo->handle, bytes(bo)));
assert(list_is_empty(&bo->list));
assert(list_is_empty(&bo->vma));
assert(bo->refcnt == 0);
assert(bo->proxy == NULL);
assert(bo->active_scanout == 0);

View File

@ -1519,6 +1519,7 @@ draw_current_msc(DrawablePtr draw, xf86CrtcPtr crtc, uint64_t msc)
priv->msc_delta = 0;
priv->chain = NULL;
priv->scanout = -1;
priv->cache_size = 0;
list_init(&priv->cache);
dri2_window_attach((WindowPtr)draw, priv);
}