nv50: count wrapped textures towards the tex_obj count
authorJoakim Sindholt <opensource@zhasha.com>
Mon, 8 Jul 2013 14:05:39 +0000 (16:05 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 23 May 2014 16:34:39 +0000 (12:34 -0400)
But don't count their size towards the allocated memory, since that
belongs to whoever created it.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_miptree.c

index 513d8f96aace7d57bf0f87dae0f5b045dd644c26..4c5517978c01d686937488cf3a8effbe5babbf5e 100644 (file)
@@ -404,6 +404,8 @@ nv50_miptree_from_handle(struct pipe_screen *pscreen,
    mt->level[0].offset = 0;
    mt->level[0].tile_mode = mt->base.bo->config.nv50.tile_mode;
 
+   NOUVEAU_DRV_STAT(nouveau_screen(pscreen), tex_obj_current_count, 1);
+
    /* no need to adjust bo reference count */
    return &mt->base.base;
 }