mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Two fixes for "Portability issues" Issue #5 thanks @rextimmy!
This commit is contained in:
parent
ea6da94c24
commit
e97e9b6637
Binary file not shown.
@ -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<unsigned int>(num));
|
||||
}
|
||||
static inline void VmaUint64ToStr(char* outStr, size_t strLen, uint64_t num)
|
||||
{
|
||||
snprintf(outStr, strLen, "%llu", num);
|
||||
snprintf(outStr, strLen, "%llu", static_cast<unsigned long long>(num));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2297,14 +2297,12 @@ private:
|
||||
ALLOCATION_TYPE m_Type;
|
||||
VmaSuballocationType m_SuballocationType;
|
||||
|
||||
union
|
||||
{
|
||||
// Allocation out of VmaBlock.
|
||||
struct BlockAllocation
|
||||
{
|
||||
VmaBlock* m_Block;
|
||||
VkDeviceSize m_Offset;
|
||||
} m_BlockAllocation;
|
||||
};
|
||||
|
||||
// Allocation for an object that has its own private VkDeviceMemory.
|
||||
struct OwnAllocation
|
||||
@ -2313,7 +2311,14 @@ private:
|
||||
VkDeviceMemory m_hMemory;
|
||||
bool m_PersistentMap;
|
||||
void* m_pMappedData;
|
||||
} m_OwnAllocation;
|
||||
};
|
||||
|
||||
union
|
||||
{
|
||||
// Allocation out of VmaBlock.
|
||||
BlockAllocation m_BlockAllocation;
|
||||
// Allocation for an object that has its own private VkDeviceMemory.
|
||||
OwnAllocation m_OwnAllocation;
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user