src/libANGLE/renderer/vulkan/MemoryTracking.h


Log

Author Commit Date CI Message
Amirali Abdolrashidi 6f959e07 2023-04-28T16:00:11 Vulkan: Add non-device memory option for VMA image * Updated the required flags for allocateAndBindMemory() to no longer include VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, though still preferred. This allows VMA to allocate from another memory type if the device is out of memory. * Added a debug message to indicate when allocated memory for VMA image does not have all the preferred property flags. * Also added a warning in the case of memory allocation fallback. * Added a perf counter to keep track of image allocation fallbacks from the device memory. * deviceMemoryImageAllocationFallbacks * Added a test to make sure that VMA images can still be allocated from other memory types even if device memory is unavailable. * VulkanImageTest.AllocateVMAImageWhenDeviceOOM Bug: b/280304441 Change-Id: Ic452c18ded25345cdb7e271442372b99aede045e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4493483 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi 156efe9e 2023-02-23T14:07:23 Fix the alloc error with enabled backtrace feature When angle_enable_unwind_backtrace_support is enabled, an assertion occurs on memory allocation with the following message: "constructed value does not match the lookup key" The assertion comes from PolicyTraits::apply() in the hash map. * In MemoryTracking.h, the type of mMemoryAllocationRecord is now std::unordered_map instead of angle::HashMap. Bug: b/262029018 Change-Id: I11a6d8e99a129759c046e37cef9e74f7db193066 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4289947 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi b0d99f72 2023-02-22T13:48:16 Move the memory tracking classes to new files * Moved the classes, functions, and constants related to memory tracking to MemoryTracking.h and MemoryTracking.cpp. Main classes include the following: * MemoryAllocationTracker * MemoryReport * MemoryAllocationType * MemoryAllocationInfo * MemoryLogSeverity * New static function added in RendererVk to get the Vulkan object type name (GetVulkanObjectTypeName()). Bug: b/262029018 Change-Id: I619001e3c24114c4fe7bf024498338bce146fced Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4284639 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>