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.
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.