[Mesa-dev,v5,05/12] pipe-loader: use pipe_screen_unreference to destroy screen

Submitted by Rob Herring on Aug. 7, 2017, 10:58 p.m.

Details

Message ID 20170807225819.13831-8-robh@kernel.org
State New
Headers show

Not browsing as part of any series.

Patch hide | download patch | download mbox

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);