michael@0: From: Jacek Caban michael@0: Bug 945292 - Fixed ANGLE compilation on mingw. michael@0: michael@0: michael@0: diff --git a/gfx/angle/src/common/debug.h b/gfx/angle/src/common/debug.h michael@0: index 23ee26d..060b727 100644 michael@0: --- a/gfx/angle/src/common/debug.h michael@0: +++ b/gfx/angle/src/common/debug.h michael@0: @@ -94,18 +94,20 @@ namespace gl michael@0: #define UNREACHABLE() do { \ michael@0: ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \ michael@0: assert(false); \ michael@0: } while(0) michael@0: #else michael@0: #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__) michael@0: #endif michael@0: michael@0: -// A macro that determines whether an object has a given runtime type. michael@0: -#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) michael@0: +// A macro that determines whether an object has a given runtime type. MSVC uses _CPPRTTI. michael@0: +// GCC uses __GXX_RTTI, but the macro was introduced in version 4.3, so we assume that all older michael@0: +// versions support RTTI. michael@0: +#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) && (!defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || defined(__GXX_RTTI)) michael@0: #define HAS_DYNAMIC_TYPE(type, obj) (dynamic_cast(obj) != NULL) michael@0: #else michael@0: #define HAS_DYNAMIC_TYPE(type, obj) true michael@0: #endif michael@0: michael@0: // A macro functioning as a compile-time assert to validate constant conditions michael@0: #define META_ASSERT(condition) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast(condition)?1:-1] michael@0: michael@0: diff --git a/gfx/angle/src/libGLESv2/Constants.h b/gfx/angle/src/libGLESv2/Constants.h michael@0: new file mode 100644 michael@0: index 0000000..9f24d66 michael@0: --- /dev/null michael@0: +++ b/gfx/angle/src/libGLESv2/Constants.h michael@0: @@ -0,0 +1,34 @@ michael@0: +// michael@0: +// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved. michael@0: +// Use of this source code is governed by a BSD-style license that can be michael@0: +// found in the LICENSE file. michael@0: +// michael@0: + michael@0: +// Contants.h: Defines some implementation specific and gl constants michael@0: + michael@0: +#ifndef LIBGLESV2_CONSTANTS_H_ michael@0: +#define LIBGLESV2_CONSTANTS_H_ michael@0: + michael@0: +namespace gl michael@0: +{ michael@0: + michael@0: +enum michael@0: +{ michael@0: + MAX_VERTEX_ATTRIBS = 16, michael@0: + MAX_TEXTURE_IMAGE_UNITS = 16, michael@0: + michael@0: + // Implementation upper limits, real maximums depend on the hardware michael@0: + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 16, michael@0: + IMPLEMENTATION_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS, michael@0: + michael@0: + IMPLEMENTATION_MAX_VARYING_VECTORS = 32, michael@0: + IMPLEMENTATION_MAX_DRAW_BUFFERS = 8 michael@0: +}; michael@0: + michael@0: +const float ALIASED_LINE_WIDTH_RANGE_MIN = 1.0f; michael@0: +const float ALIASED_LINE_WIDTH_RANGE_MAX = 1.0f; michael@0: +const float ALIASED_POINT_SIZE_RANGE_MIN = 1.0f; michael@0: + michael@0: +} michael@0: + michael@0: +#endif // LIBGLESV2_CONSTANTS_H_ michael@0: diff --git a/gfx/angle/src/libGLESv2/Framebuffer.h b/gfx/angle/src/libGLESv2/Framebuffer.h michael@0: index b54e008..50bfd4f 100644 michael@0: --- a/gfx/angle/src/libGLESv2/Framebuffer.h michael@0: +++ b/gfx/angle/src/libGLESv2/Framebuffer.h michael@0: @@ -7,17 +7,17 @@ michael@0: // Framebuffer.h: Defines the gl::Framebuffer class. Implements GL framebuffer michael@0: // objects and related functionality. [OpenGL ES 2.0.24] section 4.4 page 105. michael@0: michael@0: #ifndef LIBGLESV2_FRAMEBUFFER_H_ michael@0: #define LIBGLESV2_FRAMEBUFFER_H_ michael@0: michael@0: #include "common/angleutils.h" michael@0: #include "common/RefCountObject.h" michael@0: -#include "constants.h" michael@0: +#include "Constants.h" michael@0: michael@0: namespace rx michael@0: { michael@0: class Renderer; michael@0: } michael@0: michael@0: namespace gl michael@0: { michael@0: diff --git a/gfx/angle/src/libGLESv2/constants.h b/gfx/angle/src/libGLESv2/constants.h michael@0: deleted file mode 100644 michael@0: index 9f24d66..0000000 michael@0: --- a/gfx/angle/src/libGLESv2/constants.h michael@0: +++ /dev/null michael@0: @@ -1,34 +0,0 @@ michael@0: -// michael@0: -// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved. michael@0: -// Use of this source code is governed by a BSD-style license that can be michael@0: -// found in the LICENSE file. michael@0: -// michael@0: - michael@0: -// Contants.h: Defines some implementation specific and gl constants michael@0: - michael@0: -#ifndef LIBGLESV2_CONSTANTS_H_ michael@0: -#define LIBGLESV2_CONSTANTS_H_ michael@0: - michael@0: -namespace gl michael@0: -{ michael@0: - michael@0: -enum michael@0: -{ michael@0: - MAX_VERTEX_ATTRIBS = 16, michael@0: - MAX_TEXTURE_IMAGE_UNITS = 16, michael@0: - michael@0: - // Implementation upper limits, real maximums depend on the hardware michael@0: - IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 16, michael@0: - IMPLEMENTATION_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS, michael@0: - michael@0: - IMPLEMENTATION_MAX_VARYING_VECTORS = 32, michael@0: - IMPLEMENTATION_MAX_DRAW_BUFFERS = 8 michael@0: -}; michael@0: - michael@0: -const float ALIASED_LINE_WIDTH_RANGE_MIN = 1.0f; michael@0: -const float ALIASED_LINE_WIDTH_RANGE_MAX = 1.0f; michael@0: -const float ALIASED_POINT_SIZE_RANGE_MIN = 1.0f; michael@0: - michael@0: -} michael@0: - michael@0: -#endif // LIBGLESV2_CONSTANTS_H_ michael@0: diff --git a/gfx/angle/src/libGLESv2/precompiled.h b/gfx/angle/src/libGLESv2/precompiled.h michael@0: index f62e71b..58ad181 100644 michael@0: --- a/gfx/angle/src/libGLESv2/precompiled.h michael@0: +++ b/gfx/angle/src/libGLESv2/precompiled.h michael@0: @@ -28,15 +28,15 @@ michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #include michael@0: -#include michael@0: +#include michael@0: #include michael@0: #include michael@0: michael@0: #ifdef _MSC_VER michael@0: #include michael@0: #endif michael@0: diff --git a/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp b/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp michael@0: index 774cd71..1f2b31d 100644 michael@0: --- a/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp michael@0: +++ b/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp michael@0: @@ -7,17 +7,17 @@ michael@0: michael@0: // Renderer11.cpp: Implements a back-end specific class for the D3D11 renderer. michael@0: michael@0: #include "libGLESv2/main.h" michael@0: #include "libGLESv2/utilities.h" michael@0: #include "libGLESv2/Buffer.h" michael@0: #include "libGLESv2/ProgramBinary.h" michael@0: #include "libGLESv2/Framebuffer.h" michael@0: -#include "libGLESv2/RenderBuffer.h" michael@0: +#include "libGLESv2/Renderbuffer.h" michael@0: #include "libGLESv2/renderer/Renderer11.h" michael@0: #include "libGLESv2/renderer/RenderTarget11.h" michael@0: #include "libGLESv2/renderer/renderer11_utils.h" michael@0: #include "libGLESv2/renderer/ShaderExecutable11.h" michael@0: #include "libGLESv2/renderer/SwapChain11.h" michael@0: #include "libGLESv2/renderer/Image11.h" michael@0: #include "libGLESv2/renderer/VertexBuffer11.h" michael@0: #include "libGLESv2/renderer/IndexBuffer11.h" michael@0: diff --git a/gfx/angle/src/libGLESv2/renderer/Renderer11.h b/gfx/angle/src/libGLESv2/renderer/Renderer11.h michael@0: index f024855..90ef04d 100644 michael@0: --- a/gfx/angle/src/libGLESv2/renderer/Renderer11.h michael@0: +++ b/gfx/angle/src/libGLESv2/renderer/Renderer11.h michael@0: @@ -230,17 +230,17 @@ class Renderer11 : public Renderer michael@0: bool mDepthTextureSupport; michael@0: michael@0: // Multisample format support michael@0: struct MultisampleSupportInfo michael@0: { michael@0: unsigned int qualityLevels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT]; michael@0: }; michael@0: michael@0: - typedef std::unordered_map MultisampleSupportMap; michael@0: + typedef std::unordered_map > MultisampleSupportMap; michael@0: MultisampleSupportMap mMultisampleSupportMap; michael@0: michael@0: unsigned int mMaxSupportedSamples; michael@0: michael@0: // current render target states michael@0: unsigned int mAppliedRenderTargetSerials[gl::IMPLEMENTATION_MAX_DRAW_BUFFERS]; michael@0: unsigned int mAppliedDepthbufferSerial; michael@0: unsigned int mAppliedStencilbufferSerial;