Skip to content

Commit

Permalink
vk: assert updateImage is called with non-empty size (#7315)
Browse files Browse the repository at this point in the history
BUG=303073160
  • Loading branch information
poweifeng authored Oct 31, 2023
1 parent fcf53f2 commit ef3f0cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions filament/backend/src/vulkan/VulkanTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ void VulkanTexture::updateImage(const PixelBufferDescriptor& data, uint32_t widt
return;
}

assert_invariant(hostData->size > 0 && "Data is empty");

// Otherwise, use vkCmdCopyBufferToImage.
void* mapped = nullptr;
VulkanStage const* stage = mStagePool.acquireStage(hostData->size);
Expand Down

0 comments on commit ef3f0cb

Please sign in to comment.