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

Unified Diff: src/gpu/vk/GrVkGpu.cpp

Issue 1818093002: Minor fixes to avoid NVPR in Vulkan and provide good GrVkGpu teardown. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContextFactory.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkGpu.cpp
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 96c74ddd5dc1df2217723b50877adb93baec072d..0666f10f7e200cc421a77616cf43f575d1cb8bae 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -356,9 +356,11 @@ GrVkGpu::~GrVkGpu() {
fCurrentCmdBuffer->unref(this);
// wait for all commands to finish
+ fResourceProvider.checkCommandBuffers();
VkResult res = VK_CALL(QueueWaitIdle(fQueue));
- SkASSERT(res == VK_SUCCESS);
-
+ // VK_ERROR_DEVICE_LOST is acceptable when tearing down (see 4.2.4 in spec)
+ SkASSERT(VK_SUCCESS == res || VK_ERROR_DEVICE_LOST == res);
+
// must call this just before we destroy the VkDevice
fResourceProvider.destroyResources();
« no previous file with comments | « src/gpu/GrContextFactory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698