-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch leaks from VMA_ASSERT to VMA_ASSERT_LEAK. #385
Comments
I think this is a great idea to introduce a separate macro I am not sure about these two asserts checking if |
Pretty sure those were firing, but I had to be safe than sorry. And I caught and fixed another one in our crash reports that's not listed above. Here's all my current mods to vk_mem_alloc.h if they help. There was a mod to logging too. |
OK, I made some more changes based on your code. I can see you use some old version of the library. I recommend merging latest from the "master" branch, as it contains some bug fixes. |
Okay, I updated our vk_mem_alloc.h to latest.
Also in my version, there is this construct. This allows the leaks to log but not all the other spam from VMA_DEBUG_LOG. Not sure that the VMA_DEBUG_LOG_FORMAT was needed. Our log works with varargs, and does printflike testing of incoming arguments. The default printf should do the same, so you should see problem 3 above. This is due to x86 vs x64, and also x64 win using long int for uint64_t, and everyone else using long long.
|
Also I saw a comment about old constructs on Android in our version, and we had a workaround. Android jumped from Vulkan 1.1 headers to 1.3, but only in NDK 25. Should really move to NDK 26, since they finally added weak symbols like on macOS/iOS. So can then call ahead to newer NDK calls without all the hassle. Looks like code is using the older version of these calls now, so this fix isn't needed.
|
Also our code wasn't building on Android due to use of VK_ERROR_UKNOWN instead of VK_ERROR_UNKNOWN_COPY in 2 spots.
|
Thank you for reporting these issues. I made some fixes as you requested. |
These are all of the asserts that I turned into VMA_ASSERT_LEAK. While I agree that leaks are important to track, when the app is shutting down, I really don't want it to abort. So these go to a non-asserting abort. But still want the rest of the allocator to assert if there is an issue.
Now I see all the leaks at shutdown, instead of having the app abort() at the first leak. And I still see the rest of my shutdown leaks and issues.
The text was updated successfully, but these errors were encountered: