Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Side by Side Diff: src/gpu/vk/GrVkBackendContext.cpp

Issue 1876863004: Wait for all device work to finish before destroy VkDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "vk/GrVkBackendContext.h" 8 #include "vk/GrVkBackendContext.h"
9 #include "vk/GrVkExtensions.h" 9 #include "vk/GrVkExtensions.h"
10 #include "vk/GrVkInterface.h" 10 #include "vk/GrVkInterface.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 ctx->fQueueFamilyIndex = graphicsQueueIndex; 231 ctx->fQueueFamilyIndex = graphicsQueueIndex;
232 ctx->fMinAPIVersion = kGrVkMinimumVersion; 232 ctx->fMinAPIVersion = kGrVkMinimumVersion;
233 ctx->fExtensions = extensionFlags; 233 ctx->fExtensions = extensionFlags;
234 ctx->fFeatures = featureFlags; 234 ctx->fFeatures = featureFlags;
235 ctx->fInterface.reset(GrVkCreateInterface(inst, device, extensionFlags)); 235 ctx->fInterface.reset(GrVkCreateInterface(inst, device, extensionFlags));
236 236
237 return ctx; 237 return ctx;
238 } 238 }
239 239
240 GrVkBackendContext::~GrVkBackendContext() { 240 GrVkBackendContext::~GrVkBackendContext() {
241 vkDeviceWaitIdle(fDevice);
241 vkDestroyDevice(fDevice, nullptr); 242 vkDestroyDevice(fDevice, nullptr);
242 fDevice = VK_NULL_HANDLE; 243 fDevice = VK_NULL_HANDLE;
243 vkDestroyInstance(fInstance, nullptr); 244 vkDestroyInstance(fInstance, nullptr);
244 fInstance = VK_NULL_HANDLE; 245 fInstance = VK_NULL_HANDLE;
245 } 246 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698