Skip to content

Commit

Permalink
Add logging to identify allocation/bind failures for imported images.
Browse files Browse the repository at this point in the history
Summary:
When images are imported externally, we are seeing driver crashes in `vkBindImageMemory`

On Android release builds we don't see logging or have asserts enabled in `VK_ASSERT`, so add explicit logging to identify reasons (suspicion is **VK_ERROR_INVALID_EXTERNAL_HANDLE**)

Reviewed By: corporateshark

Differential Revision: D50245224

fbshipit-source-id: 0ee44eb3e491e31b692cf33ff1dbfd1bdb9dfa76
  • Loading branch information
Shayan Javed authored and facebook-github-bot committed Oct 13, 2023
1 parent af19adb commit 1acdf4d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/igl/vulkan/VulkanImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,16 @@ VulkanImage::VulkanImage(const VulkanContext& ctx,
memoryRequirements.memoryRequirements.memoryTypeBits,
memoryAllocateInfo.memoryTypeIndex);

// @fb-only
// @fb-only
// @fb-only
// @fb-only
// @fb-only
// @fb-only
// @fb-only
VK_ASSERT(ctx_.vf_.vkAllocateMemory(device_, &memoryAllocateInfo, nullptr, &vkMemory_));
VK_ASSERT(ctx_.vf_.vkBindImageMemory(device_, vkImage_, vkMemory_, 0));
// @fb-only
}

#if IGL_PLATFORM_WIN
Expand Down

0 comments on commit 1acdf4d

Please sign in to comment.