| 6638 | } |
| 6639 | |
| 6640 | static void ValidateTotalStatistics(const VmaTotalStatistics& stats) |
| 6641 | { |
| 6642 | const VkPhysicalDeviceMemoryProperties* memProps = nullptr; |
| 6643 | vmaGetMemoryProperties(g_hAllocator, &memProps); |
| 6644 | |
| 6645 | VmaDetailedStatistics sum; |
| 6646 | InitEmptyDetailedStatistics(sum); |
| 6647 | for(uint32_t i = 0; i < memProps->memoryHeapCount; ++i) |
| 6648 | AddDetailedStatistics(sum, stats.memoryHeap[i]); |
| 6649 | TEST(sum == stats.total); |
| 6650 | |
| 6651 | InitEmptyDetailedStatistics(sum); |
| 6652 | for(uint32_t i = 0; i < memProps->memoryTypeCount; ++i) |
| 6653 | AddDetailedStatistics(sum, stats.memoryType[i]); |
| 6654 | TEST(sum == stats.total); |
| 6655 | } |
| 6656 | |
| 6657 | static void TestStatistics() |
| 6658 | { |
no test coverage detected