Mesa (master): galahad: Use reference counting when destroying the wraped objects.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Jul 6 17:47:02 UTC 2012
Module: Mesa
Branch: master
Commit: d78dee167117cbdeab5807e151cac0e347812497
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d78dee167117cbdeab5807e151cac0e347812497
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Jul 6 18:31:15 2012 +0100
galahad: Use reference counting when destroying the wraped objects.
As the wrapped pipe driver may hold internal references.
---
src/gallium/drivers/galahad/glhd_objects.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/galahad/glhd_objects.c b/src/gallium/drivers/galahad/glhd_objects.c
index badd2e1..b44adff 100644
--- a/src/gallium/drivers/galahad/glhd_objects.c
+++ b/src/gallium/drivers/galahad/glhd_objects.c
@@ -105,7 +105,7 @@ galahad_surface_destroy(struct galahad_context *glhd_context,
struct galahad_surface *glhd_surface)
{
pipe_resource_reference(&glhd_surface->base.texture, NULL);
- glhd_context->pipe->surface_destroy(glhd_context->pipe, glhd_surface->surface);
+ pipe_surface_reference(&glhd_surface->surface, NULL);
FREE(glhd_surface);
}
@@ -140,9 +140,8 @@ void
galahad_sampler_view_destroy(struct galahad_context *glhd_context,
struct galahad_sampler_view *glhd_view)
{
+ pipe_sampler_view_reference(&glhd_view->sampler_view, NULL);
pipe_resource_reference(&glhd_view->base.texture, NULL);
- glhd_context->pipe->sampler_view_destroy(glhd_context->pipe,
- glhd_view->sampler_view);
FREE(glhd_view);
}
More information about the mesa-commit
mailing list