diff --git a/bin/VulkanSample_Release_2015.exe b/bin/VulkanSample_Release_2015.exe index c5e7ddc..9d9aea5 100644 Binary files a/bin/VulkanSample_Release_2015.exe and b/bin/VulkanSample_Release_2015.exe differ diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index 8abd528..eb5a471 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -836,11 +836,11 @@ remove them if not needed. #if VMA_STATS_STRING_ENABLED static inline void VmaUint32ToStr(char* outStr, size_t strLen, uint32_t num) { - snprintf(outStr, strLen, "%u", num); + snprintf(outStr, strLen, "%u", static_cast(num)); } static inline void VmaUint64ToStr(char* outStr, size_t strLen, uint64_t num) { - snprintf(outStr, strLen, "%llu", num); + snprintf(outStr, strLen, "%llu", static_cast(num)); } #endif @@ -2297,23 +2297,28 @@ private: ALLOCATION_TYPE m_Type; VmaSuballocationType m_SuballocationType; + // Allocation out of VmaBlock. + struct BlockAllocation + { + VmaBlock* m_Block; + VkDeviceSize m_Offset; + }; + + // Allocation for an object that has its own private VkDeviceMemory. + struct OwnAllocation + { + uint32_t m_MemoryTypeIndex; + VkDeviceMemory m_hMemory; + bool m_PersistentMap; + void* m_pMappedData; + }; + union { // Allocation out of VmaBlock. - struct BlockAllocation - { - VmaBlock* m_Block; - VkDeviceSize m_Offset; - } m_BlockAllocation; - + BlockAllocation m_BlockAllocation; // Allocation for an object that has its own private VkDeviceMemory. - struct OwnAllocation - { - uint32_t m_MemoryTypeIndex; - VkDeviceMemory m_hMemory; - bool m_PersistentMap; - void* m_pMappedData; - } m_OwnAllocation; + OwnAllocation m_OwnAllocation; }; };