summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-01-14 13:33:22 +0800
committerChia-I Wu <[email protected]>2014-01-14 15:19:41 +0800
commit5b1c516080989c950796a1e9087a07284887602b (patch)
tree7b4accd2a8d9634dd116916056b7dc1649de9bf0 /src
parentaf57378e599c00711bf1109fb84e6032668ecaa4 (diff)
ilo: fix a HiZ bo leakage
Dereference the HiZ bo when the texture is destroyed.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index e8c7b1e6c16..01d2d0853ec 100644
--- a/src/gallium/drivers/ilo/ilo_resource.c
+++ b/src/gallium/drivers/ilo/ilo_resource.c
@@ -1103,6 +1103,9 @@ tex_create_hiz(struct ilo_texture *tex, const struct tex_layout *layout)
static void
tex_destroy(struct ilo_texture *tex)
{
+ if (tex->hiz.bo)
+ intel_bo_unreference(tex->hiz.bo);
+
if (tex->separate_s8)
tex_destroy(tex->separate_s8);