mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
NVTT: Fixed OSX build.
This commit is contained in:
parent
bbe9025c69
commit
1a96194429
4 changed files with 14 additions and 7 deletions
4
3rdparty/nvtt/nvcore/defsgnucdarwin.h
vendored
4
3rdparty/nvtt/nvcore/defsgnucdarwin.h
vendored
|
@ -5,6 +5,10 @@
|
|||
#include <stdint.h> // uint8_t, int8_t, ... uintptr_t
|
||||
#include <stddef.h> // operator new, size_t, NULL
|
||||
|
||||
#ifndef __STDC_VERSION__
|
||||
# define __STDC_VERSION__ 0
|
||||
#endif // __STDC_VERSION__
|
||||
|
||||
// Function linkage
|
||||
#define DLL_IMPORT
|
||||
#if __GNUC__ >= 4
|
||||
|
|
2
3rdparty/nvtt/nvcore/memory.h
vendored
2
3rdparty/nvtt/nvcore/memory.h
vendored
|
@ -4,7 +4,7 @@
|
|||
#define NV_CORE_MEMORY_H
|
||||
|
||||
#include "nvcore.h"
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace nv {
|
||||
|
||||
|
|
7
3rdparty/nvtt/nvcore/nvcore.h
vendored
7
3rdparty/nvtt/nvcore/nvcore.h
vendored
|
@ -169,6 +169,13 @@
|
|||
# define NV_CC_CLANG 1
|
||||
# define NV_CC_GNUC 1 // Clang is compatible with GCC.
|
||||
# define NV_CC_STRING "clang"
|
||||
# pragma clang diagnostic ignored "-Wmissing-braces"
|
||||
# pragma clang diagnostic ignored "-Wshadow"
|
||||
# pragma clang diagnostic ignored "-Wunused-local-typedef"
|
||||
# pragma clang diagnostic ignored "-Wunused-function"
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
# pragma clang diagnostic ignored "-Wsometimes-uninitialized"
|
||||
#elif defined POSH_COMPILER_GCC
|
||||
# define NV_CC_GNUC 1
|
||||
# define NV_CC_STRING "gcc"
|
||||
|
|
8
3rdparty/nvtt/nvmath/nvmath.h
vendored
8
3rdparty/nvtt/nvmath/nvmath.h
vendored
|
@ -3,7 +3,7 @@
|
|||
#ifndef NV_MATH_H
|
||||
#define NV_MATH_H
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <float.h> // finite, isnan
|
||||
|
||||
#include "nvcore/utils.h" // max, clamp
|
||||
|
@ -35,11 +35,7 @@ namespace nv
|
|||
|
||||
inline bool isFinite(const float f)
|
||||
{
|
||||
#if NV_CC_MSVC
|
||||
return _finite(f) != 0;
|
||||
#elif NV_CC_GNUC
|
||||
return finitef(f);
|
||||
#endif //
|
||||
return std::isfinite(f);
|
||||
}
|
||||
|
||||
// Eliminates negative zeros from a float array.
|
||||
|
|
Loading…
Reference in a new issue