[Mesa-dev] [PATCH v5 04/11] pipe-loader: use pipe_screen_unreference to destroy screen
Rob Herring
robh at kernel.org
Mon Aug 7 22:58:04 UTC 2017
Use pipe_screen_unreference as it will call pipe_screen->destroy() when
the pipe_screen is no longer referenced.
The pipe_screen referencing is done within create_screen() functions
as drivers (like amdgpu) may have special needs for ref counting.
Signed-off-by: Rob Herring <robh at kernel.org>
Cc: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/auxiliary/pipe-loader/pipe_loader.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 4ea3dc81a64a..db58e3d908fd 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -31,6 +31,7 @@
#include "util/u_memory.h"
#include "util/u_string.h"
#include "util/u_dl.h"
+#include "util/u_screen.h"
#include "util/u_thread.h"
#include "util/xmlconfig.h"
#include "util/xmlpool.h"
@@ -75,7 +76,7 @@ pipe_loader_release_dev(struct pipe_loader_device *dev)
{
mtx_lock(&loader_mutex);
- dev->pscreen->destroy(dev->pscreen);
+ pipe_screen_unreference(dev->pscreen);
dev->ops->release(&dev);
mtx_unlock(&loader_mutex);
--
2.11.0
More information about the mesa-dev
mailing list