Mesa (main): d3d12: Plug context leaks
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 28 20:01:20 UTC 2022
Module: Mesa
Branch: main
Commit: d0144255837a4ce09c4d5c8a50f39651a69c7270
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0144255837a4ce09c4d5c8a50f39651a69c7270
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Fri Feb 11 13:08:42 2022 -0800
d3d12: Plug context leaks
Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15002>
---
src/gallium/drivers/d3d12/d3d12_context.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/d3d12/d3d12_context.cpp b/src/gallium/drivers/d3d12/d3d12_context.cpp
index d54f8aa31d2..26191519f67 100644
--- a/src/gallium/drivers/d3d12/d3d12_context.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_context.cpp
@@ -74,6 +74,7 @@ d3d12_context_destroy(struct pipe_context *pctx)
if (ctx->timestamp_query)
pctx->destroy_query(pctx, ctx->timestamp_query);
+ util_unreference_framebuffer_state(&ctx->fb);
util_blitter_destroy(ctx->blitter);
d3d12_end_batch(ctx, d3d12_current_batch(ctx));
for (unsigned i = 0; i < ARRAY_SIZE(ctx->batches); ++i)
@@ -89,6 +90,9 @@ d3d12_context_destroy(struct pipe_context *pctx)
d3d12_root_signature_cache_destroy(ctx);
d3d12_cmd_signature_cache_destroy(ctx);
d3d12_compute_transform_cache_destroy(ctx);
+ pipe_resource_reference(&ctx->pstipple.texture, nullptr);
+ pipe_sampler_view_reference(&ctx->pstipple.sampler_view, nullptr);
+ FREE(ctx->pstipple.sampler_cso);
u_suballocator_destroy(&ctx->query_allocator);
More information about the mesa-commit
mailing list