summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2019-03-27 11:16:15 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2019-04-05 11:31:05 +0100
commit600f314d63ad3d916f1eaa46953f86846668685e (patch)
tree712de7f1ee01e1529b152be596c458e02998f225
parentcdd3eac6230ce2f192c57e74ed24115a9aa002dd (diff)
downloadmesa-600f314d63ad3d916f1eaa46953f86846668685e.tar.gz
Revert "anv/radv: release memory allocated by glsl types during spirv_to_nir"
This reverts commit 4e1bbb000cdfe4ba01bee5a6868c54fed7285dae. It turns out that some DXVK apps due to some implementation detail of DXVK or other create and destroy instances in an interleaved way. Freeing the glsl_type memory without being a bit more careful causes use-after-free issues. Looks like we need to try again. (cherry picked from commit ce47999ceed7efe010a1b6cc592780514803670a)
-rw-r--r--src/amd/vulkan/radv_device.c2
-rw-r--r--src/intel/vulkan/anv_device.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index ffc2e02fd80..8da75510ab2 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -49,7 +49,6 @@
#include "util/build_id.h"
#include "util/debug.h"
#include "util/mesa-sha1.h"
-#include "compiler/glsl_types.h"
static int
radv_device_get_cache_uuid(enum radeon_family family, void *uuid)
@@ -598,7 +597,6 @@ void radv_DestroyInstance(
VG(VALGRIND_DESTROY_MEMPOOL(instance));
- _mesa_glsl_release_types();
_mesa_locale_fini();
vk_debug_report_instance_destroy(&instance->debug_report_callbacks);
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index b460a03405a..b96166cfe28 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -41,7 +41,6 @@
#include "git_sha1.h"
#include "vk_util.h"
#include "common/gen_defines.h"
-#include "compiler/glsl_types.h"
#include "genxml/gen7_pack.h"
@@ -709,7 +708,6 @@ void anv_DestroyInstance(
vk_debug_report_instance_destroy(&instance->debug_report_callbacks);
- _mesa_glsl_release_types();
_mesa_locale_fini();
vk_free(&instance->alloc, instance);