vk: assert updateImage is called with non-empty size (#7315)

BUG=303073160
This commit is contained in:
Powei Feng
2023-10-31 10:36:07 -07:00
committed by GitHub
parent fcf53f2c3e
commit ef3f0cb326

View File

@@ -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);