Index: src/gpu/vk/GrVkImage.cpp |
diff --git a/src/gpu/vk/GrVkImage.cpp b/src/gpu/vk/GrVkImage.cpp |
index a87a7a5a4975b0bd21cf49cc1ac7dc6a25e221ff..a61d934b72d2ea384334a1540f85aa9e53d78008 100644 |
--- a/src/gpu/vk/GrVkImage.cpp |
+++ b/src/gpu/vk/GrVkImage.cpp |
@@ -49,8 +49,6 @@ const GrVkImage::Resource* GrVkImage::CreateResource(const GrVkGpu* gpu, |
VkImage image = 0; |
VkDeviceMemory alloc; |
- VkResult err; |
- |
VkImageLayout initialLayout = (VK_IMAGE_TILING_LINEAR == imageDesc.fImageTiling) |
? VK_IMAGE_LAYOUT_PREINITIALIZED |
: VK_IMAGE_LAYOUT_UNDEFINED; |
@@ -78,8 +76,7 @@ const GrVkImage::Resource* GrVkImage::CreateResource(const GrVkGpu* gpu, |
initialLayout // initialLayout |
}; |
- err = VK_CALL(gpu, CreateImage(gpu->device(), &imageCreateInfo, nullptr, &image)); |
- SkASSERT(!err); |
+ GR_VK_CALL_ERRCHECK(gpu->vkInterface(), CreateImage(gpu->device(), &imageCreateInfo, nullptr, &image)); |
if (!GrVkMemory::AllocAndBindImageMemory(gpu, image, imageDesc.fMemProps, &alloc)) { |
VK_CALL(gpu, DestroyImage(gpu->device(), image, nullptr)); |
@@ -115,4 +112,4 @@ void GrVkImage::abandonImage() { |
void GrVkImage::Resource::freeGPUData(const GrVkGpu* gpu) const { |
VK_CALL(gpu, DestroyImage(gpu->device(), fImage, nullptr)); |
VK_CALL(gpu, FreeMemory(gpu->device(), fAlloc, nullptr)); |
-} |
+} |