gfx/angle/angle-build-mingw.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/angle-build-mingw.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,201 @@
     1.4 +From: Jacek Caban <jacek@codeweavers.com>
     1.5 +Bug 945292 - Fixed ANGLE compilation on mingw.
     1.6 +
     1.7 +
     1.8 +diff --git a/gfx/angle/src/common/debug.h b/gfx/angle/src/common/debug.h
     1.9 +index 23ee26d..060b727 100644
    1.10 +--- a/gfx/angle/src/common/debug.h
    1.11 ++++ b/gfx/angle/src/common/debug.h
    1.12 +@@ -94,18 +94,20 @@ namespace gl
    1.13 + #define UNREACHABLE() do { \
    1.14 +     ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \
    1.15 +     assert(false); \
    1.16 +     } while(0)
    1.17 + #else
    1.18 +     #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
    1.19 + #endif
    1.20 + 
    1.21 +-// A macro that determines whether an object has a given runtime type.
    1.22 +-#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI))
    1.23 ++// A macro that determines whether an object has a given runtime type. MSVC uses _CPPRTTI.
    1.24 ++// GCC uses __GXX_RTTI, but the macro was introduced in version 4.3, so we assume that all older
    1.25 ++// versions support RTTI.
    1.26 ++#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) && (!defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || defined(__GXX_RTTI))
    1.27 + #define HAS_DYNAMIC_TYPE(type, obj) (dynamic_cast<type >(obj) != NULL)
    1.28 + #else
    1.29 + #define HAS_DYNAMIC_TYPE(type, obj) true
    1.30 + #endif
    1.31 + 
    1.32 + // A macro functioning as a compile-time assert to validate constant conditions
    1.33 + #define META_ASSERT(condition) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
    1.34 + 
    1.35 +diff --git a/gfx/angle/src/libGLESv2/Constants.h b/gfx/angle/src/libGLESv2/Constants.h
    1.36 +new file mode 100644
    1.37 +index 0000000..9f24d66
    1.38 +--- /dev/null
    1.39 ++++ b/gfx/angle/src/libGLESv2/Constants.h
    1.40 +@@ -0,0 +1,34 @@
    1.41 ++//
    1.42 ++// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
    1.43 ++// Use of this source code is governed by a BSD-style license that can be
    1.44 ++// found in the LICENSE file.
    1.45 ++//
    1.46 ++
    1.47 ++// Contants.h: Defines some implementation specific and gl constants
    1.48 ++
    1.49 ++#ifndef LIBGLESV2_CONSTANTS_H_
    1.50 ++#define LIBGLESV2_CONSTANTS_H_
    1.51 ++
    1.52 ++namespace gl
    1.53 ++{
    1.54 ++
    1.55 ++enum
    1.56 ++{
    1.57 ++    MAX_VERTEX_ATTRIBS = 16,
    1.58 ++    MAX_TEXTURE_IMAGE_UNITS = 16,
    1.59 ++
    1.60 ++    // Implementation upper limits, real maximums depend on the hardware
    1.61 ++    IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 16,
    1.62 ++    IMPLEMENTATION_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS,    
    1.63 ++
    1.64 ++    IMPLEMENTATION_MAX_VARYING_VECTORS = 32,
    1.65 ++    IMPLEMENTATION_MAX_DRAW_BUFFERS = 8
    1.66 ++};
    1.67 ++
    1.68 ++const float ALIASED_LINE_WIDTH_RANGE_MIN = 1.0f;
    1.69 ++const float ALIASED_LINE_WIDTH_RANGE_MAX = 1.0f;
    1.70 ++const float ALIASED_POINT_SIZE_RANGE_MIN = 1.0f;
    1.71 ++
    1.72 ++}
    1.73 ++
    1.74 ++#endif // LIBGLESV2_CONSTANTS_H_
    1.75 +diff --git a/gfx/angle/src/libGLESv2/Framebuffer.h b/gfx/angle/src/libGLESv2/Framebuffer.h
    1.76 +index b54e008..50bfd4f 100644
    1.77 +--- a/gfx/angle/src/libGLESv2/Framebuffer.h
    1.78 ++++ b/gfx/angle/src/libGLESv2/Framebuffer.h
    1.79 +@@ -7,17 +7,17 @@
    1.80 + // Framebuffer.h: Defines the gl::Framebuffer class. Implements GL framebuffer
    1.81 + // objects and related functionality. [OpenGL ES 2.0.24] section 4.4 page 105.
    1.82 + 
    1.83 + #ifndef LIBGLESV2_FRAMEBUFFER_H_
    1.84 + #define LIBGLESV2_FRAMEBUFFER_H_
    1.85 + 
    1.86 + #include "common/angleutils.h"
    1.87 + #include "common/RefCountObject.h"
    1.88 +-#include "constants.h"
    1.89 ++#include "Constants.h"
    1.90 + 
    1.91 + namespace rx
    1.92 + {
    1.93 + class Renderer;
    1.94 + }
    1.95 + 
    1.96 + namespace gl
    1.97 + {
    1.98 +diff --git a/gfx/angle/src/libGLESv2/constants.h b/gfx/angle/src/libGLESv2/constants.h
    1.99 +deleted file mode 100644
   1.100 +index 9f24d66..0000000
   1.101 +--- a/gfx/angle/src/libGLESv2/constants.h
   1.102 ++++ /dev/null
   1.103 +@@ -1,34 +0,0 @@
   1.104 +-//
   1.105 +-// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
   1.106 +-// Use of this source code is governed by a BSD-style license that can be
   1.107 +-// found in the LICENSE file.
   1.108 +-//
   1.109 +-
   1.110 +-// Contants.h: Defines some implementation specific and gl constants
   1.111 +-
   1.112 +-#ifndef LIBGLESV2_CONSTANTS_H_
   1.113 +-#define LIBGLESV2_CONSTANTS_H_
   1.114 +-
   1.115 +-namespace gl
   1.116 +-{
   1.117 +-
   1.118 +-enum
   1.119 +-{
   1.120 +-    MAX_VERTEX_ATTRIBS = 16,
   1.121 +-    MAX_TEXTURE_IMAGE_UNITS = 16,
   1.122 +-
   1.123 +-    // Implementation upper limits, real maximums depend on the hardware
   1.124 +-    IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 16,
   1.125 +-    IMPLEMENTATION_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS,    
   1.126 +-
   1.127 +-    IMPLEMENTATION_MAX_VARYING_VECTORS = 32,
   1.128 +-    IMPLEMENTATION_MAX_DRAW_BUFFERS = 8
   1.129 +-};
   1.130 +-
   1.131 +-const float ALIASED_LINE_WIDTH_RANGE_MIN = 1.0f;
   1.132 +-const float ALIASED_LINE_WIDTH_RANGE_MAX = 1.0f;
   1.133 +-const float ALIASED_POINT_SIZE_RANGE_MIN = 1.0f;
   1.134 +-
   1.135 +-}
   1.136 +-
   1.137 +-#endif // LIBGLESV2_CONSTANTS_H_
   1.138 +diff --git a/gfx/angle/src/libGLESv2/precompiled.h b/gfx/angle/src/libGLESv2/precompiled.h
   1.139 +index f62e71b..58ad181 100644
   1.140 +--- a/gfx/angle/src/libGLESv2/precompiled.h
   1.141 ++++ b/gfx/angle/src/libGLESv2/precompiled.h
   1.142 +@@ -28,15 +28,15 @@
   1.143 + #include <map>
   1.144 + #include <set>
   1.145 + #include <sstream>
   1.146 + #include <string>
   1.147 + #include <unordered_map>
   1.148 + #include <vector>
   1.149 + 
   1.150 + #include <d3d9.h>
   1.151 +-#include <D3D11.h>
   1.152 ++#include <d3d11.h>
   1.153 + #include <dxgi.h>
   1.154 + #include <d3dcompiler.h>
   1.155 + 
   1.156 + #ifdef _MSC_VER
   1.157 + #include <hash_map>
   1.158 + #endif
   1.159 +diff --git a/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp b/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp
   1.160 +index 774cd71..1f2b31d 100644
   1.161 +--- a/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp
   1.162 ++++ b/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp
   1.163 +@@ -7,17 +7,17 @@
   1.164 + 
   1.165 + // Renderer11.cpp: Implements a back-end specific class for the D3D11 renderer.
   1.166 + 
   1.167 + #include "libGLESv2/main.h"
   1.168 + #include "libGLESv2/utilities.h"
   1.169 + #include "libGLESv2/Buffer.h"
   1.170 + #include "libGLESv2/ProgramBinary.h"
   1.171 + #include "libGLESv2/Framebuffer.h"
   1.172 +-#include "libGLESv2/RenderBuffer.h"
   1.173 ++#include "libGLESv2/Renderbuffer.h"
   1.174 + #include "libGLESv2/renderer/Renderer11.h"
   1.175 + #include "libGLESv2/renderer/RenderTarget11.h"
   1.176 + #include "libGLESv2/renderer/renderer11_utils.h"
   1.177 + #include "libGLESv2/renderer/ShaderExecutable11.h"
   1.178 + #include "libGLESv2/renderer/SwapChain11.h"
   1.179 + #include "libGLESv2/renderer/Image11.h"
   1.180 + #include "libGLESv2/renderer/VertexBuffer11.h"
   1.181 + #include "libGLESv2/renderer/IndexBuffer11.h"
   1.182 +diff --git a/gfx/angle/src/libGLESv2/renderer/Renderer11.h b/gfx/angle/src/libGLESv2/renderer/Renderer11.h
   1.183 +index f024855..90ef04d 100644
   1.184 +--- a/gfx/angle/src/libGLESv2/renderer/Renderer11.h
   1.185 ++++ b/gfx/angle/src/libGLESv2/renderer/Renderer11.h
   1.186 +@@ -230,17 +230,17 @@ class Renderer11 : public Renderer
   1.187 +     bool mDepthTextureSupport;
   1.188 + 
   1.189 +     // Multisample format support
   1.190 +     struct MultisampleSupportInfo
   1.191 +     {
   1.192 +         unsigned int qualityLevels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT];
   1.193 +     };
   1.194 + 
   1.195 +-    typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo> MultisampleSupportMap;
   1.196 ++    typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo, std::hash<int> > MultisampleSupportMap;
   1.197 +     MultisampleSupportMap mMultisampleSupportMap;
   1.198 + 
   1.199 +     unsigned int mMaxSupportedSamples;
   1.200 + 
   1.201 +     // current render target states
   1.202 +     unsigned int mAppliedRenderTargetSerials[gl::IMPLEMENTATION_MAX_DRAW_BUFFERS];
   1.203 +     unsigned int mAppliedDepthbufferSerial;
   1.204 +     unsigned int mAppliedStencilbufferSerial;

mercurial