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

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

Issue 2352083002: Workaround for Adreno INITIALIZATION_FAILED bug (Closed)
Patch Set: Created 4 years, 3 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/vk/GrVkCaps.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 82e7394330459fa6ccd78c4db6cac7ad63503682..4d410a7b3a4ab289b91d7831b07d66a65e184b93 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -177,8 +177,15 @@ GrVkGpu::~GrVkGpu() {
#endif
#endif
- // VK_ERROR_DEVICE_LOST is acceptable when tearing down (see 4.2.4 in spec)
- SkASSERT(VK_SUCCESS == res || VK_ERROR_DEVICE_LOST == res);
+#ifdef SK_DEBUG
+ if (this->vkCaps().allowInitializationErrorOnTearDown()) {
+ SkASSERT(VK_SUCCESS == res ||
+ VK_ERROR_DEVICE_LOST == res ||
+ VK_ERROR_INITIALIZATION_FAILED == res);
+ } else {
+ SkASSERT(VK_SUCCESS == res || VK_ERROR_DEVICE_LOST == res);
+ }
+#endif
// must call this just before we destroy the VkDevice
fResourceProvider.destroyResources();
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698