Commit e6dcc981 by Shannon Woods

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
parent 7bf02174
......@@ -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
......
......@@ -12,7 +12,7 @@
#include "common/angleutils.h"
#include "common/RefCountObject.h"
#include "constants.h"
#include "Constants.h"
namespace rx
{
......
......@@ -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>
......
......@@ -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"
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment