Lines Matching refs:wsi

206    struct wsi_x11 *wsi =  in wsi_x11_get_connection()  local
207 (struct wsi_x11 *)wsi_dev->wsi[VK_ICD_WSI_PLATFORM_XCB]; in wsi_x11_get_connection()
209 pthread_mutex_lock(&wsi->mutex); in wsi_x11_get_connection()
211 struct hash_entry *entry = _mesa_hash_table_search(wsi->connections, conn); in wsi_x11_get_connection()
216 pthread_mutex_unlock(&wsi->mutex); in wsi_x11_get_connection()
223 pthread_mutex_lock(&wsi->mutex); in wsi_x11_get_connection()
225 entry = _mesa_hash_table_search(wsi->connections, conn); in wsi_x11_get_connection()
230 entry = _mesa_hash_table_insert(wsi->connections, conn, wsi_conn); in wsi_x11_get_connection()
234 pthread_mutex_unlock(&wsi->mutex); in wsi_x11_get_connection()
1180 struct wsi_x11 *wsi; in wsi_x11_init_wsi() local
1183 wsi = vk_alloc(alloc, sizeof(*wsi), 8, in wsi_x11_init_wsi()
1185 if (!wsi) { in wsi_x11_init_wsi()
1190 int ret = pthread_mutex_init(&wsi->mutex, NULL); in wsi_x11_init_wsi()
1202 wsi->connections = _mesa_hash_table_create(NULL, _mesa_hash_pointer, in wsi_x11_init_wsi()
1204 if (!wsi->connections) { in wsi_x11_init_wsi()
1209 wsi->base.get_support = x11_surface_get_support; in wsi_x11_init_wsi()
1210 wsi->base.get_capabilities = x11_surface_get_capabilities; in wsi_x11_init_wsi()
1211 wsi->base.get_capabilities2 = x11_surface_get_capabilities2; in wsi_x11_init_wsi()
1212 wsi->base.get_formats = x11_surface_get_formats; in wsi_x11_init_wsi()
1213 wsi->base.get_formats2 = x11_surface_get_formats2; in wsi_x11_init_wsi()
1214 wsi->base.get_present_modes = x11_surface_get_present_modes; in wsi_x11_init_wsi()
1215 wsi->base.create_swapchain = x11_surface_create_swapchain; in wsi_x11_init_wsi()
1217 wsi_device->wsi[VK_ICD_WSI_PLATFORM_XCB] = &wsi->base; in wsi_x11_init_wsi()
1218 wsi_device->wsi[VK_ICD_WSI_PLATFORM_XLIB] = &wsi->base; in wsi_x11_init_wsi()
1223 pthread_mutex_destroy(&wsi->mutex); in wsi_x11_init_wsi()
1225 vk_free(alloc, wsi); in wsi_x11_init_wsi()
1227 wsi_device->wsi[VK_ICD_WSI_PLATFORM_XCB] = NULL; in wsi_x11_init_wsi()
1228 wsi_device->wsi[VK_ICD_WSI_PLATFORM_XLIB] = NULL; in wsi_x11_init_wsi()
1237 struct wsi_x11 *wsi = in wsi_x11_finish_wsi() local
1238 (struct wsi_x11 *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_XCB]; in wsi_x11_finish_wsi()
1240 if (wsi) { in wsi_x11_finish_wsi()
1242 hash_table_foreach(wsi->connections, entry) in wsi_x11_finish_wsi()
1245 _mesa_hash_table_destroy(wsi->connections, NULL); in wsi_x11_finish_wsi()
1247 pthread_mutex_destroy(&wsi->mutex); in wsi_x11_finish_wsi()
1249 vk_free(alloc, wsi); in wsi_x11_finish_wsi()