mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 04:10:06 +00:00
Fix for Linux GCC cont'd. Enabled warning level 4 in Visual Studio for compilation of vk_mem_alloc.h. (Cherry pick from v1)
This commit is contained in:
parent
7ec64121d8
commit
b0425876ec
@ -27,8 +27,11 @@
|
||||
#define VK_USE_PLATFORM_WIN32_KHR
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#pragma warning(push, 4)
|
||||
#pragma warning(disable: 4127) // warning C4127: conditional expression is constant
|
||||
#define VMA_IMPLEMENTATION
|
||||
#include "vk_mem_alloc.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
#define MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT
|
||||
#include <mathfu/glsl_mappings.h>
|
||||
@ -1714,7 +1717,7 @@ int main()
|
||||
RECT rect = { 0, 0, g_SizeX, g_SizeY };
|
||||
AdjustWindowRectEx(&rect, style, FALSE, exStyle);
|
||||
|
||||
HWND hWnd = CreateWindowEx(
|
||||
CreateWindowEx(
|
||||
exStyle, WINDOW_CLASS_NAME, APP_TITLE_W, style,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
NULL, NULL, g_hAppInstance, NULL);
|
||||
|
@ -528,7 +528,7 @@ typedef struct VmaDefragmentationInfo {
|
||||
VkDeviceSize maxBytesToMove;
|
||||
/** \brief Maximum number of allocations that can be moved to different place.
|
||||
|
||||
Default is UINT_MAX, which means no limit.
|
||||
Default is UINT32_MAX, which means no limit.
|
||||
*/
|
||||
uint32_t maxAllocationsToMove;
|
||||
} VmaDefragmentationInfo;
|
||||
@ -1158,13 +1158,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
m_Allocator(allocator),
|
||||
m_pArray(VMA_NULL),
|
||||
m_Count(0),
|
||||
m_Capacity(0)
|
||||
{
|
||||
}
|
||||
|
||||
VmaVector(size_t count, const AllocatorT& allocator) :
|
||||
m_Allocator(allocator),
|
||||
m_pArray(count ? (T*)VmaAllocateArray<T>(allocator->m_pCallbacks, count) : VMA_NULL),
|
||||
@ -2653,7 +2646,7 @@ struct VmaSuballocationItemSizeLess
|
||||
};
|
||||
|
||||
VmaBlock::VmaBlock(VmaAllocator hAllocator) :
|
||||
m_MemoryTypeIndex(UINT_MAX),
|
||||
m_MemoryTypeIndex(UINT32_MAX),
|
||||
m_BlockVectorType(VMA_BLOCK_VECTOR_TYPE_COUNT),
|
||||
m_hMemory(VK_NULL_HANDLE),
|
||||
m_Size(0),
|
||||
@ -4418,7 +4411,7 @@ VkResult VmaAllocator_T::Defragment(
|
||||
|
||||
// Main processing.
|
||||
VkDeviceSize maxBytesToMove = SIZE_MAX;
|
||||
uint32_t maxAllocationsToMove = UINT_MAX;
|
||||
uint32_t maxAllocationsToMove = UINT32_MAX;
|
||||
if(pDefragmentationInfo != VMA_NULL)
|
||||
{
|
||||
maxBytesToMove = pDefragmentationInfo->maxBytesToMove;
|
||||
@ -4849,8 +4842,8 @@ VkResult vmaFindMemoryTypeIndex(
|
||||
if((pMemoryRequirements->flags & VMA_MEMORY_REQUIREMENT_PERSISTENT_MAP_BIT) != 0)
|
||||
requiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
|
||||
*pMemoryTypeIndex = UINT_MAX;
|
||||
uint32_t minCost = UINT_MAX;
|
||||
*pMemoryTypeIndex = UINT32_MAX;
|
||||
uint32_t minCost = UINT32_MAX;
|
||||
for(uint32_t memTypeIndex = 0, memTypeBit = 1;
|
||||
memTypeIndex < allocator->GetMemoryTypeCount();
|
||||
++memTypeIndex, memTypeBit <<= 1)
|
||||
|
Loading…
Reference in New Issue
Block a user