diff options
author | Jakob Bornecrantz <[email protected]> | 2010-12-16 05:33:46 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2011-01-25 00:58:46 +0100 |
commit | becb733dbc87828c9a699364b3a0488e7d2f1276 (patch) | |
tree | 96188cbe22f73d9da2cfc87ea882c0798bf5ecda /src/gallium | |
parent | 4fabdf72eaa108382216222a1e455fd7ab9b027b (diff) |
rbug: Fix surface reference leak
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/rbug/rbug_objects.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/rbug/rbug_objects.c b/src/gallium/drivers/rbug/rbug_objects.c index 7d7cc482ae6..15f5db40093 100644 --- a/src/gallium/drivers/rbug/rbug_objects.c +++ b/src/gallium/drivers/rbug/rbug_objects.c @@ -98,8 +98,9 @@ rbug_surface_create(struct rbug_context *rb_context, pipe_reference_init(&rb_surface->base.reference, 1); rb_surface->base.texture = NULL; + rb_surface->base.context = &rb_context->base; + rb_surface->surface = surface; /* we own the surface already */ pipe_resource_reference(&rb_surface->base.texture, &rb_resource->base); - rb_surface->surface = surface; return &rb_surface->base; @@ -113,8 +114,7 @@ rbug_surface_destroy(struct rbug_context *rb_context, struct rbug_surface *rb_surface) { pipe_resource_reference(&rb_surface->base.texture, NULL); - rb_context->pipe->surface_destroy(rb_context->pipe, - rb_surface->surface); + pipe_surface_reference(&rb_surface->surface, NULL); FREE(rb_surface); } |