svga: Make sure that refcnt debugger gets the correct backtrace for create
authorJakob Bornecrantz <jakob@vmware.com>
Thu, 17 Feb 2011 17:14:44 +0000 (17:14 +0000)
committerJakob Bornecrantz <jakob@vmware.com>
Fri, 18 Feb 2011 14:46:46 +0000 (14:46 +0000)
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
src/gallium/drivers/svga/svga_resource_buffer.c
src/gallium/drivers/svga/svga_resource_texture.c

index 11c868a89b130e6effdc0209f287fd6fe7e5059a..e1f07d655b96f314c097878fa05cdaf7d956f508 100644 (file)
@@ -311,6 +311,9 @@ svga_buffer_create(struct pipe_screen *screen,
          goto error2;
    }
       
+   debug_reference(&sbuf->b.b.reference,
+                   (debug_reference_descriptor)debug_describe_resource, 0);
+
    return &sbuf->b.b; 
 
 error2:
@@ -344,6 +347,9 @@ svga_user_buffer_create(struct pipe_screen *screen,
 
    sbuf->swbuf = ptr;
    sbuf->user = TRUE;
+
+   debug_reference(&sbuf->b.b.reference,
+                   (debug_reference_descriptor)debug_describe_resource, 0);
    
    return &sbuf->b.b; 
 
index 3d430737e02ef092cbc4b283207104e14bd61d4e..3c6176a5e862c073b86d0473d38ac31a2361ace2 100644 (file)
@@ -565,6 +565,9 @@ svga_texture_create(struct pipe_screen *screen,
    if (tex->handle)
       SVGA_DBG(DEBUG_DMA, "  --> got sid %p (texture)\n", tex->handle);
 
+   debug_reference(&tex->b.b.reference,
+                   (debug_reference_descriptor)debug_describe_resource, 0);
+
    return &tex->b.b;
 
 error2: