KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

LunarXchange issue #761 - vkGetImageSparseMemoryRequirements2 crashes when querying the count #2605

Closed jeremyk-lunarg closed 6 years ago

jeremyk-lunarg commented 6 years ago

Copied from LunarXchange Issue-761:

If i call vkGetImageSparseMemoryRequirements2(device, &info, &cnt, nullptr) with cnt = 0 to get the count of items returned, the validation layers crash in core_validation.cpp:4135 in PostCallRecordGetImageSparseMemoryRequirements2. The reqs parameter is my nullptr, but the req_count parameter is the overwritten result (in my case 1) returned by the driver. By the looks of it the loop that copies the data should only be executed if reqs is not null.

karl-lunarg commented 6 years ago

Closing, since #2606 fixes this issue.