mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Reordered macro definitions in the file to fix compilation on Linux
This commit is contained in:
parent
db0f9b481a
commit
0aa8a44acf
@ -2693,6 +2693,30 @@ remove them if not needed.
|
|||||||
#define VMA_NULL nullptr
|
#define VMA_NULL nullptr
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Normal assert to check for programmer's errors, especially in Debug configuration.
|
||||||
|
#ifndef VMA_ASSERT
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define VMA_ASSERT(expr)
|
||||||
|
#else
|
||||||
|
#define VMA_ASSERT(expr) assert(expr)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Assert that will be called very often, like inside data structures e.g. operator[].
|
||||||
|
// Making it non-empty can make program slow.
|
||||||
|
#ifndef VMA_HEAVY_ASSERT
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define VMA_HEAVY_ASSERT(expr)
|
||||||
|
#else
|
||||||
|
#define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// If your compiler is not compatible with C++17 and definition of
|
||||||
|
// aligned_alloc() function is missing, uncommenting following line may help:
|
||||||
|
|
||||||
|
//#include <malloc.h>
|
||||||
|
|
||||||
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
|
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
static void* vma_aligned_alloc(size_t alignment, size_t size)
|
static void* vma_aligned_alloc(size_t alignment, size_t size)
|
||||||
@ -2770,30 +2794,6 @@ static void vma_aligned_free(void* VMA_NULLABLE ptr)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If your compiler is not compatible with C++11 and definition of
|
|
||||||
// aligned_alloc() function is missing, uncommeting following line may help:
|
|
||||||
|
|
||||||
//#include <malloc.h>
|
|
||||||
|
|
||||||
// Normal assert to check for programmer's errors, especially in Debug configuration.
|
|
||||||
#ifndef VMA_ASSERT
|
|
||||||
#ifdef NDEBUG
|
|
||||||
#define VMA_ASSERT(expr)
|
|
||||||
#else
|
|
||||||
#define VMA_ASSERT(expr) assert(expr)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Assert that will be called very often, like inside data structures e.g. operator[].
|
|
||||||
// Making it non-empty can make program slow.
|
|
||||||
#ifndef VMA_HEAVY_ASSERT
|
|
||||||
#ifdef NDEBUG
|
|
||||||
#define VMA_HEAVY_ASSERT(expr)
|
|
||||||
#else
|
|
||||||
#define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef VMA_ALIGN_OF
|
#ifndef VMA_ALIGN_OF
|
||||||
#define VMA_ALIGN_OF(type) (__alignof(type))
|
#define VMA_ALIGN_OF(type) (__alignof(type))
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user