From 99d955263ba4665462f8ebd8ed643019c2cd9621 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 17 Feb 2011 17:14:44 +0000 Subject: [PATCH] svga: Make sure that refcnt debugger gets the correct backtrace for create Signed-off-by: Jakob Bornecrantz --- src/gallium/drivers/svga/svga_resource_buffer.c | 6 ++++++ src/gallium/drivers/svga/svga_resource_texture.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c index 11c868a89b1..e1f07d655b9 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.c +++ b/src/gallium/drivers/svga/svga_resource_buffer.c @@ -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; diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 3d430737e02..3c6176a5e86 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -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: -- 2.30.2