summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/d3dadapter9
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-01-11 17:51:59 +0100
committerAxel Davy <[email protected]>2015-02-06 00:07:19 +0100
commit8b3a9d5c9f54a0c1b1e95cc61214fd69c6777680 (patch)
tree667be01dc4d6edcc53803355185c093d07d26c94 /src/gallium/targets/d3dadapter9
parent8f50614910c40366d94964fe2c5da5772aff2f96 (diff)
gallium/targets/d3dadapter9: Release the pipe_screen at destruction.
We weren't releasing hal and ref, causing some issues (threads not released, etc) Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/targets/d3dadapter9')
-rw-r--r--src/gallium/targets/d3dadapter9/drm.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c
index bdc402fea24..f054654d96e 100644
--- a/src/gallium/targets/d3dadapter9/drm.c
+++ b/src/gallium/targets/d3dadapter9/drm.c
@@ -79,14 +79,20 @@ struct d3dadapter9drm_context
static void
drm_destroy( struct d3dadapter9_context *ctx )
{
+ if (ctx->ref)
+ ctx->ref->destroy(ctx->ref);
+ /* because ref is a wrapper around hal, freeing ref frees hal too. */
+ else if (ctx->hal)
+ ctx->hal->destroy(ctx->hal);
#if !GALLIUM_STATIC_TARGETS
- struct d3dadapter9drm_context *drm = (struct d3dadapter9drm_context *)ctx;
+ {
+ struct d3dadapter9drm_context *drm = (struct d3dadapter9drm_context *)ctx;
- /* pipe_loader_sw destroys the context */
- if (drm->swdev)
- pipe_loader_release(&drm->swdev, 1);
- if (drm->dev)
- pipe_loader_release(&drm->dev, 1);
+ if (drm->swdev)
+ pipe_loader_release(&drm->swdev, 1);
+ if (drm->dev)
+ pipe_loader_release(&drm->dev, 1);
+ }
#endif
FREE(ctx);