diff options
author | Shannon Woods <shannonwoods@chromium.org> | 2013-09-26 15:01:51 -0400 |
---|---|---|
committer | Shannon Woods <shannonwoods@chromium.org> | 2013-09-26 15:23:46 -0400 |
commit | e6dcc9815a8a20ab0ff0f5e6c40116a014338757 (patch) | |
tree | 13f9457bc888a037e76f28b5f306d927dcbb43b0 | |
parent | 7bf02174b003223919d32135c0bcf77a2a511e70 (diff) | |
download | angle_dx11-e6dcc9815a8a20ab0ff0f5e6c40116a014338757.tar.gz |
GCC compilation fixes.
Those are a few trivial fixes:
- Fixed includes on case sensitive OSes (also renamed constants.h to
Constatns.h, which was used in more places)
- Use __GXX_RTTI instead of assuming that all non-MSVC compilers support rtti
(fixes compilation in Mozilla tree, where -fno-rtti is used)
- Specify hashing of DXGI_FORMAT because this enum has no hash<> specialization
Signed-off-by: Shannon Woods
Author: cjacek@gmail.com
-rw-r--r-- | src/common/debug.h | 6 | ||||
-rw-r--r-- | src/libGLESv2/Constants.h (renamed from src/libGLESv2/constants.h) | 0 | ||||
-rw-r--r-- | src/libGLESv2/Framebuffer.h | 2 | ||||
-rw-r--r-- | src/libGLESv2/precompiled.h | 4 | ||||
-rw-r--r-- | src/libGLESv2/renderer/Renderer11.cpp | 2 | ||||
-rw-r--r-- | src/libGLESv2/renderer/Renderer11.h | 2 |
6 files changed, 9 insertions, 7 deletions
diff --git a/src/common/debug.h b/src/common/debug.h index 23ee26d2..c89db78c 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -99,8 +99,10 @@ namespace gl #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) #endif -// A macro that determines whether an object has a given runtime type. -#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) +// A macro that determines whether an object has a given runtime type. MSVC uses _CPPRTTI. +// GCC uses __GXX_RTTI, but the macro was introduced in version 4.3, so we assume that all older +// versions support RTTI. +#if !defined(NDEBUG) && (!defined(_MSV_VER) || defined(_CPPRTTI)) && (!defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || defined(__GXX_RTTI)) #define HAS_DYNAMIC_TYPE(type, obj) (dynamic_cast<type >(obj) != NULL) #else #define HAS_DYNAMIC_TYPE(type, obj) true diff --git a/src/libGLESv2/constants.h b/src/libGLESv2/Constants.h index 9f24d66a..9f24d66a 100644 --- a/src/libGLESv2/constants.h +++ b/src/libGLESv2/Constants.h diff --git a/src/libGLESv2/Framebuffer.h b/src/libGLESv2/Framebuffer.h index b54e008d..50bfd4fd 100644 --- a/src/libGLESv2/Framebuffer.h +++ b/src/libGLESv2/Framebuffer.h @@ -12,7 +12,7 @@ #include "common/angleutils.h" #include "common/RefCountObject.h" -#include "constants.h" +#include "Constants.h" namespace rx { diff --git a/src/libGLESv2/precompiled.h b/src/libGLESv2/precompiled.h index a850d57e..58ad1818 100644 --- a/src/libGLESv2/precompiled.h +++ b/src/libGLESv2/precompiled.h @@ -33,9 +33,9 @@ #include <vector> #include <d3d9.h> -#include <D3D11.h> +#include <d3d11.h> #include <dxgi.h> -#include <D3Dcompiler.h> +#include <d3dcompiler.h> #ifdef _MSC_VER #include <hash_map> diff --git a/src/libGLESv2/renderer/Renderer11.cpp b/src/libGLESv2/renderer/Renderer11.cpp index a4310180..6f4da5c6 100644 --- a/src/libGLESv2/renderer/Renderer11.cpp +++ b/src/libGLESv2/renderer/Renderer11.cpp @@ -12,7 +12,7 @@ #include "libGLESv2/Buffer.h" #include "libGLESv2/ProgramBinary.h" #include "libGLESv2/Framebuffer.h" -#include "libGLESv2/RenderBuffer.h" +#include "libGLESv2/Renderbuffer.h" #include "libGLESv2/renderer/Renderer11.h" #include "libGLESv2/renderer/RenderTarget11.h" #include "libGLESv2/renderer/renderer11_utils.h" diff --git a/src/libGLESv2/renderer/Renderer11.h b/src/libGLESv2/renderer/Renderer11.h index f024855f..90ef04db 100644 --- a/src/libGLESv2/renderer/Renderer11.h +++ b/src/libGLESv2/renderer/Renderer11.h @@ -235,7 +235,7 @@ class Renderer11 : public Renderer unsigned int qualityLevels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT]; }; - typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo> MultisampleSupportMap; + typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo, std::hash<int> > MultisampleSupportMap; MultisampleSupportMap mMultisampleSupportMap; unsigned int mMaxSupportedSamples; |