summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index c81498d0968..54810d97d9e 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -149,6 +149,8 @@ anv_physical_device_init(struct anv_physical_device *device,
device->compiler->shader_debug_log = compiler_debug_log;
device->compiler->shader_perf_log = compiler_perf_log;
+ anv_init_wsi(device);
+
/* XXX: Actually detect bit6 swizzling */
isl_device_init(&device->isl_dev, device->info, swizzled);
@@ -162,6 +164,7 @@ fail:
static void
anv_physical_device_finish(struct anv_physical_device *device)
{
+ anv_finish_wsi(device);
ralloc_free(device->compiler);
}
@@ -272,14 +275,10 @@ VkResult anv_CreateInstance(
instance->apiVersion = client_version;
instance->physicalDeviceCount = -1;
- memset(instance->wsi, 0, sizeof(instance->wsi));
-
_mesa_locale_init();
VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
- anv_init_wsi(instance);
-
*pInstance = anv_instance_to_handle(instance);
return VK_SUCCESS;
@@ -297,8 +296,6 @@ void anv_DestroyInstance(
anv_physical_device_finish(&instance->physicalDevice);
}
- anv_finish_wsi(instance);
-
VG(VALGRIND_DESTROY_MEMPOOL(instance));
_mesa_locale_fini();