Mesa (master): iris: ref/unref the GLSL type singleton in screen_create/destroy
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 21 22:58:47 UTC 2020
Module: Mesa
Branch: master
Commit: d0a8ad77e99385175b8266f4dc4d66dd2baa85e7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0a8ad77e99385175b8266f4dc4d66dd2baa85e7
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Sat Aug 15 00:26:05 2020 -0500
iris: ref/unref the GLSL type singleton in screen_create/destroy
Otherwise, we can run into trouble if the driver is dynamically loaded
via pipe-loader.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6405>
---
src/gallium/drivers/iris/iris_screen.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index 754da070486..3b391f1db5d 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -51,6 +51,7 @@
#include "iris_pipe.h"
#include "iris_resource.h"
#include "iris_screen.h"
+#include "compiler/glsl_types.h"
#include "intel/compiler/brw_compiler.h"
#include "intel/common/gen_gem.h"
#include "intel/common/gen_l3_config.h"
@@ -521,6 +522,7 @@ iris_get_timestamp(struct pipe_screen *pscreen)
void
iris_screen_destroy(struct iris_screen *screen)
{
+ glsl_type_singleton_decref();
iris_bo_unreference(screen->workaround_bo);
u_transfer_helper_destroy(screen->base.transfer_helper);
iris_bufmgr_unref(screen->bufmgr);
@@ -775,5 +777,7 @@ iris_screen_create(int fd, const struct pipe_screen_config *config)
pscreen->get_driver_query_group_info = iris_get_monitor_group_info;
pscreen->get_driver_query_info = iris_get_monitor_info;
+ glsl_type_singleton_init_or_ref();
+
return pscreen;
}
More information about the mesa-commit
mailing list