Index: src/gpu/vk/GrVkResourceProvider.cpp |
diff --git a/src/gpu/vk/GrVkResourceProvider.cpp b/src/gpu/vk/GrVkResourceProvider.cpp |
index 31d5568b603030046fcab264dd3a2194f578cc43..4f6c7927c752b58ebd4c6d89de36d76230cc3e3e 100644 |
--- a/src/gpu/vk/GrVkResourceProvider.cpp |
+++ b/src/gpu/vk/GrVkResourceProvider.cpp |
@@ -261,10 +261,6 @@ void GrVkResourceProvider::destroyResources() { |
fPipelineStateCache->release(); |
-#ifdef SK_TRACE_VK_RESOURCES |
- SkASSERT(0 == GrVkResource::fTrace.count()); |
-#endif |
- |
GR_VK_CALL(fGpu->vkInterface(), DestroyPipelineCache(fGpu->device(), fPipelineCache, nullptr)); |
fPipelineCache = VK_NULL_HANDLE; |
@@ -275,6 +271,10 @@ void GrVkResourceProvider::destroyResources() { |
fUniformDescLayout = VK_NULL_HANDLE; |
} |
fUniformDescPool->unref(fGpu); |
+ |
+#ifdef SK_TRACE_VK_RESOURCES |
+ SkASSERT(0 == GrVkResource::fTrace.count()); |
+#endif |
} |
void GrVkResourceProvider::abandonResources() { |
@@ -300,13 +300,14 @@ void GrVkResourceProvider::abandonResources() { |
fPipelineStateCache->abandon(); |
-#ifdef SK_TRACE_VK_RESOURCES |
- SkASSERT(0 == GrVkResource::fTrace.count()); |
-#endif |
fPipelineCache = VK_NULL_HANDLE; |
fUniformDescLayout = VK_NULL_HANDLE; |
fUniformDescPool->unrefAndAbandon(); |
+ |
+#ifdef SK_TRACE_VK_RESOURCES |
+ SkASSERT(0 == GrVkResource::fTrace.count()); |
+#endif |
} |
//////////////////////////////////////////////////////////////////////////////// |