[mingw-angleproject] Update to 20141113 snapshot (git revision 30d6c2)
Erik van Pienbroek
epienbro at fedoraproject.org
Tue Dec 30 21:48:05 UTC 2014
commit 806b27bc8442f462f9f228b1c2aa886cd93290f7
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Tue Dec 30 22:48:08 2014 +0100
Update to 20141113 snapshot (git revision 30d6c2)
.gitignore | 1 +
0000-General-fixes-for-ANGLE-2.1.patch | 477 +++++++++++
...sible-to-link-ANGLE-statically-for-single.patch | 109 +++
...ically-load-D3D-compiler-from-a-list-or-t.patch | 64 ++
0009-ANGLE-Support-WinRT.patch | 837 ++++++++++++++++++++
...LE-Enable-D3D11-for-feature-level-9-cards.patch | 637 +++++++++++++++
0012-ANGLE-fix-semantic-index-lookup.patch | 48 ++
...-Add-support-for-querying-platform-device.patch | 100 +++
...LE-use-multithreaded-devices-if-necessary.patch | 69 ++
0015-ANGLE-Fix-angle-d3d11-on-MSVC2010.patch | 536 +++++++++++++
0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch | 169 ++++
0017-ANGLE-Fix-compilation-with-D3D9.patch | 62 ++
...ix-releasing-textures-after-we-kill-D3D11.patch | 106 +++
angleproject-auto-load-d3dcompiler-library.patch | 25 -
angleproject-disable-debug-annotations.patch | 33 +
angleproject-export-shader-symbols.patch | 62 +-
angleproject-fix-case-sensitive-include.patch | 24 -
angleproject-fix-mingw-compatibility.patch | 224 ------
angleproject-fix-typedefs-for-win64.patch | 86 --
...t-include-import-library-and-use-def-file.patch | 62 +-
...roject-prevent-multiple-definition-errors.patch | 39 +
angleproject-undo-mingw-org-compatibility.patch | 11 +
angleproject-undo-mingw-org-compatibility2.patch | 13 +
angleproject-undo-shader-renames.patch | 162 ++++
commit-409078f | 363 +++++++++
commit-4de44cb | 747 +++++++++++++++++
libEGL_mingw32.def | 41 +
libGLESv2_mingw32.def | 296 +++++++
mingw-angleproject.spec | 182 ++++--
sources | 2 +-
30 files changed, 5114 insertions(+), 473 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c9c74cf..3ce4f19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/angleproject-r1561.tar.bz2
/angleproject-r2215.tar.bz2
+/angle-git-30d6c2.tar.bz2
diff --git a/0000-General-fixes-for-ANGLE-2.1.patch b/0000-General-fixes-for-ANGLE-2.1.patch
new file mode 100644
index 0000000..ad3187e
--- /dev/null
+++ b/0000-General-fixes-for-ANGLE-2.1.patch
@@ -0,0 +1,477 @@
+From bd27c33a4a7c48bd14b9b6c18c8cdce1c3aae155 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Fri, 14 Nov 2014 10:53:40 +0200
+Subject: [PATCH] General fixes for ANGLE 2.1
+
+- Fix commit.h include (use hard-coded version)
+- Fix export mismatch in libEGL.cpp and libGLESv2.cpp
+- Normalize all precompiled shader names and includes
+- Remove third-party event tracing; it was hardly used in ANGLE
+ and not enabled in Qt builds anyway.
+
+Change-Id: I22254aed62e89a26756ca0784bae95909189c0f9
+---
+ src/3rdparty/angle/src/commit.h | 6 +-
+ src/3rdparty/angle/src/common/version.h | 2 +-
+ .../src/common/winrt/CoreWindowNativeWindow.cpp | 2 +-
+ src/3rdparty/angle/src/libEGL/libEGL.cpp | 3 +
+ src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp | 4 ++
+ src/3rdparty/angle/src/libGLESv2/libGLESv2.def | 3 -
+ .../src/libGLESv2/renderer/d3d/HLSLCompiler.cpp | 3 -
+ .../src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp | 66 +++++++++++-----------
+ .../src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp | 12 ++--
+ .../renderer/d3d/d3d11/PixelTransfer11.cpp | 10 ++--
+ .../libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp | 4 +-
+ .../renderer/d3d/d3d11/shaders/Clear11.hlsl | 4 ++
+ .../src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp | 20 +++----
+ .../src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp | 12 ----
+ .../libGLESv2/renderer/d3d/d3d9/shaders/Blit.ps | 6 +-
+ .../libGLESv2/renderer/d3d/d3d9/shaders/Blit.vs | 4 +-
+ 16 files changed, 76 insertions(+), 85 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/commit.h b/src/3rdparty/angle/src/commit.h
+index 4c89a65..08fc893 100644
+--- a/src/3rdparty/angle/src/commit.h
++++ b/src/3rdparty/angle/src/commit.h
+@@ -7,8 +7,6 @@
+ // This is a default commit hash header, when git is not available.
+ //
+
+-#define ANGLE_COMMIT_HASH "unknown hash"
++#define ANGLE_COMMIT_HASH "30d6c255d238"
+ #define ANGLE_COMMIT_HASH_SIZE 12
+-#define ANGLE_COMMIT_DATE "unknown date"
+-
+-#define ANGLE_DISABLE_PROGRAM_BINARY_LOAD
++#define ANGLE_COMMIT_DATE "2014-11-13 17:37:03 +0000"
+diff --git a/src/3rdparty/angle/src/common/version.h b/src/3rdparty/angle/src/common/version.h
+index d9148d1..f01e024 100644
+--- a/src/3rdparty/angle/src/common/version.h
++++ b/src/3rdparty/angle/src/common/version.h
+@@ -1,4 +1,4 @@
+-#include "id/commit.h"
++#include "../commit.h"
+
+ #define ANGLE_MAJOR_VERSION 2
+ #define ANGLE_MINOR_VERSION 1
+diff --git a/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp b/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp
+index 0de16f4..0e63fa5 100644
+--- a/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp
++++ b/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp
+@@ -184,4 +184,4 @@ long ConvertDipsToPixels(float dips)
+ static const float dipsPerInch = 96.0f;
+ return lround((dips * GetLogicalDpi() / dipsPerInch));
+ }
+-}
+\ No newline at end of file
++}
+diff --git a/src/3rdparty/angle/src/libEGL/libEGL.cpp b/src/3rdparty/angle/src/libEGL/libEGL.cpp
+index 851b723..6110698 100644
+--- a/src/3rdparty/angle/src/libEGL/libEGL.cpp
++++ b/src/3rdparty/angle/src/libEGL/libEGL.cpp
+@@ -6,6 +6,9 @@
+
+ // libEGL.cpp: Implements the exported EGL functions.
+
++#undef EGLAPI
++#define EGLAPI
++
+ #include <exception>
+
+ #include "common/debug.h"
+diff --git a/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp b/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
+index 2306168..587950a 100644
+--- a/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
+@@ -6,6 +6,10 @@
+
+ // libGLESv2.cpp: Implements the exported OpenGL ES 2.0 functions.
+
++#undef GL_APICALL
++#define GL_APICALL
++#define GL_GLEXT_PROTOTYPES
++
+ #include "common/version.h"
+ #include "common/utilities.h"
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/libGLESv2.def b/src/3rdparty/angle/src/libGLESv2/libGLESv2.def
+index 88dceb3..33557eb 100644
+--- a/src/3rdparty/angle/src/libGLESv2/libGLESv2.def
++++ b/src/3rdparty/angle/src/libGLESv2/libGLESv2.def
+@@ -294,6 +294,3 @@ EXPORTS
+ glBindTexImage @158 NONAME
+ glCreateRenderer @177 NONAME
+ glDestroyRenderer @178 NONAME
+-
+- ; Setting up TRACE macro callbacks
+- SetTraceFunctionPointers @284
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
+index 5c44fe0..bfeaf51 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
+@@ -11,8 +11,6 @@
+ #include "common/features.h"
+ #include "common/utilities.h"
+
+-#include "third_party/trace_event/trace_event.h"
+-
+ // Definitions local to the translation unit
+ namespace
+ {
+@@ -120,7 +118,6 @@ HLSLCompiler::~HLSLCompiler()
+
+ bool HLSLCompiler::initialize()
+ {
+- TRACE_EVENT0("gpu", "initializeCompiler");
+ #if !defined(ANGLE_ENABLE_WINDOWS_STORE)
+ #if defined(ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES)
+ // Find a D3DCompiler module that had already been loaded based on a predefined list of versions.
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
+index 8ed1650..91e7552 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
+@@ -13,39 +13,39 @@
+ #include "libGLESv2/main.h"
+ #include "libGLESv2/formatutils.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughdepth2d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum2d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha2d11ps.h"
+-
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3d11vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3d11gs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3dui11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3di11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum3d11ps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha3d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2dvs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughdepth2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha2dps.h"
++
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3dvs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3dgs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3duips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3dips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum3dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha3dps.h"
+
+ #include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/swizzlef2dps.h"
+ #include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/swizzlei2dps.h"
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
+index 12905d0..4630762 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
+@@ -15,14 +15,14 @@
+ #include "libGLESv2/FramebufferAttachment.h"
+
+ // Precompiled shaders
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloat11vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloat11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloatvs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloatps.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuint11vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuint11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuintvs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuintps.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsint11vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsint11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsintvs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsintps.h"
+
+ namespace rx
+ {
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
+index 1bc2bd8..a4072d8 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
+@@ -22,11 +22,11 @@
+ #include "libGLESv2/Context.h"
+
+ // Precompiled shaders
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_gs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_ps_4f.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_ps_4i.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_ps_4ui.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexturevs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexturegs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture_4fps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture_4ips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture_4uips.h"
+
+ namespace rx
+ {
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
+index 3fcacf6..834b7bd 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
+@@ -12,8 +12,8 @@
+ #include "libGLESv2/renderer/d3d/d3d11/Renderer11.h"
+
+ // Precompiled shaders
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2dvs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dps.h"
+
+ #include "common/features.h"
+ #include "common/NativeWindow.h"
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/shaders/Clear11.hlsl b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/shaders/Clear11.hlsl
+index 6deef2b..b4cf380 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/shaders/Clear11.hlsl
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/shaders/Clear11.hlsl
+@@ -13,10 +13,12 @@ struct PS_OutputFloat
+ float4 color1 : SV_TARGET1;
+ float4 color2 : SV_TARGET2;
+ float4 color3 : SV_TARGET3;
++#if SM4
+ float4 color4 : SV_TARGET4;
+ float4 color5 : SV_TARGET5;
+ float4 color6 : SV_TARGET6;
+ float4 color7 : SV_TARGET7;
++#endif
+ };
+
+ PS_OutputFloat PS_ClearFloat(in float4 inPosition : SV_POSITION, in float4 inColor : COLOR)
+@@ -26,10 +28,12 @@ PS_OutputFloat PS_ClearFloat(in float4 inPosition : SV_POSITION, in float4 inCol
+ outColor.color1 = inColor;
+ outColor.color2 = inColor;
+ outColor.color3 = inColor;
++#if SM4
+ outColor.color4 = inColor;
+ outColor.color5 = inColor;
+ outColor.color6 = inColor;
+ outColor.color7 = inColor;
++#endif
+ return outColor;
+ }
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp
+index d4fcd17..2ca7a9c 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp
+@@ -27,20 +27,20 @@ namespace
+
+ const BYTE* const g_shaderCode[] =
+ {
+- g_vs20_standardvs,
+- g_vs20_flipyvs,
+- g_ps20_passthroughps,
+- g_ps20_luminanceps,
+- g_ps20_componentmaskps
++ g_vs20_VS_standard,
++ g_vs20_VS_flipy,
++ g_ps20_PS_passthrough,
++ g_ps20_PS_luminance,
++ g_ps20_PS_componentmask
+ };
+
+ const size_t g_shaderSize[] =
+ {
+- sizeof(g_vs20_standardvs),
+- sizeof(g_vs20_flipyvs),
+- sizeof(g_ps20_passthroughps),
+- sizeof(g_ps20_luminanceps),
+- sizeof(g_ps20_componentmaskps)
++ sizeof(g_vs20_VS_standard),
++ sizeof(g_vs20_VS_flipy),
++ sizeof(g_ps20_PS_passthrough),
++ sizeof(g_ps20_PS_luminance),
++ sizeof(g_ps20_PS_componentmask)
+ };
+ }
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+index 3bac4ba..82963ec 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+@@ -42,8 +42,6 @@
+ #include "common/features.h"
+ #include "common/utilities.h"
+
+-#include "third_party/trace_event/trace_event.h"
+-
+ #include <sstream>
+
+ // Can also be enabled by defining FORCE_REF_RAST in the project's predefined macros
+@@ -185,7 +183,6 @@ EGLint Renderer9::initialize()
+ return EGL_NOT_INITIALIZED;
+ }
+
+- TRACE_EVENT0("gpu", "GetModuleHandle_d3d9");
+ mD3d9Module = GetModuleHandle(TEXT("d3d9.dll"));
+
+ if (mD3d9Module == NULL)
+@@ -202,14 +199,12 @@ EGLint Renderer9::initialize()
+ // desktop. Direct3D9Ex is available in Windows Vista and later if suitable drivers are available.
+ if (ANGLE_D3D9EX == ANGLE_ENABLED && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex)))
+ {
+- TRACE_EVENT0("gpu", "D3d9Ex_QueryInterface");
+ ASSERT(mD3d9Ex);
+ mD3d9Ex->QueryInterface(__uuidof(IDirect3D9), reinterpret_cast<void**>(&mD3d9));
+ ASSERT(mD3d9);
+ }
+ else
+ {
+- TRACE_EVENT0("gpu", "Direct3DCreate9");
+ mD3d9 = Direct3DCreate9(D3D_SDK_VERSION);
+ }
+
+@@ -228,7 +223,6 @@ EGLint Renderer9::initialize()
+
+ // Give up on getting device caps after about one second.
+ {
+- TRACE_EVENT0("gpu", "GetDeviceCaps");
+ for (int i = 0; i < 10; ++i)
+ {
+ result = mD3d9->GetDeviceCaps(mAdapter, mDeviceType, &mDeviceCaps);
+@@ -263,7 +257,6 @@ EGLint Renderer9::initialize()
+ }
+
+ {
+- TRACE_EVENT0("gpu", "GetAdapterIdentifier");
+ mD3d9->GetAdapterIdentifier(mAdapter, 0, &mAdapterIdentifier);
+ }
+
+@@ -300,7 +293,6 @@ EGLint Renderer9::initialize()
+ static const TCHAR className[] = TEXT("STATIC");
+
+ {
+- TRACE_EVENT0("gpu", "CreateWindowEx");
+ mDeviceWindow = CreateWindowEx(WS_EX_NOACTIVATE, className, windowName, WS_DISABLED | WS_POPUP, 0, 0, 1, 1, HWND_MESSAGE, NULL, GetModuleHandle(NULL), NULL);
+ }
+
+@@ -308,7 +300,6 @@ EGLint Renderer9::initialize()
+ DWORD behaviorFlags = D3DCREATE_FPU_PRESERVE | D3DCREATE_NOWINDOWCHANGES;
+
+ {
+- TRACE_EVENT0("gpu", "D3d9_CreateDevice");
+ result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &presentParameters, &mDevice);
+ }
+ if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY || result == D3DERR_DEVICELOST)
+@@ -318,7 +309,6 @@ EGLint Renderer9::initialize()
+
+ if (FAILED(result))
+ {
+- TRACE_EVENT0("gpu", "D3d9_CreateDevice2");
+ result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &presentParameters, &mDevice);
+
+ if (FAILED(result))
+@@ -330,13 +320,11 @@ EGLint Renderer9::initialize()
+
+ if (mD3d9Ex)
+ {
+- TRACE_EVENT0("gpu", "mDevice_QueryInterface");
+ result = mDevice->QueryInterface(__uuidof(IDirect3DDevice9Ex), (void**)&mDeviceEx);
+ ASSERT(SUCCEEDED(result));
+ }
+
+ {
+- TRACE_EVENT0("gpu", "ShaderCache initialize");
+ mVertexShaderCache.initialize(mDevice);
+ mPixelShaderCache.initialize(mDevice);
+ }
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.ps b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.ps
+index dc357d0..eb43eb3 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.ps
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.ps
+@@ -11,7 +11,7 @@ uniform float4 add : c1;
+
+ // Passthrough Pixel Shader
+ // Outputs texture 0 sampled at texcoord 0.
+-float4 passthroughps(float4 texcoord : TEXCOORD0) : COLOR
++float4 PS_passthrough(float4 texcoord : TEXCOORD0) : COLOR
+ {
+ return tex2D(tex, texcoord.xy);
+ };
+@@ -19,7 +19,7 @@ float4 passthroughps(float4 texcoord : TEXCOORD0) : COLOR
+ // Luminance Conversion Pixel Shader
+ // Performs a mad operation using the LA data from the texture with mult.xw and add.xw.
+ // Returns data in the form of llla
+-float4 luminanceps(float4 texcoord : TEXCOORD0) : COLOR
++float4 PS_luminance(float4 texcoord : TEXCOORD0) : COLOR
+ {
+ return (tex2D(tex, texcoord.xy).xw * mult.xw + add.xw).xxxy;
+ };
+@@ -27,7 +27,7 @@ float4 luminanceps(float4 texcoord : TEXCOORD0) : COLOR
+ // RGB/A Component Mask Pixel Shader
+ // Performs a mad operation using the texture's RGBA data with mult.xyzw and add.xyzw.
+ // Returns data in the form of rgba
+-float4 componentmaskps(float4 texcoord : TEXCOORD0) : COLOR
++float4 PS_componentmask(float4 texcoord : TEXCOORD0) : COLOR
+ {
+ return tex2D(tex, texcoord.xy) * mult + add;
+ };
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.vs b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.vs
+index 3a36980..3bd611b 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.vs
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/shaders/Blit.vs
+@@ -17,7 +17,7 @@ uniform float4 halfPixelSize : c0;
+ // Outputs the homogenous position as-is.
+ // Outputs a tex coord with (0,0) in the upper-left corner of the screen and (1,1) in the bottom right.
+ // C0.X must be negative half-pixel width, C0.Y must be half-pixel height. C0.ZW must be 0.
+-VS_OUTPUT standardvs(in float4 position : POSITION)
++VS_OUTPUT VS_standard(in float4 position : POSITION)
+ {
+ VS_OUTPUT Out;
+
+@@ -32,7 +32,7 @@ VS_OUTPUT standardvs(in float4 position : POSITION)
+ // Outputs the homogenous position as-is.
+ // Outputs a tex coord with (0,1) in the upper-left corner of the screen and (1,0) in the bottom right.
+ // C0.XY must be the half-pixel width and height. C0.ZW must be 0.
+-VS_OUTPUT flipyvs(in float4 position : POSITION)
++VS_OUTPUT VS_flipy(in float4 position : POSITION)
+ {
+ VS_OUTPUT Out;
+
+--
+1.9.4.msysgit.1
+
diff --git a/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch b/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch
new file mode 100644
index 0000000..45a3f17
--- /dev/null
+++ b/0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch
@@ -0,0 +1,109 @@
+From 3a39939b5eba9f788789961c4800ba62618f758c Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint <Friedemann.Kleint at digia.com>
+Date: Tue, 11 Nov 2014 10:26:32 +0200
+Subject: [PATCH 04/16] Make it possible to link ANGLE statically for
+ single-thread use.
+
+Fix exports and provide static instances of thread-local
+data depending on QT_OPENGL_ES_2_ANGLE_STATIC.
+
+Change-Id: Ifab25a820adf5953bb3b09036de53dbf7f1a7fd5
+---
+ src/3rdparty/angle/include/KHR/khrplatform.h | 2 +-
+ src/3rdparty/angle/src/libEGL/main.cpp | 10 ++++++++++
+ src/3rdparty/angle/src/libGLESv2/main.cpp | 10 ++++++++--
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h
+index c9e6f17..1ac2d3f 100644
+--- a/src/3rdparty/angle/include/KHR/khrplatform.h
++++ b/src/3rdparty/angle/include/KHR/khrplatform.h
+@@ -97,7 +97,7 @@
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+-#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
++#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(QT_OPENGL_ES_2_ANGLE_STATIC)
+ # define KHRONOS_APICALL __declspec(dllimport)
+ #elif defined (__SYMBIAN32__)
+ # define KHRONOS_APICALL IMPORT_C
+diff --git a/src/3rdparty/angle/src/libEGL/main.cpp b/src/3rdparty/angle/src/libEGL/main.cpp
+index d1489f2..e88cad7 100644
+--- a/src/3rdparty/angle/src/libEGL/main.cpp
++++ b/src/3rdparty/angle/src/libEGL/main.cpp
+@@ -49,6 +49,8 @@ void DeallocateCurrent()
+
+ }
+
++#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
++
+ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
+ {
+ switch (reason)
+@@ -108,16 +110,24 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
+ return TRUE;
+ }
+
++#endif // !QT_OPENGL_ES_2_ANGLE_STATIC
++
+ namespace egl
+ {
+
+ Current *GetCurrentData()
+ {
++#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
+ Current *current = reinterpret_cast<Current*>(GetTLSValue(currentTLS));
+
+ // ANGLE issue 488: when the dll is loaded after thread initialization,
+ // thread local storage (current) might not exist yet.
+ return (current ? current : AllocateCurrent());
++#else
++ // No precautions for thread safety taken as ANGLE is used single-threaded in Qt.
++ static Current current = { EGL_SUCCESS, EGL_OPENGL_ES_API, EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE };
++ return ¤t;
++#endif
+ }
+
+ void recordError(const Error &error)
+diff --git a/src/3rdparty/angle/src/libGLESv2/main.cpp b/src/3rdparty/angle/src/libGLESv2/main.cpp
+index 3ac00d5..00f63ae 100644
+--- a/src/3rdparty/angle/src/libGLESv2/main.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/main.cpp
+@@ -74,7 +74,7 @@ void DeallocateCurrent()
+
+ }
+
+-#ifdef ANGLE_PLATFORM_WINDOWS
++#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(QT_OPENGL_ES_2_ANGLE_STATIC)
+ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
+ {
+ switch (reason)
+@@ -117,18 +117,24 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
+
+ return TRUE;
+ }
+-#endif
++#endif // ANGLE_PLATFORM_WINDOWS && !QT_OPENGL_ES_2_ANGLE_STATIC
+
+ namespace gl
+ {
+
+ Current *GetCurrentData()
+ {
++#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
+ Current *current = reinterpret_cast<Current*>(GetTLSValue(currentTLS));
+
+ // ANGLE issue 488: when the dll is loaded after thread initialization,
+ // thread local storage (current) might not exist yet.
+ return (current ? current : AllocateCurrent());
++#else
++ // No precautions for thread safety taken as ANGLE is used single-threaded in Qt.
++ static Current current = { 0, 0 };
++ return ¤t;
++#endif
+ }
+
+ void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface)
+--
+1.9.4.msysgit.1
+
diff --git a/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-or-t.patch b/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-or-t.patch
new file mode 100644
index 0000000..801db67
--- /dev/null
+++ b/0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-or-t.patch
@@ -0,0 +1,64 @@
+From 4a5960465d1632ab089320fcbba4af294d58fd9a Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Fri, 7 Nov 2014 14:05:36 +0200
+Subject: [PATCH 08/16] ANGLE: Dynamically load D3D compiler from a list or the
+ environment
+
+If the default compiler cannot be found, load it from a list of DLL names,
+including a non-versioned proxy DLL provided by Qt. On Desktop Windows,
+the default compiler can also be specified by an environment variable,
+QT_D3DCOMPILER_DLL.
+
+Change-Id: I0d7a8a8a36cc571836f8fa59ea14513b9b19c19b
+---
+ .../src/libGLESv2/renderer/d3d/HLSLCompiler.cpp | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
+index bfeaf51..9d003b4 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
+@@ -11,6 +11,10 @@
+ #include "common/features.h"
+ #include "common/utilities.h"
+
++#ifndef QT_D3DCOMPILER_DLL
++#define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL
++#endif
++
+ // Definitions local to the translation unit
+ namespace
+ {
+@@ -132,6 +136,29 @@ bool HLSLCompiler::initialize()
+ }
+ #endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES
+
++ // Load the compiler DLL specified by the environment, or default to QT_D3DCOMPILER_DLL
++ const wchar_t *defaultCompiler = _wgetenv(L"QT_D3DCOMPILER_DLL");
++ if (!defaultCompiler)
++ defaultCompiler = QT_D3DCOMPILER_DLL;
++
++ const wchar_t *compilerDlls[] = {
++ defaultCompiler,
++ L"d3dcompiler_47.dll",
++ L"d3dcompiler_46.dll",
++ L"d3dcompiler_45.dll",
++ L"d3dcompiler_44.dll",
++ L"d3dcompiler_43.dll",
++ 0
++ };
++
++ // Load the first available known compiler DLL
++ for (int i = 0; compilerDlls[i]; ++i)
++ {
++ mD3DCompilerModule = LoadLibrary(compilerDlls[i]);
++ if (mD3DCompilerModule)
++ break;
++ }
++
+ if (!mD3DCompilerModule)
+ {
+ // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with.
+--
+1.9.4.msysgit.1
+
diff --git a/0009-ANGLE-Support-WinRT.patch b/0009-ANGLE-Support-WinRT.patch
new file mode 100644
index 0000000..a38fb4e
--- /dev/null
+++ b/0009-ANGLE-Support-WinRT.patch
@@ -0,0 +1,837 @@
+From 4d150ba3814f824f1cadaedbdb83d0ac79d0e1a2 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Fri, 14 Nov 2014 09:28:11 +0200
+Subject: [PATCH 09/16] ANGLE: Support WinRT
+
+Tweak ANGLE's existing support for WinRT to allow for changing the
+window size on Windows Phone.
+
+Change-Id: Ia312b5318b977838a2953f1f530487cbf24974bc
+---
+ src/3rdparty/angle/include/EGL/eglplatform.h | 5 +-
+ src/3rdparty/angle/src/common/NativeWindow.h | 7 +-
+ src/3rdparty/angle/src/common/platform.h | 4 +-
+ .../angle/src/common/win32/NativeWindow.cpp | 2 +-
+ .../src/common/winrt/CoreWindowNativeWindow.cpp | 87 +++++++++++++---------
+ .../src/common/winrt/CoreWindowNativeWindow.h | 48 ++----------
+ .../src/common/winrt/InspectableNativeWindow.cpp | 8 +-
+ .../src/common/winrt/InspectableNativeWindow.h | 7 +-
+ .../common/winrt/SwapChainPanelNativeWindow.cpp | 2 +-
+ .../src/common/winrt/SwapChainPanelNativeWindow.h | 2 +-
+ src/3rdparty/angle/src/libEGL/Display.h | 1 +
+ src/3rdparty/angle/src/libEGL/Surface.cpp | 45 ++++++++---
+ src/3rdparty/angle/src/libEGL/Surface.h | 4 +
+ src/3rdparty/angle/src/libEGL/libEGL.cpp | 20 +++++
+ .../src/libGLESv2/renderer/d3d/d3d11/Renderer11.h | 2 +-
+ .../libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp | 74 +++++++++++-------
+ .../src/libGLESv2/renderer/d3d/d3d11/SwapChain11.h | 2 +
+ 17 files changed, 189 insertions(+), 131 deletions(-)
+
+diff --git a/src/3rdparty/angle/include/EGL/eglplatform.h b/src/3rdparty/angle/include/EGL/eglplatform.h
+index 3793e57..2eb3674 100644
+--- a/src/3rdparty/angle/include/EGL/eglplatform.h
++++ b/src/3rdparty/angle/include/EGL/eglplatform.h
+@@ -73,13 +73,14 @@
+ #endif
+ #include <windows.h>
+
+-typedef HDC EGLNativeDisplayType;
+ typedef HBITMAP EGLNativePixmapType;
+
+-#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP /* Windows Store */
++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) /* Windows Store */
+ #include <inspectable.h>
++typedef IInspectable* EGLNativeDisplayType;
+ typedef IInspectable* EGLNativeWindowType;
+ #else
++typedef HDC EGLNativeDisplayType;
+ typedef HWND EGLNativeWindowType;
+ #endif
+
+diff --git a/src/3rdparty/angle/src/common/NativeWindow.h b/src/3rdparty/angle/src/common/NativeWindow.h
+index dc5fc8f..9e93aea 100644
+--- a/src/3rdparty/angle/src/common/NativeWindow.h
++++ b/src/3rdparty/angle/src/common/NativeWindow.h
+@@ -44,10 +44,11 @@ typedef IDXGIFactory DXGIFactory;
+
+ namespace rx
+ {
++
+ class NativeWindow
+ {
+- public:
+- explicit NativeWindow(EGLNativeWindowType window);
++public:
++ explicit NativeWindow(EGLNativeWindowType window, EGLNativeDisplayType display);
+
+ bool initialize();
+ bool getClientRect(LPRECT rect);
+@@ -58,9 +59,11 @@ class NativeWindow
+ DXGISwapChain** swapChain);
+
+ inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
++ inline EGLNativeDisplayType getNativeDisplay() const { return mDisplay; }
+
+ private:
+ EGLNativeWindowType mWindow;
++ EGLNativeDisplayType mDisplay;
+
+ #if defined(ANGLE_ENABLE_WINDOWS_STORE)
+ std::shared_ptr<InspectableNativeWindow> mImpl;
+diff --git a/src/3rdparty/angle/src/common/platform.h b/src/3rdparty/angle/src/common/platform.h
+index cd12dba..0065ec7 100644
+--- a/src/3rdparty/angle/src/common/platform.h
++++ b/src/3rdparty/angle/src/common/platform.h
+@@ -34,7 +34,7 @@
+ #endif
+
+ #ifdef ANGLE_PLATFORM_WINDOWS
+-# if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP
++# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+ # define ANGLE_ENABLE_WINDOWS_STORE 1
+ # endif
+ # ifndef STRICT
+@@ -67,7 +67,9 @@
+ # if defined(ANGLE_ENABLE_WINDOWS_STORE)
+ # include <dxgi1_3.h>
+ # if defined(_DEBUG)
++# if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
+ # include <DXProgrammableCapture.h>
++# endif
+ # include <dxgidebug.h>
+ # endif
+ # endif
+diff --git a/src/3rdparty/angle/src/common/win32/NativeWindow.cpp b/src/3rdparty/angle/src/common/win32/NativeWindow.cpp
+index aa2bfa4..2440747 100644
+--- a/src/3rdparty/angle/src/common/win32/NativeWindow.cpp
++++ b/src/3rdparty/angle/src/common/win32/NativeWindow.cpp
+@@ -16,7 +16,7 @@ bool IsValidEGLNativeWindowType(EGLNativeWindowType window)
+ return (IsWindow(window) == TRUE);
+ }
+
+-NativeWindow::NativeWindow(EGLNativeWindowType window) : mWindow(window)
++NativeWindow::NativeWindow(EGLNativeWindowType window, EGLNativeDisplayType display) : mWindow(window), mDisplay(display)
+ {
+ }
+
+diff --git a/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp b/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp
+index 0e63fa5..9b65c15 100644
+--- a/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp
++++ b/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.cpp
+@@ -6,21 +6,25 @@
+
+ // CoreWindowNativeWindow.cpp: NativeWindow for managing ICoreWindow native window types.
+
+-#include <windows.graphics.display.h>
++#include <algorithm>
+ #include "common/winrt/CoreWindowNativeWindow.h"
+ using namespace ABI::Windows::Foundation::Collections;
+
+ namespace rx
+ {
++
++typedef ITypedEventHandler<ABI::Windows::UI::Core::CoreWindow *, ABI::Windows::UI::Core::WindowSizeChangedEventArgs *> SizeChangedHandler;
++
+ CoreWindowNativeWindow::~CoreWindowNativeWindow()
+ {
+ unregisterForSizeChangeEvents();
+ }
+
+-bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet *propertySet)
++bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, EGLNativeDisplayType display, IPropertySet *propertySet)
+ {
+ ComPtr<IPropertySet> props = propertySet;
+ ComPtr<IInspectable> win = window;
++ ComPtr<IInspectable> displayInformation = display;
+ SIZE swapChainSize = {};
+ bool swapChainSizeSpecified = false;
+ HRESULT result = S_OK;
+@@ -47,6 +51,29 @@ bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet
+
+ if (SUCCEEDED(result))
+ {
++ result = displayInformation.As(&mDisplayInformation);
++ }
++
++ if (SUCCEEDED(result))
++ {
++#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
++ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation2> displayInformation2;
++ result = mDisplayInformation.As(&displayInformation2);
++ ASSERT(SUCCEEDED(result));
++
++ result = displayInformation2->get_RawPixelsPerViewPixel(&mScaleFactor);
++ ASSERT(SUCCEEDED(result));
++#else
++ ABI::Windows::Graphics::Display::ResolutionScale resolutionScale;
++ result = mDisplayInformation->get_ResolutionScale(&resolutionScale);
++ ASSERT(SUCCEEDED(result));
++
++ mScaleFactor = DOUBLE(resolutionScale) / 100.0;
++#endif
++ }
++
++ if (SUCCEEDED(result))
++ {
+ // If a swapchain size is specfied, then the automatic resize
+ // behaviors implemented by the host should be disabled. The swapchain
+ // will be still be scaled when being rendered to fit the bounds
+@@ -60,7 +87,14 @@ bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet
+ }
+ else
+ {
+- result = GetCoreWindowSizeInPixels(mCoreWindow, &mClientRect);
++ ABI::Windows::Foundation::Rect rect;
++ HRESULT result = mCoreWindow->get_Bounds(&rect);
++ if (SUCCEEDED(result))
++ {
++ LONG width = std::floor(rect.Width * mScaleFactor + 0.5);
++ LONG height = std::floor(rect.Height * mScaleFactor + 0.5);
++ mClientRect = { 0, 0, width, height };
++ }
+ }
+ }
+
+@@ -76,12 +110,8 @@ bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet
+
+ bool CoreWindowNativeWindow::registerForSizeChangeEvents()
+ {
+- ComPtr<IWindowSizeChangedEventHandler> sizeChangedHandler;
+- HRESULT result = Microsoft::WRL::MakeAndInitialize<CoreWindowSizeChangedHandler>(sizeChangedHandler.ReleaseAndGetAddressOf(), this->shared_from_this());
+- if (SUCCEEDED(result))
+- {
+- result = mCoreWindow->add_SizeChanged(sizeChangedHandler.Get(), &mSizeChangedEventToken);
+- }
++ HRESULT result = mCoreWindow->add_SizeChanged(Callback<SizeChangedHandler>(this, &CoreWindowNativeWindow::onSizeChanged).Get(),
++ &mSizeChangedEventToken);
+
+ if (SUCCEEDED(result))
+ {
+@@ -126,7 +156,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, DXGIFactor
+ if (SUCCEEDED(result))
+ {
+
+-#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
++#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) // This block is disabled for Qt applications, as the resize events are expected
+ // Test if swapchain supports resize. On Windows Phone devices, this will return DXGI_ERROR_UNSUPPORTED. On
+ // other devices DXGI_ERROR_INVALID_CALL should be returned because the combination of flags passed
+ // (DXGI_SWAP_CHAIN_FLAG_NONPREROTATED | DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE) are invalid flag combinations.
+@@ -152,36 +182,19 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, DXGIFactor
+ return result;
+ }
+
+-HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWindow>& coreWindow, RECT *windowSize)
++// Basically, this shouldn't be used on Phone
++HRESULT CoreWindowNativeWindow::onSizeChanged(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IWindowSizeChangedEventArgs *e)
+ {
+- ABI::Windows::Foundation::Rect bounds;
+- HRESULT result = coreWindow->get_Bounds(&bounds);
+- if (SUCCEEDED(result))
++ ABI::Windows::Foundation::Size size;
++ if (SUCCEEDED(e->get_Size(&size)))
+ {
+- *windowSize = { 0, 0, ConvertDipsToPixels(bounds.Width), ConvertDipsToPixels(bounds.Height) };
++ SIZE windowSizeInPixels = {
++ std::floor(size.Width * mScaleFactor + 0.5),
++ std::floor(size.Height * mScaleFactor + 0.5)
++ };
++ setNewClientSize(windowSizeInPixels);
+ }
+
+- return result;
+-}
+-
+-static float GetLogicalDpi()
+-{
+- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
+- float dpi = 96.0f;
+-
+- if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf())))
+- {
+- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
+- {
+- return dpi;
+- }
+- }
+- return dpi;
+-}
+-
+-long ConvertDipsToPixels(float dips)
+-{
+- static const float dipsPerInch = 96.0f;
+- return lround((dips * GetLogicalDpi() / dipsPerInch));
++ return S_OK;
+ }
+ }
+diff --git a/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.h b/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.h
+index 0c6222d..1c55124 100644
+--- a/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.h
++++ b/src/3rdparty/angle/src/common/winrt/CoreWindowNativeWindow.h
+@@ -11,67 +11,29 @@
+
+ #include "common/winrt/InspectableNativeWindow.h"
+ #include <memory>
+-
+-typedef ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CUI__CCore__CCoreWindow_Windows__CUI__CCore__CWindowSizeChangedEventArgs_t IWindowSizeChangedEventHandler;
++#include <windows.graphics.display.h>
+
+ namespace rx
+ {
+-long ConvertDipsToPixels(float dips);
+
+ class CoreWindowNativeWindow : public InspectableNativeWindow, public std::enable_shared_from_this<CoreWindowNativeWindow>
+ {
+ public:
+ ~CoreWindowNativeWindow();
+
+- bool initialize(EGLNativeWindowType window, IPropertySet *propertySet);
++ bool initialize(EGLNativeWindowType window, EGLNativeDisplayType display, IPropertySet *propertySet);
+ bool registerForSizeChangeEvents();
+ void unregisterForSizeChangeEvents();
+ HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain);
+
+ private:
++ HRESULT onSizeChanged(ABI::Windows::UI::Core::ICoreWindow *, ABI::Windows::UI::Core::IWindowSizeChangedEventArgs *);
++
+ ComPtr<ABI::Windows::UI::Core::ICoreWindow> mCoreWindow;
++ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> mDisplayInformation;
+ ComPtr<IMap<HSTRING, IInspectable*>> mPropertyMap;
+ };
+
+-[uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)]
+-class CoreWindowSizeChangedHandler :
+- public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IWindowSizeChangedEventHandler>
+-{
+- public:
+- CoreWindowSizeChangedHandler() { }
+- HRESULT RuntimeClassInitialize(std::shared_ptr<InspectableNativeWindow> host)
+- {
+- if (!host)
+- {
+- return E_INVALIDARG;
+- }
+-
+- mHost = host;
+- return S_OK;
+- }
+-
+- // IWindowSizeChangedEventHandler
+- IFACEMETHOD(Invoke)(ABI::Windows::UI::Core::ICoreWindow *sender, ABI::Windows::UI::Core::IWindowSizeChangedEventArgs *sizeChangedEventArgs)
+- {
+- std::shared_ptr<InspectableNativeWindow> host = mHost.lock();
+- if (host)
+- {
+- ABI::Windows::Foundation::Size windowSize;
+- if (SUCCEEDED(sizeChangedEventArgs->get_Size(&windowSize)))
+- {
+- SIZE windowSizeInPixels = { ConvertDipsToPixels(windowSize.Width), ConvertDipsToPixels(windowSize.Height) };
+- host->setNewClientSize(windowSizeInPixels);
+- }
+- }
+-
+- return S_OK;
+- }
+-
+- private:
+- std::weak_ptr<InspectableNativeWindow> mHost;
+-};
+-
+-HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWindow>& coreWindow, RECT *windowSize);
+ }
+
+ #endif // COMMON_WINRT_COREWINDOWNATIVEWINDOW_H_
+diff --git a/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.cpp b/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.cpp
+index c062a48..0589f6d 100644
+--- a/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.cpp
++++ b/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.cpp
+@@ -11,9 +11,9 @@
+
+ namespace rx
+ {
+-NativeWindow::NativeWindow(EGLNativeWindowType window)
++NativeWindow::NativeWindow(EGLNativeWindowType window, EGLNativeDisplayType display)
++ : mWindow(window), mDisplay(display)
+ {
+- mWindow = window;
+ }
+
+ bool NativeWindow::initialize()
+@@ -40,7 +40,7 @@ bool NativeWindow::initialize()
+ mImpl = std::make_shared<CoreWindowNativeWindow>();
+ if (mImpl)
+ {
+- return mImpl->initialize(mWindow, propertySet.Get());
++ return mImpl->initialize(mWindow, mDisplay, propertySet.Get());
+ }
+ }
+ else if (IsSwapChainPanel(mWindow, &swapChainPanel))
+@@ -48,7 +48,7 @@ bool NativeWindow::initialize()
+ mImpl = std::make_shared<SwapChainPanelNativeWindow>();
+ if (mImpl)
+ {
+- return mImpl->initialize(mWindow, propertySet.Get());
++ return mImpl->initialize(mWindow, mDisplay, propertySet.Get());
+ }
+ }
+ else
+diff --git a/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.h b/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.h
+index c625348..402941a 100644
+--- a/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.h
++++ b/src/3rdparty/angle/src/common/winrt/InspectableNativeWindow.h
+@@ -32,13 +32,14 @@ class InspectableNativeWindow
+ mRequiresSwapChainScaling(false),
+ mClientRectChanged(false),
+ mClientRect({0,0,0,0}),
+- mNewClientRect({0,0,0,0})
++ mNewClientRect({0,0,0,0}),
++ mScaleFactor(1.0)
+ {
+ mSizeChangedEventToken.value = 0;
+ }
+ virtual ~InspectableNativeWindow(){}
+
+- virtual bool initialize(EGLNativeWindowType window, IPropertySet *propertySet) = 0;
++ virtual bool initialize(EGLNativeWindowType window, EGLNativeDisplayType display, IPropertySet *propertySet) = 0;
+ virtual HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain) = 0;
+ virtual bool registerForSizeChangeEvents() = 0;
+ virtual void unregisterForSizeChangeEvents() = 0;
+@@ -49,6 +50,7 @@ class InspectableNativeWindow
+ if (mClientRectChanged && mSupportsSwapChainResize)
+ {
+ mClientRect = mNewClientRect;
++ mClientRectChanged = false;
+ }
+
+ *rect = mClientRect;
+@@ -76,6 +78,7 @@ protected:
+ RECT mClientRect;
+ RECT mNewClientRect;
+ bool mClientRectChanged;
++ DOUBLE mScaleFactor;
+
+ EventRegistrationToken mSizeChangedEventToken;
+ };
+diff --git a/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.cpp b/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.cpp
+index 4e4fb6d..268dfbd 100644
+--- a/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.cpp
++++ b/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.cpp
+@@ -18,7 +18,7 @@ SwapChainPanelNativeWindow::~SwapChainPanelNativeWindow()
+ unregisterForSizeChangeEvents();
+ }
+
+-bool SwapChainPanelNativeWindow::initialize(EGLNativeWindowType window, IPropertySet *propertySet)
++bool SwapChainPanelNativeWindow::initialize(EGLNativeWindowType window, EGLNativeDisplayType display, IPropertySet *propertySet)
+ {
+ ComPtr<IPropertySet> props = propertySet;
+ ComPtr<IInspectable> win = window;
+diff --git a/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.h b/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.h
+index e88f554..5bbf274 100644
+--- a/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.h
++++ b/src/3rdparty/angle/src/common/winrt/SwapChainPanelNativeWindow.h
+@@ -18,7 +18,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, public std::e
+ public:
+ ~SwapChainPanelNativeWindow();
+
+- bool initialize(EGLNativeWindowType window, IPropertySet *propertySet);
++ bool initialize(EGLNativeWindowType window, EGLNativeDisplayType display, IPropertySet *propertySet);
+ bool registerForSizeChangeEvents();
+ void unregisterForSizeChangeEvents();
+ HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain);
+diff --git a/src/3rdparty/angle/src/libEGL/Display.h b/src/3rdparty/angle/src/libEGL/Display.h
+index 378323a..b3ffcc8 100644
+--- a/src/3rdparty/angle/src/libEGL/Display.h
++++ b/src/3rdparty/angle/src/libEGL/Display.h
+@@ -67,6 +67,7 @@ class Display
+
+ const char *getExtensionString() const;
+ const char *getVendorString() const;
++ EGLNativeDisplayType getDisplayId() const { return mDisplayId; }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Display);
+diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp
+index 3414656..b664a85 100644
+--- a/src/3rdparty/angle/src/libEGL/Surface.cpp
++++ b/src/3rdparty/angle/src/libEGL/Surface.cpp
+@@ -31,7 +31,7 @@ namespace egl
+ {
+
+ Surface::Surface(Display *display, const Config *config, EGLNativeWindowType window, EGLint fixedSize, EGLint width, EGLint height, EGLint postSubBufferSupported)
+- : mDisplay(display), mConfig(config), mNativeWindow(window), mPostSubBufferSupported(postSubBufferSupported)
++ : mDisplay(display), mConfig(config), mNativeWindow(window, display->getDisplayId()), mPostSubBufferSupported(postSubBufferSupported)
+ {
+ //TODO(jmadill): MANGLE refactor. (note, can't call makeRendererD3D because of dll export issues)
+ mRenderer = static_cast<rx::RendererD3D*>(mDisplay->getRenderer());
+@@ -47,6 +47,8 @@ Surface::Surface(Display *display, const Config *config, EGLNativeWindowType win
+ mSwapInterval = -1;
+ mWidth = width;
+ mHeight = height;
++ mFixedWidth = mWidth;
++ mFixedHeight = mHeight;
+ setSwapInterval(1);
+ mFixedSize = fixedSize;
+
+@@ -54,7 +56,7 @@ Surface::Surface(Display *display, const Config *config, EGLNativeWindowType win
+ }
+
+ Surface::Surface(Display *display, const Config *config, HANDLE shareHandle, EGLint width, EGLint height, EGLenum textureFormat, EGLenum textureType)
+- : mDisplay(display), mNativeWindow(NULL), mConfig(config), mShareHandle(shareHandle), mWidth(width), mHeight(height), mPostSubBufferSupported(EGL_FALSE)
++ : mDisplay(display), mNativeWindow(NULL, NULL), mConfig(config), mShareHandle(shareHandle), mWidth(width), mHeight(height), mPostSubBufferSupported(EGL_FALSE)
+ {
+ //TODO(jmadill): MANGLE refactor. (note, can't call makeRendererD3D because of dll export issues)
+ mRenderer = static_cast<rx::RendererD3D*>(mDisplay->getRenderer());
+@@ -71,6 +73,8 @@ Surface::Surface(Display *display, const Config *config, HANDLE shareHandle, EGL
+ setSwapInterval(1);
+ // This constructor is for offscreen surfaces, which are always fixed-size.
+ mFixedSize = EGL_TRUE;
++ mFixedWidth = mWidth;
++ mFixedHeight = mHeight;
+ }
+
+ Surface::~Surface()
+@@ -157,10 +161,13 @@ Error Surface::resetSwapChain()
+
+ Error Surface::resizeSwapChain(int backbufferWidth, int backbufferHeight)
+ {
+- ASSERT(backbufferWidth >= 0 && backbufferHeight >= 0);
+ ASSERT(mSwapChain);
+
+- EGLint status = mSwapChain->resize(std::max(1, backbufferWidth), std::max(1, backbufferHeight));
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
++ backbufferWidth = std::max(1, backbufferWidth);
++ backbufferHeight = std::max(1, backbufferHeight);
++#endif
++ EGLint status = mSwapChain->resize(backbufferWidth, backbufferHeight);
+
+ if (status == EGL_CONTEXT_LOST)
+ {
+@@ -209,14 +216,14 @@ Error Surface::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
+ return Error(EGL_SUCCESS);
+ }
+
+- if (x + width > mWidth)
++ if (x + width > abs(mWidth))
+ {
+- width = mWidth - x;
++ width = abs(mWidth) - x;
+ }
+
+- if (y + height > mHeight)
++ if (y + height > abs(mHeight))
+ {
+- height = mHeight - y;
++ height = abs(mHeight) - y;
+ }
+
+ if (width == 0 || height == 0)
+@@ -224,6 +231,9 @@ Error Surface::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
+ return Error(EGL_SUCCESS);
+ }
+
++ ASSERT(width > 0);
++ ASSERT(height > 0);
++
+ EGLint status = mSwapChain->swapRect(x, y, width, height);
+
+ if (status == EGL_CONTEXT_LOST)
+@@ -352,6 +362,13 @@ bool Surface::checkForOutOfDateSwapChain()
+ sizeDirty = clientWidth != getWidth() || clientHeight != getHeight();
+ }
+
++ if (mFixedSize && (mWidth != mFixedWidth || mHeight != mFixedHeight))
++ {
++ clientWidth = mFixedWidth;
++ clientHeight = mFixedHeight;
++ sizeDirty = true;
++ }
++
+ bool wasDirty = (mSwapIntervalDirty || sizeDirty);
+
+ if (mSwapIntervalDirty)
+@@ -378,7 +395,7 @@ bool Surface::checkForOutOfDateSwapChain()
+
+ Error Surface::swap()
+ {
+- return swapRect(0, 0, mWidth, mHeight);
++ return swapRect(0, 0, abs(mWidth), abs(mHeight));
+ }
+
+ Error Surface::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height)
+@@ -471,6 +488,16 @@ EGLint Surface::isFixedSize() const
+ return mFixedSize;
+ }
+
++void Surface::setFixedWidth(EGLint width)
++{
++ mFixedWidth = width;
++}
++
++void Surface::setFixedHeight(EGLint height)
++{
++ mFixedHeight = height;
++}
++
+ EGLenum Surface::getFormat() const
+ {
+ return mConfig->mRenderTargetFormat;
+diff --git a/src/3rdparty/angle/src/libEGL/Surface.h b/src/3rdparty/angle/src/libEGL/Surface.h
+index 662fe21..46382d0 100644
+--- a/src/3rdparty/angle/src/libEGL/Surface.h
++++ b/src/3rdparty/angle/src/libEGL/Surface.h
+@@ -70,6 +70,8 @@ class Surface
+ virtual gl::Texture2D *getBoundTexture() const;
+
+ EGLint isFixedSize() const;
++ void setFixedWidth(EGLint width);
++ void setFixedHeight(EGLint height);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Surface);
+@@ -91,6 +93,8 @@ class Surface
+ const egl::Config *mConfig; // EGL config surface was created with
+ EGLint mHeight; // Height of surface
+ EGLint mWidth; // Width of surface
++ EGLint mFixedHeight; // Pending height of the surface
++ EGLint mFixedWidth; // Pending width of the surface
+ // EGLint horizontalResolution; // Horizontal dot pitch
+ // EGLint verticalResolution; // Vertical dot pitch
+ // EGLBoolean largestPBuffer; // If true, create largest pbuffer possible
+diff --git a/src/3rdparty/angle/src/libEGL/libEGL.cpp b/src/3rdparty/angle/src/libEGL/libEGL.cpp
+index 6110698..dc20d85 100644
+--- a/src/3rdparty/angle/src/libEGL/libEGL.cpp
++++ b/src/3rdparty/angle/src/libEGL/libEGL.cpp
+@@ -706,6 +706,26 @@ EGLBoolean __stdcall eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint
+ return EGL_FALSE;
+ }
+
++ switch (attribute)
++ {
++ case EGL_WIDTH:
++ if (!eglSurface->isFixedSize() || !value) {
++ recordError(egl::Error(EGL_BAD_PARAMETER));
++ return EGL_FALSE;
++ }
++ eglSurface->setFixedWidth(value);
++ return EGL_TRUE;
++ case EGL_HEIGHT:
++ if (!eglSurface->isFixedSize() || !value) {
++ recordError(egl::Error(EGL_BAD_PARAMETER));
++ return EGL_FALSE;
++ }
++ eglSurface->setFixedHeight(value);
++ return EGL_TRUE;
++ default:
++ break;
++ }
++
+ UNIMPLEMENTED(); // FIXME
+
+ recordError(egl::Error(EGL_SUCCESS));
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h
+index 1655f1d..c789cae 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h
+@@ -231,7 +231,7 @@ class Renderer11 : public RendererD3D
+
+ HMODULE mD3d11Module;
+ HMODULE mDxgiModule;
+- HDC mDc;
++ EGLNativeDisplayType mDc;
+ std::vector<D3D_FEATURE_LEVEL> mAvailableFeatureLevels;
+ D3D_DRIVER_TYPE mDriverType;
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
+index 834b7bd..52c8a81 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp
+@@ -42,6 +42,8 @@ SwapChain11::SwapChain11(Renderer11 *renderer, NativeWindow nativeWindow, HANDLE
+ mPassThroughPS = NULL;
+ mWidth = -1;
+ mHeight = -1;
++ mRotateL = false;
++ mRotateR = false;
+ mSwapInterval = 0;
+ mAppCreatedShareHandle = mShareHandle != NULL;
+ mPassThroughResourcesInit = false;
+@@ -92,10 +94,11 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ ASSERT(device != NULL);
+
+ // D3D11 does not allow zero size textures
+- ASSERT(backbufferWidth >= 1);
+- ASSERT(backbufferHeight >= 1);
++ ASSERT(backbufferWidth != 0);
++ ASSERT(backbufferHeight != 0);
+
+ // Preserve the render target content
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
+ ID3D11Texture2D *previousOffscreenTexture = mOffscreenTexture;
+ if (previousOffscreenTexture)
+ {
+@@ -103,6 +106,7 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ }
+ const int previousWidth = mWidth;
+ const int previousHeight = mHeight;
++#endif
+
+ releaseOffscreenTexture();
+
+@@ -136,8 +140,8 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ D3D11_TEXTURE2D_DESC offscreenTextureDesc = {0};
+ mOffscreenTexture->GetDesc(&offscreenTextureDesc);
+
+- if (offscreenTextureDesc.Width != (UINT)backbufferWidth ||
+- offscreenTextureDesc.Height != (UINT)backbufferHeight ||
++ if (offscreenTextureDesc.Width != UINT(abs(backbufferWidth)) ||
++ offscreenTextureDesc.Height != UINT(abs(backbufferHeight)) ||
+ offscreenTextureDesc.Format != backbufferFormatInfo.texFormat ||
+ offscreenTextureDesc.MipLevels != 1 ||
+ offscreenTextureDesc.ArraySize != 1)
+@@ -152,8 +156,8 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ const bool useSharedResource = !mNativeWindow.getNativeWindow() && mRenderer->getShareHandleSupport();
+
+ D3D11_TEXTURE2D_DESC offscreenTextureDesc = {0};
+- offscreenTextureDesc.Width = backbufferWidth;
+- offscreenTextureDesc.Height = backbufferHeight;
++ offscreenTextureDesc.Width = abs(backbufferWidth);
++ offscreenTextureDesc.Height = abs(backbufferHeight);
+ offscreenTextureDesc.Format = backbufferFormatInfo.texFormat;
+ offscreenTextureDesc.MipLevels = 1;
+ offscreenTextureDesc.ArraySize = 1;
+@@ -233,8 +237,8 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ if (mDepthBufferFormat != GL_NONE)
+ {
+ D3D11_TEXTURE2D_DESC depthStencilTextureDesc;
+- depthStencilTextureDesc.Width = backbufferWidth;
+- depthStencilTextureDesc.Height = backbufferHeight;
++ depthStencilTextureDesc.Width = abs(backbufferWidth);
++ depthStencilTextureDesc.Height = abs(backbufferHeight);
+ depthStencilTextureDesc.Format = depthBufferFormatInfo.texFormat;
+ depthStencilTextureDesc.MipLevels = 1;
+ depthStencilTextureDesc.ArraySize = 1;
+@@ -286,6 +290,7 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ mWidth = backbufferWidth;
+ mHeight = backbufferHeight;
+
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
+ if (previousOffscreenTexture != NULL)
+ {
+ D3D11_BOX sourceBox = {0};
+@@ -307,6 +312,7 @@ EGLint SwapChain11::resetOffscreenTexture(int backbufferWidth, int backbufferHei
+ swapRect(0, 0, mWidth, mHeight);
+ }
+ }
++#endif
+
+ return EGL_SUCCESS;
+ }
+@@ -320,8 +326,16 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
+ return EGL_BAD_ACCESS;
+ }
+
++ // Windows Phone works around the rotation limitation by using negative values for the swap chain size
++#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
++ mRotateL = backbufferWidth < 0; // Landscape/InvertedLandscape
++ mRotateR = backbufferHeight < 0; // InvertedPortrait/InvertedLandscape
++ backbufferWidth = abs(backbufferWidth);
++ backbufferHeight = abs(backbufferHeight);
++#endif
++
+ // EGL allows creating a surface with 0x0 dimension, however, DXGI does not like 0x0 swapchains
+- if (backbufferWidth < 1 || backbufferHeight < 1)
++ if (backbufferWidth == 0 || backbufferHeight == 0)
+ {
+ return EGL_SUCCESS;
+ }
+@@ -329,6 +343,7 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
+ // Can only call resize if we have already created our swap buffer and resources
+ ASSERT(mSwapChain && mBackBufferTexture && mBackBufferRTView);
+
++#if !defined(ANGLE_ENABLE_WINDOWS_STORE) || (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) // The swap chain is not directly resized on Windows Phone
+ SafeRelease(mBackBufferTexture);
+ SafeRelease(mBackBufferRTView);
+
+@@ -366,6 +381,7 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
+ {
+ d3d11::SetDebugName(mBackBufferRTView, "Back buffer render target");
+ }
++#endif
+
+ return resetOffscreenTexture(backbufferWidth, backbufferHeight);
+ }
+@@ -512,16 +528,6 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
+ ID3D11Device *device = mRenderer->getDevice();
+ ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
+
+- // Set vertices
+- D3D11_MAPPED_SUBRESOURCE mappedResource;
+- HRESULT result = deviceContext->Map(mQuadVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
+- if (FAILED(result))
+- {
+- return EGL_BAD_ACCESS;
+- }
+-
+- d3d11::PositionTexCoordVertex *vertices = static_cast<d3d11::PositionTexCoordVertex*>(mappedResource.pData);
+-
+ // Create a quad in homogeneous coordinates
+ float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
+ float y1 = (y / float(mHeight)) * 2.0f - 1.0f;
+@@ -533,10 +539,23 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
+ float u2 = (x + width) / float(mWidth);
+ float v2 = (y + height) / float(mHeight);
+
+- d3d11::SetPositionTexCoordVertex(&vertices[0], x1, y1, u1, v1);
+- d3d11::SetPositionTexCoordVertex(&vertices[1], x1, y2, u1, v2);
+- d3d11::SetPositionTexCoordVertex(&vertices[2], x2, y1, u2, v1);
+- d3d11::SetPositionTexCoordVertex(&vertices[3], x2, y2, u2, v2);
++ const bool rotateL = mRotateL;
++ const bool rotateR = mRotateR;
++
++ // Set vertices
++ D3D11_MAPPED_SUBRESOURCE mappedResource;
++ HRESULT result = deviceContext->Map(mQuadVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
++ if (FAILED(result))
++ {
++ return EGL_BAD_ACCESS;
++ }
++
++ d3d11::PositionTexCoordVertex *vertices = static_cast<d3d11::PositionTexCoordVertex*>(mappedResource.pData);
++
++ d3d11::SetPositionTexCoordVertex(&vertices[0], x1, y1, rotateL ? u2 : u1, rotateR ? v2 : v1);
++ d3d11::SetPositionTexCoordVertex(&vertices[1], x1, y2, rotateR ? u2 : u1, rotateL ? v1 : v2);
++ d3d11::SetPositionTexCoordVertex(&vertices[2], x2, y1, rotateR ? u1 : u2, rotateL ? v2 : v1);
++ d3d11::SetPositionTexCoordVertex(&vertices[3], x2, y2, rotateL ? u1 : u2, rotateR ? v1 : v2);
+
+ deviceContext->Unmap(mQuadVB, 0);
+
+@@ -564,10 +583,11 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
+
+ // Set the viewport
+ D3D11_VIEWPORT viewport;
+- viewport.TopLeftX = 0;
+- viewport.TopLeftY = 0;
+- viewport.Width = mWidth;
+- viewport.Height = mHeight;
++ viewport.TopLeftX = 0.0f;
++ viewport.TopLeftY = 0.0f;
++ const bool invertViewport = (mRotateL || mRotateR) && !(mRotateL && mRotateR);
++ viewport.Width = FLOAT(invertViewport ? mHeight : mWidth);
++ viewport.Height = FLOAT(invertViewport ? mWidth : mHeight);
+ viewport.MinDepth = 0.0f;
+ viewport.MaxDepth = 1.0f;
+ deviceContext->RSSetViewports(1, &viewport);
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.h
+index 22401d8..77509ed 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.h
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.h
+@@ -52,6 +52,8 @@ class SwapChain11 : public SwapChain
+ Renderer11 *mRenderer;
+ EGLint mHeight;
+ EGLint mWidth;
++ bool mRotateL;
++ bool mRotateR;
+ bool mAppCreatedShareHandle;
+ unsigned int mSwapInterval;
+ bool mPassThroughResourcesInit;
+--
+1.9.4.msysgit.1
+
diff --git a/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch b/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch
new file mode 100644
index 0000000..dd2768c
--- /dev/null
+++ b/0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch
@@ -0,0 +1,637 @@
+From 829bf86c57357d3c8ec598b92fcfdb1849e84075 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Tue, 11 Nov 2014 17:11:54 +0200
+Subject: [PATCH 10/16] ANGLE: Enable D3D11 for feature level 9 cards
+
+Enable use of ANGLE on lower-end hardware, such as Surface RT and
+Windows Phone 8.
+
+Change-Id: Ice536802e4eedc1d264abd0dd65960638fce59e4
+---
+ src/3rdparty/angle/src/libGLESv2/angletypes.cpp | 6 +-
+ .../src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp | 69 ++++---
+ .../src/libGLESv2/renderer/d3d/d3d11/Buffer11.cpp | 4 +-
+ .../src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp | 7 +-
+ .../renderer/d3d/d3d11/PixelTransfer11.cpp | 9 +-
+ .../libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 226 +++++++++++++--------
+ .../src/libGLESv2/renderer/d3d/d3d11/Renderer11.h | 1 +
+ .../renderer/d3d/d3d11/TextureStorage11.cpp | 4 +-
+ .../libGLESv2/renderer/d3d/d3d11/formatutils11.cpp | 4 +-
+ .../renderer/d3d/d3d11/renderer11_utils.cpp | 2 +-
+ 10 files changed, 208 insertions(+), 124 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/angletypes.cpp b/src/3rdparty/angle/src/libGLESv2/angletypes.cpp
+index 6fd02e0..5a0cfc5 100644
+--- a/src/3rdparty/angle/src/libGLESv2/angletypes.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/angletypes.cpp
+@@ -12,6 +12,8 @@
+ #include "libGLESv2/State.h"
+ #include "libGLESv2/VertexArray.h"
+
++#include <float.h>
++
+ namespace gl
+ {
+
+@@ -24,8 +26,8 @@ SamplerState::SamplerState()
+ maxAnisotropy(1.0f),
+ baseLevel(0),
+ maxLevel(1000),
+- minLod(-1000.0f),
+- maxLod(1000.0f),
++ minLod(-FLT_MAX),
++ maxLod(FLT_MAX),
+ compareMode(GL_NONE),
+ compareFunc(GL_LEQUAL),
+ swizzleRed(GL_RED),
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
+index 91e7552..06aea9b 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp
+@@ -209,7 +209,7 @@ Blit11::Blit11(Renderer11 *renderer)
+ pointSamplerDesc.BorderColor[2] = 0.0f;
+ pointSamplerDesc.BorderColor[3] = 0.0f;
+ pointSamplerDesc.MinLOD = 0.0f;
+- pointSamplerDesc.MaxLOD = 0.0f;
++ pointSamplerDesc.MaxLOD = mRenderer->isLevel9() ? D3D11_FLOAT32_MAX : 0.0f;
+
+ result = device->CreateSamplerState(&pointSamplerDesc, &mPointSampler);
+ ASSERT(SUCCEEDED(result));
+@@ -228,7 +228,7 @@ Blit11::Blit11(Renderer11 *renderer)
+ linearSamplerDesc.BorderColor[2] = 0.0f;
+ linearSamplerDesc.BorderColor[3] = 0.0f;
+ linearSamplerDesc.MinLOD = 0.0f;
+- linearSamplerDesc.MaxLOD = 0.0f;
++ linearSamplerDesc.MaxLOD = mRenderer->isLevel9() ? D3D11_FLOAT32_MAX : 0.0f;
+
+ result = device->CreateSamplerState(&linearSamplerDesc, &mLinearSampler);
+ ASSERT(SUCCEEDED(result));
+@@ -290,28 +290,31 @@ Blit11::Blit11(Renderer11 *renderer)
+ ASSERT(SUCCEEDED(result));
+ d3d11::SetDebugName(mQuad2DVS, "Blit11 2D vertex shader");
+
+- result = device->CreatePixelShader(g_PS_PassthroughDepth2D, ArraySize(g_PS_PassthroughDepth2D), NULL, &mDepthPS);
+- ASSERT(SUCCEEDED(result));
+- d3d11::SetDebugName(mDepthPS, "Blit11 2D depth pixel shader");
+-
+- D3D11_INPUT_ELEMENT_DESC quad3DLayout[] =
++ if (!renderer->isLevel9())
+ {
+- { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+- { "LAYER", 0, DXGI_FORMAT_R32_UINT, 0, 8, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+- { "TEXCOORD", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+- };
+-
+- result = device->CreateInputLayout(quad3DLayout, ArraySize(quad3DLayout), g_VS_Passthrough3D, ArraySize(g_VS_Passthrough3D), &mQuad3DIL);
+- ASSERT(SUCCEEDED(result));
+- d3d11::SetDebugName(mQuad3DIL, "Blit11 3D input layout");
+-
+- result = device->CreateVertexShader(g_VS_Passthrough3D, ArraySize(g_VS_Passthrough3D), NULL, &mQuad3DVS);
+- ASSERT(SUCCEEDED(result));
+- d3d11::SetDebugName(mQuad3DVS, "Blit11 3D vertex shader");
++ result = device->CreatePixelShader(g_PS_PassthroughDepth2D, ArraySize(g_PS_PassthroughDepth2D), NULL, &mDepthPS);
++ ASSERT(SUCCEEDED(result));
++ d3d11::SetDebugName(mDepthPS, "Blit11 2D depth pixel shader");
+
+- result = device->CreateGeometryShader(g_GS_Passthrough3D, ArraySize(g_GS_Passthrough3D), NULL, &mQuad3DGS);
+- ASSERT(SUCCEEDED(result));
+- d3d11::SetDebugName(mQuad3DGS, "Renderer11 copy 3D texture geometry shader");
++ D3D11_INPUT_ELEMENT_DESC quad3DLayout[] =
++ {
++ { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
++ { "LAYER", 0, DXGI_FORMAT_R32_UINT, 0, 8, D3D11_INPUT_PER_VERTEX_DATA, 0 },
++ { "TEXCOORD", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
++ };
++
++ result = device->CreateInputLayout(quad3DLayout, ArraySize(quad3DLayout), g_VS_Passthrough3D, ArraySize(g_VS_Passthrough3D), &mQuad3DIL);
++ ASSERT(SUCCEEDED(result));
++ d3d11::SetDebugName(mQuad3DIL, "Blit11 3D input layout");
++
++ result = device->CreateVertexShader(g_VS_Passthrough3D, ArraySize(g_VS_Passthrough3D), NULL, &mQuad3DVS);
++ ASSERT(SUCCEEDED(result));
++ d3d11::SetDebugName(mQuad3DVS, "Blit11 3D vertex shader");
++
++ result = device->CreateGeometryShader(g_GS_Passthrough3D, ArraySize(g_GS_Passthrough3D), NULL, &mQuad3DGS);
++ ASSERT(SUCCEEDED(result));
++ d3d11::SetDebugName(mQuad3DGS, "Renderer11 copy 3D texture geometry shader");
++ }
+
+ buildShaderMap();
+
+@@ -970,22 +973,27 @@ void Blit11::buildShaderMap()
+ ID3D11Device *device = mRenderer->getDevice();
+
+ add2DBlitShaderToMap(GL_RGBA, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA2D, "Blit11 2D RGBA pixel shader" ));
+- add2DBlitShaderToMap(GL_RGBA_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA2DUI, "Blit11 2D RGBA UI pixel shader" ));
+- add2DBlitShaderToMap(GL_RGBA_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRGBA2DI, "Blit11 2D RGBA I pixel shader" ));
+ add2DBlitShaderToMap(GL_BGRA_EXT, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA2D, "Blit11 2D BGRA pixel shader" ));
+ add2DBlitShaderToMap(GL_RGB, false, d3d11::CompilePS(device, g_PS_PassthroughRGB2D, "Blit11 2D RGB pixel shader" ));
+- add2DBlitShaderToMap(GL_RGB_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRGB2DUI, "Blit11 2D RGB UI pixel shader" ));
+- add2DBlitShaderToMap(GL_RGB_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRGB2DI, "Blit11 2D RGB I pixel shader" ));
+ add2DBlitShaderToMap(GL_RG, false, d3d11::CompilePS(device, g_PS_PassthroughRG2D, "Blit11 2D RG pixel shader" ));
+- add2DBlitShaderToMap(GL_RG_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRG2DUI, "Blit11 2D RG UI pixel shader" ));
+- add2DBlitShaderToMap(GL_RG_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRG2DI, "Blit11 2D RG I pixel shader" ));
+ add2DBlitShaderToMap(GL_RED, false, d3d11::CompilePS(device, g_PS_PassthroughR2D, "Blit11 2D R pixel shader" ));
+- add2DBlitShaderToMap(GL_RED_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughR2DUI, "Blit11 2D R UI pixel shader" ));
+- add2DBlitShaderToMap(GL_RED_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughR2DI, "Blit11 2D R I pixel shader" ));
+ add2DBlitShaderToMap(GL_ALPHA, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA2D, "Blit11 2D alpha pixel shader" ));
+ add2DBlitShaderToMap(GL_LUMINANCE, false, d3d11::CompilePS(device, g_PS_PassthroughLum2D, "Blit11 2D lum pixel shader" ));
+ add2DBlitShaderToMap(GL_LUMINANCE_ALPHA, false, d3d11::CompilePS(device, g_PS_PassthroughLumAlpha2D, "Blit11 2D luminance alpha pixel shader"));
+
++ addSwizzleShaderToMap(GL_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, d3d11::CompilePS(device, g_PS_SwizzleF2D, "Blit11 2D F swizzle pixel shader" ));
++
++ if (mRenderer->isLevel9())
++ return;
++
++ add2DBlitShaderToMap(GL_RGBA_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA2DUI, "Blit11 2D RGBA UI pixel shader" ));
++ add2DBlitShaderToMap(GL_RGBA_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRGBA2DI, "Blit11 2D RGBA I pixel shader" ));
++ add2DBlitShaderToMap(GL_RGB_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRGB2DUI, "Blit11 2D RGB UI pixel shader" ));
++ add2DBlitShaderToMap(GL_RGB_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRGB2DI, "Blit11 2D RGB I pixel shader" ));
++ add2DBlitShaderToMap(GL_RG_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRG2DUI, "Blit11 2D RG UI pixel shader" ));
++ add2DBlitShaderToMap(GL_RG_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRG2DI, "Blit11 2D RG I pixel shader" ));
++ add2DBlitShaderToMap(GL_RED_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughR2DUI, "Blit11 2D R UI pixel shader" ));
++ add2DBlitShaderToMap(GL_RED_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughR2DI, "Blit11 2D R I pixel shader" ));
+ add3DBlitShaderToMap(GL_RGBA, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA3D, "Blit11 3D RGBA pixel shader" ));
+ add3DBlitShaderToMap(GL_RGBA_INTEGER, false, d3d11::CompilePS(device, g_PS_PassthroughRGBA3DUI, "Blit11 3D UI RGBA pixel shader" ));
+ add3DBlitShaderToMap(GL_RGBA_INTEGER, true, d3d11::CompilePS(device, g_PS_PassthroughRGBA3DI, "Blit11 3D I RGBA pixel shader" ));
+@@ -1003,7 +1011,6 @@ void Blit11::buildShaderMap()
+ add3DBlitShaderToMap(GL_LUMINANCE, false, d3d11::CompilePS(device, g_PS_PassthroughLum3D, "Blit11 3D luminance pixel shader" ));
+ add3DBlitShaderToMap(GL_LUMINANCE_ALPHA, false, d3d11::CompilePS(device, g_PS_PassthroughLumAlpha3D, "Blit11 3D luminance alpha pixel shader"));
+
+- addSwizzleShaderToMap(GL_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, d3d11::CompilePS(device, g_PS_SwizzleF2D, "Blit11 2D F swizzle pixel shader" ));
+ addSwizzleShaderToMap(GL_UNSIGNED_INT, D3D_SRV_DIMENSION_TEXTURE2D, d3d11::CompilePS(device, g_PS_SwizzleUI2D, "Blit11 2D UI swizzle pixel shader"));
+ addSwizzleShaderToMap(GL_INT, D3D_SRV_DIMENSION_TEXTURE2D, d3d11::CompilePS(device, g_PS_SwizzleI2D, "Blit11 2D I swizzle pixel shader" ));
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Buffer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Buffer11.cpp
+index 2d5fa3c..5aab379 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Buffer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Buffer11.cpp
+@@ -753,7 +753,9 @@ void Buffer11::NativeBuffer11::fillBufferDesc(D3D11_BUFFER_DESC* bufferDesc, Ren
+
+ case BUFFER_USAGE_VERTEX_OR_TRANSFORM_FEEDBACK:
+ bufferDesc->Usage = D3D11_USAGE_DEFAULT;
+- bufferDesc->BindFlags = D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_STREAM_OUTPUT;
++ bufferDesc->BindFlags = D3D11_BIND_VERTEX_BUFFER;
++ if (!renderer->isLevel9())
++ bufferDesc->BindFlags |= D3D11_BIND_STREAM_OUTPUT;
+ bufferDesc->CPUAccessFlags = 0;
+ break;
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
+index 4630762..7185a05 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp
+@@ -104,7 +104,7 @@ Clear11::Clear11(Renderer11 *renderer)
+ rsDesc.DepthBias = 0;
+ rsDesc.DepthBiasClamp = 0.0f;
+ rsDesc.SlopeScaledDepthBias = 0.0f;
+- rsDesc.DepthClipEnable = FALSE;
++ rsDesc.DepthClipEnable = renderer->isLevel9();
+ rsDesc.ScissorEnable = FALSE;
+ rsDesc.MultisampleEnable = FALSE;
+ rsDesc.AntialiasedLineEnable = FALSE;
+@@ -114,6 +114,11 @@ Clear11::Clear11(Renderer11 *renderer)
+ d3d11::SetDebugName(mRasterizerState, "Clear11 masked clear rasterizer state");
+
+ mFloatClearShader = CreateClearShader(device, DXGI_FORMAT_R32G32B32A32_FLOAT, g_VS_ClearFloat, g_PS_ClearFloat);
++ if (mRenderer->isLevel9()) {
++ memset(&mUintClearShader, 0, sizeof(ClearShader));
++ memset(&mIntClearShader, 0, sizeof(ClearShader));
++ return;
++ }
+ mUintClearShader = CreateClearShader(device, DXGI_FORMAT_R32G32B32A32_UINT, g_VS_ClearUint, g_PS_ClearUint );
+ mIntClearShader = CreateClearShader(device, DXGI_FORMAT_R32G32B32A32_SINT, g_VS_ClearSint, g_PS_ClearSint );
+ }
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
+index a4072d8..6a3d347 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp
+@@ -133,10 +133,13 @@ gl::Error PixelTransfer11::loadResources()
+ return gl::Error(GL_OUT_OF_MEMORY, "Failed to create internal buffer to texture vertex shader.");
+ }
+
+- mBufferToTextureGS = d3d11::CompileGS(device, g_GS_BufferToTexture, "BufferToTexture GS");
+- if (!mBufferToTextureGS)
++ if (!mRenderer->isLevel9())
+ {
+- return gl::Error(GL_OUT_OF_MEMORY, "Failed to create internal buffer to texture geometry shader.");
++ mBufferToTextureGS = d3d11::CompileGS(device, g_GS_BufferToTexture, "BufferToTexture GS");
++ if (!mBufferToTextureGS)
++ {
++ return gl::Error(GL_OUT_OF_MEMORY, "Failed to create internal buffer to texture geometry shader.");
++ }
+ }
+
+ gl::Error error = buildShaderMap();
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+index ffc6cc9..f6ba930 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+@@ -153,6 +153,24 @@ Renderer11::Renderer11(egl::Display *display, EGLNativeDisplayType hDc, const eg
+ }
+ }
+
++#if !defined(ANGLE_ENABLE_D3D9)
++ if (requestedMajorVersion == EGL_DONT_CARE || requestedMajorVersion >= 9)
++ {
++ if (requestedMinorVersion == EGL_DONT_CARE || requestedMinorVersion >= 3)
++ {
++ mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_3);
++ }
++ if (requestedMinorVersion == EGL_DONT_CARE || requestedMinorVersion >= 2)
++ {
++ mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_2);
++ }
++ if (requestedMinorVersion == EGL_DONT_CARE || requestedMinorVersion >= 1)
++ {
++ mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_1);
++ }
++ }
++#endif
++
+ mDriverType = (attributes.get(EGL_PLATFORM_ANGLE_USE_WARP_ANGLE, EGL_FALSE) == EGL_TRUE) ? D3D_DRIVER_TYPE_WARP
+ : D3D_DRIVER_TYPE_HARDWARE;
+ }
+@@ -1170,6 +1188,83 @@ gl::Error Renderer11::drawElements(GLenum mode, GLsizei count, GLenum type, cons
+ return gl::Error(GL_NO_ERROR);
+ }
+ }
++template<typename T>
++static void fillLineLoopIndices(GLenum type, GLsizei count, const GLvoid *indices, T *data)
++{
++ switch (type)
++ {
++ case GL_NONE: // Non-indexed draw
++ for (int i = 0; i < count; i++)
++ {
++ data[i] = i;
++ }
++ data[count] = 0;
++ break;
++ case GL_UNSIGNED_BYTE:
++ for (int i = 0; i < count; i++)
++ {
++ data[i] = static_cast<const GLubyte*>(indices)[i];
++ }
++ data[count] = static_cast<const GLubyte*>(indices)[0];
++ break;
++ case GL_UNSIGNED_SHORT:
++ for (int i = 0; i < count; i++)
++ {
++ data[i] = static_cast<const GLushort*>(indices)[i];
++ }
++ data[count] = static_cast<const GLushort*>(indices)[0];
++ break;
++ case GL_UNSIGNED_INT:
++ for (int i = 0; i < count; i++)
++ {
++ data[i] = static_cast<const GLuint*>(indices)[i];
++ }
++ data[count] = static_cast<const GLuint*>(indices)[0];
++ break;
++ default: UNREACHABLE();
++ }
++}
++
++template<typename T>
++static void fillTriangleFanIndices(GLenum type, unsigned int numTris, const GLvoid *indices, T *data)
++{
++ switch (type)
++ {
++ case GL_NONE: // Non-indexed draw
++ for (unsigned int i = 0; i < numTris; i++)
++ {
++ data[i*3 + 0] = 0;
++ data[i*3 + 1] = i + 1;
++ data[i*3 + 2] = i + 2;
++ }
++ break;
++ case GL_UNSIGNED_BYTE:
++ for (unsigned int i = 0; i < numTris; i++)
++ {
++ data[i*3 + 0] = static_cast<const GLubyte*>(indices)[0];
++ data[i*3 + 1] = static_cast<const GLubyte*>(indices)[i + 1];
++ data[i*3 + 2] = static_cast<const GLubyte*>(indices)[i + 2];
++ }
++ break;
++ case GL_UNSIGNED_SHORT:
++ for (unsigned int i = 0; i < numTris; i++)
++ {
++ data[i*3 + 0] = static_cast<const GLushort*>(indices)[0];
++ data[i*3 + 1] = static_cast<const GLushort*>(indices)[i + 1];
++ data[i*3 + 2] = static_cast<const GLushort*>(indices)[i + 2];
++ }
++ break;
++ case GL_UNSIGNED_INT:
++ for (unsigned int i = 0; i < numTris; i++)
++ {
++ data[i*3 + 0] = static_cast<const GLuint*>(indices)[0];
++ data[i*3 + 1] = static_cast<const GLuint*>(indices)[i + 1];
++ data[i*3 + 2] = static_cast<const GLuint*>(indices)[i + 2];
++ }
++ break;
++ default: UNREACHABLE();
++ }
++}
+
+ gl::Error Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, int minIndex, gl::Buffer *elementArrayBuffer)
+ {
+@@ -1189,10 +1284,13 @@ gl::Error Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *ind
+ indices = bufferData + offset;
+ }
+
++ // TODO: some level 9 hardware supports 32-bit indices; test and store support instead
++ const int indexType = isLevel9() ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT;
++
+ if (!mLineLoopIB)
+ {
+ mLineLoopIB = new StreamingIndexBufferInterface(this);
+- gl::Error error = mLineLoopIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT);
++ gl::Error error = mLineLoopIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, indexType);
+ if (error.isError())
+ {
+ SafeDelete(mLineLoopIB);
+@@ -1203,7 +1301,8 @@ gl::Error Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *ind
+ // Checked by Renderer11::applyPrimitiveType
+ ASSERT(count >= 0);
+
+- if (static_cast<unsigned int>(count) + 1 > (std::numeric_limits<unsigned int>::max() / sizeof(unsigned int)))
++ int indexTypeSize = indexType == GL_UNSIGNED_SHORT ? sizeof(unsigned short) : sizeof(unsigned int);
++ if (static_cast<unsigned int>(count) + 1 > (std::numeric_limits<unsigned int>::max() / indexTypeSize))
+ {
+ return gl::Error(GL_OUT_OF_MEMORY, "Failed to create a 32-bit looping index buffer for GL_LINE_LOOP, too many indices required.");
+ }
+@@ -1223,42 +1322,12 @@ gl::Error Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *ind
+ return error;
+ }
+
+- unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory);
++ if (indexType == GL_UNSIGNED_SHORT)
++ fillLineLoopIndices(type, count, indices, reinterpret_cast<unsigned short*>(mappedMemory));
++ else
++ fillLineLoopIndices(type, count, indices, reinterpret_cast<unsigned int*>(mappedMemory));
+ unsigned int indexBufferOffset = offset;
+
+- switch (type)
+- {
+- case GL_NONE: // Non-indexed draw
+- for (int i = 0; i < count; i++)
+- {
+- data[i] = i;
+- }
+- data[count] = 0;
+- break;
+- case GL_UNSIGNED_BYTE:
+- for (int i = 0; i < count; i++)
+- {
+- data[i] = static_cast<const GLubyte*>(indices)[i];
+- }
+- data[count] = static_cast<const GLubyte*>(indices)[0];
+- break;
+- case GL_UNSIGNED_SHORT:
+- for (int i = 0; i < count; i++)
+- {
+- data[i] = static_cast<const GLushort*>(indices)[i];
+- }
+- data[count] = static_cast<const GLushort*>(indices)[0];
+- break;
+- case GL_UNSIGNED_INT:
+- for (int i = 0; i < count; i++)
+- {
+- data[i] = static_cast<const GLuint*>(indices)[i];
+- }
+- data[count] = static_cast<const GLuint*>(indices)[0];
+- break;
+- default: UNREACHABLE();
+- }
+-
+ error = mLineLoopIB->unmapBuffer();
+ if (error.isError())
+ {
+@@ -1300,10 +1369,12 @@ gl::Error Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *
+ indices = bufferData + offset;
+ }
+
++ const int indexType = isLevel9() ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT;
++
+ if (!mTriangleFanIB)
+ {
+ mTriangleFanIB = new StreamingIndexBufferInterface(this);
+- gl::Error error = mTriangleFanIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, GL_UNSIGNED_INT);
++ gl::Error error = mTriangleFanIB->reserveBufferSpace(INITIAL_INDEX_BUFFER_SIZE, indexType);
+ if (error.isError())
+ {
+ SafeDelete(mTriangleFanIB);
+@@ -1316,13 +1387,14 @@ gl::Error Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *
+
+ const unsigned int numTris = count - 2;
+
+- if (numTris > (std::numeric_limits<unsigned int>::max() / (sizeof(unsigned int) * 3)))
++ int indexTypeSize = indexType == GL_UNSIGNED_SHORT ? sizeof(unsigned short) : sizeof(unsigned int);
++ if (numTris > (std::numeric_limits<unsigned int>::max() / (indexTypeSize * 3)))
+ {
+ return gl::Error(GL_OUT_OF_MEMORY, "Failed to create a scratch index buffer for GL_TRIANGLE_FAN, too many indices required.");
+ }
+
+- const unsigned int spaceNeeded = (numTris * 3) * sizeof(unsigned int);
+- gl::Error error = mTriangleFanIB->reserveBufferSpace(spaceNeeded, GL_UNSIGNED_INT);
++ const unsigned int spaceNeeded = (numTris * 3) * indexTypeSize;
++ gl::Error error = mTriangleFanIB->reserveBufferSpace(spaceNeeded, indexType);
+ if (error.isError())
+ {
+ return error;
+@@ -1336,45 +1408,12 @@ gl::Error Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *
+ return error;
+ }
+
+- unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory);
+- unsigned int indexBufferOffset = offset;
++ if (indexType == GL_UNSIGNED_SHORT)
++ fillTriangleFanIndices(type, numTris, indices, reinterpret_cast<unsigned short*>(mappedMemory));
++ else
++ fillTriangleFanIndices(type, numTris, indices, reinterpret_cast<unsigned int*>(mappedMemory));
+
+- switch (type)
+- {
+- case GL_NONE: // Non-indexed draw
+- for (unsigned int i = 0; i < numTris; i++)
+- {
+- data[i*3 + 0] = 0;
+- data[i*3 + 1] = i + 1;
+- data[i*3 + 2] = i + 2;
+- }
+- break;
+- case GL_UNSIGNED_BYTE:
+- for (unsigned int i = 0; i < numTris; i++)
+- {
+- data[i*3 + 0] = static_cast<const GLubyte*>(indices)[0];
+- data[i*3 + 1] = static_cast<const GLubyte*>(indices)[i + 1];
+- data[i*3 + 2] = static_cast<const GLubyte*>(indices)[i + 2];
+- }
+- break;
+- case GL_UNSIGNED_SHORT:
+- for (unsigned int i = 0; i < numTris; i++)
+- {
+- data[i*3 + 0] = static_cast<const GLushort*>(indices)[0];
+- data[i*3 + 1] = static_cast<const GLushort*>(indices)[i + 1];
+- data[i*3 + 2] = static_cast<const GLushort*>(indices)[i + 2];
+- }
+- break;
+- case GL_UNSIGNED_INT:
+- for (unsigned int i = 0; i < numTris; i++)
+- {
+- data[i*3 + 0] = static_cast<const GLuint*>(indices)[0];
+- data[i*3 + 1] = static_cast<const GLuint*>(indices)[i + 1];
+- data[i*3 + 2] = static_cast<const GLuint*>(indices)[i + 2];
+- }
+- break;
+- default: UNREACHABLE();
+- }
++ unsigned int indexBufferOffset = offset;
+
+ error = mTriangleFanIB->unmapBuffer();
+ if (error.isError())
+@@ -1634,7 +1673,7 @@ gl::Error Renderer11::applyUniforms(const ProgramImpl &program, const std::vecto
+ }
+
+ // needed for the point sprite geometry shader
+- if (mCurrentGeometryConstantBuffer != mDriverConstantBufferPS)
++ if (mFeatureLevel >= D3D_FEATURE_LEVEL_10_0 && mCurrentGeometryConstantBuffer != mDriverConstantBufferPS)
+ {
+ mDeviceContext->GSSetConstantBuffers(0, 1, &mDriverConstantBufferPS);
+ mCurrentGeometryConstantBuffer = mDriverConstantBufferPS;
+@@ -1938,7 +1977,10 @@ int Renderer11::getMajorShaderModel() const
+ {
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MAJOR_VERSION; // 5
+ case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MAJOR_VERSION; // 4
+- case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MAJOR_VERSION; // 4
++ case D3D_FEATURE_LEVEL_10_0:
++ case D3D_FEATURE_LEVEL_9_3:
++ case D3D_FEATURE_LEVEL_9_2:
++ case D3D_FEATURE_LEVEL_9_1: return D3D10_SHADER_MAJOR_VERSION; // 4
+ default: UNREACHABLE(); return 0;
+ }
+ }
+@@ -1949,7 +1991,10 @@ int Renderer11::getMinorShaderModel() const
+ {
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MINOR_VERSION; // 0
+ case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MINOR_VERSION; // 1
+- case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MINOR_VERSION; // 0
++ case D3D_FEATURE_LEVEL_10_0:
++ case D3D_FEATURE_LEVEL_9_3:
++ case D3D_FEATURE_LEVEL_9_2:
++ case D3D_FEATURE_LEVEL_9_1: return D3D10_SHADER_MINOR_VERSION; // 0
+ default: UNREACHABLE(); return 0;
+ }
+ }
+@@ -2455,6 +2500,7 @@ gl::Error Renderer11::compileToExecutable(gl::InfoLog &infoLog, const std::strin
+
+ unsigned int profileMajorVersion = 0;
+ unsigned int profileMinorVersion = 0;
++ const char *profileSuffix = NULL;
+ switch (mFeatureLevel)
+ {
+ case D3D_FEATURE_LEVEL_11_0:
+@@ -2469,12 +2515,30 @@ gl::Error Renderer11::compileToExecutable(gl::InfoLog &infoLog, const std::strin
+ profileMajorVersion = 4;
+ profileMinorVersion = 0;
+ break;
++ case D3D_FEATURE_LEVEL_9_3:
++ profileMajorVersion = 4;
++ profileMinorVersion = 0;
++ profileSuffix = "_level_9_3";
++ break;
++ case D3D_FEATURE_LEVEL_9_2:
++ profileMajorVersion = 4;
++ profileMinorVersion = 0;
++ profileSuffix = "_level_9_2";
++ break;
++ case D3D_FEATURE_LEVEL_9_1:
++ profileMajorVersion = 4;
++ profileMinorVersion = 0;
++ profileSuffix = "_level_9_1";
++ break;
++ break;
+ default:
+ UNREACHABLE();
+ return gl::Error(GL_INVALID_OPERATION);
+ }
+
+ std::string profile = FormatString("%s_%u_%u", profileType, profileMajorVersion, profileMinorVersion);
++ if (profileSuffix)
++ profile += profileSuffix;
+
+ UINT flags = D3DCOMPILE_OPTIMIZATION_LEVEL2;
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h
+index c789cae..d44bd2f 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.h
+@@ -188,6 +188,7 @@ class Renderer11 : public RendererD3D
+ ID3D11Device *getDevice() { return mDevice; }
+ ID3D11DeviceContext *getDeviceContext() { return mDeviceContext; };
+ DXGIFactory *getDxgiFactory() { return mDxgiFactory; };
++ bool isLevel9() { return mFeatureLevel <= D3D_FEATURE_LEVEL_9_3; }
+
+ Blit11 *getBlitter() { return mBlit; }
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp
+index 4287918..74af27e 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/TextureStorage11.cpp
+@@ -744,7 +744,7 @@ gl::Error TextureStorage11_2D::getResource(ID3D11Resource **outResource)
+ D3D11_TEXTURE2D_DESC desc;
+ desc.Width = mTextureWidth; // Compressed texture size constraints?
+ desc.Height = mTextureHeight;
+- desc.MipLevels = mMipLevels;
++ desc.MipLevels = mRenderer->isLevel9() ? 1 : mMipLevels;
+ desc.ArraySize = 1;
+ desc.Format = mTextureFormat;
+ desc.SampleDesc.Count = 1;
+@@ -863,7 +863,7 @@ gl::Error TextureStorage11_2D::createSRV(int baseLevel, int mipLevels, DXGI_FORM
+ srvDesc.Format = format;
+ srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
+ srvDesc.Texture2D.MostDetailedMip = mTopLevel + baseLevel;
+- srvDesc.Texture2D.MipLevels = mipLevels;
++ srvDesc.Texture2D.MipLevels = mRenderer->isLevel9() ? -1 : mipLevels;
+
+ ID3D11Device *device = mRenderer->getDevice();
+ HRESULT result = device->CreateShaderResourceView(texture, &srvDesc, outSRV);
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp
+index 1ea916d..90a879e 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/formatutils11.cpp
+@@ -557,7 +557,7 @@ D3D11LoadFunctionMap BuildD3D11LoadFunctionMap()
+ InsertLoadFunction(&map, GL_ALPHA, GL_HALF_FLOAT_OES, LoadA16FToRGBA16F );
+
+ // From GL_EXT_texture_storage
+- InsertLoadFunction(&map, GL_ALPHA8_EXT, GL_UNSIGNED_BYTE, LoadToNative<GLubyte, 1> );
++ InsertLoadFunction(&map, GL_ALPHA8_EXT, GL_UNSIGNED_BYTE, LoadA8ToRGBA8 );
+ InsertLoadFunction(&map, GL_LUMINANCE8_EXT, GL_UNSIGNED_BYTE, LoadL8ToRGBA8 );
+ InsertLoadFunction(&map, GL_LUMINANCE8_ALPHA8_EXT, GL_UNSIGNED_BYTE, LoadLA8ToRGBA8 );
+ InsertLoadFunction(&map, GL_ALPHA32F_EXT, GL_FLOAT, LoadA32FToRGBA32F );
+@@ -795,7 +795,7 @@ static D3D11ES3FormatMap BuildD3D11FormatMap()
+
+ // From GL_EXT_texture_storage
+ // | GL internal format | D3D11 texture format | D3D11 SRV format | D3D11 RTV format | D3D11 DSV format |
+- InsertD3D11FormatInfo(&map, GL_ALPHA8_EXT, DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_UNKNOWN );
++ InsertD3D11FormatInfo(&map, GL_ALPHA8_EXT, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN );
+ InsertD3D11FormatInfo(&map, GL_LUMINANCE8_EXT, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN );
+ InsertD3D11FormatInfo(&map, GL_ALPHA32F_EXT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN );
+ InsertD3D11FormatInfo(&map, GL_LUMINANCE32F_EXT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, DXGI_FORMAT_UNKNOWN );
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+index 9ffc32e..cbfe557 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+@@ -284,7 +284,7 @@ static bool GetNPOTTextureSupport(D3D_FEATURE_LEVEL featureLevel)
+ // From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876.aspx
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+- case D3D_FEATURE_LEVEL_9_1: return false;
++ case D3D_FEATURE_LEVEL_9_1: return true; // Provided that mipmaps & wrap modes are not used
+
+ default: UNREACHABLE(); return false;
+ }
+--
+1.9.4.msysgit.1
+
diff --git a/0012-ANGLE-fix-semantic-index-lookup.patch b/0012-ANGLE-fix-semantic-index-lookup.patch
new file mode 100644
index 0000000..afc9f25
--- /dev/null
+++ b/0012-ANGLE-fix-semantic-index-lookup.patch
@@ -0,0 +1,48 @@
+From bbfd3cfcf6e1195d86368b61ce39504ce6acda50 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Wed, 12 Nov 2014 17:09:23 +0200
+Subject: [PATCH 12/16] ANGLE: fix semantic index lookup
+
+The sorted semantic index table was returning a direct mapping to the
+new indices, instead of the old indices. This caused a mismatch in the
+GL type lookup for the translated attribute.
+
+Change-Id: I75d05ed707f56c45210e3dcbc277f894e3dc5a48
+---
+ src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp | 2 +-
+ .../angle/src/libGLESv2/renderer/d3d/d3d11/InputLayoutCache.cpp | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp b/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp
+index 0619023..6d64b38 100644
+--- a/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/ProgramBinary.cpp
+@@ -1216,7 +1216,7 @@ void ProgramBinary::sortAttributesByLayout(rx::TranslatedAttribute attributes[MA
+ for (int i = 0; i < MAX_VERTEX_ATTRIBS; i++)
+ {
+ int oldIndex = mAttributesByLayout[i];
+- sortedSemanticIndices[i] = mSemanticIndex[oldIndex];
++ sortedSemanticIndices[i] = oldIndex;
+ attributes[i] = oldTranslatedAttributes[oldIndex];
+ }
+ }
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/InputLayoutCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/InputLayoutCache.cpp
+index e41f238..ff90a6a 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/InputLayoutCache.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/InputLayoutCache.cpp
+@@ -113,10 +113,10 @@ gl::Error InputLayoutCache::applyVertexBuffers(TranslatedAttribute attributes[gl
+ // Record the type of the associated vertex shader vector in our key
+ // This will prevent mismatched vertex shaders from using the same input layout
+ GLint attributeSize;
+- programBinary->getActiveAttribute(ilKey.elementCount, 0, NULL, &attributeSize, &ilKey.elements[ilKey.elementCount].glslElementType, NULL);
++ programBinary->getActiveAttribute(sortedSemanticIndices[i], 0, NULL, &attributeSize, &ilKey.elements[ilKey.elementCount].glslElementType, NULL);
+
+ ilKey.elements[ilKey.elementCount].desc.SemanticName = semanticName;
+- ilKey.elements[ilKey.elementCount].desc.SemanticIndex = sortedSemanticIndices[i];
++ ilKey.elements[ilKey.elementCount].desc.SemanticIndex = i;
+ ilKey.elements[ilKey.elementCount].desc.Format = vertexFormatInfo.nativeFormat;
+ ilKey.elements[ilKey.elementCount].desc.InputSlot = i;
+ ilKey.elements[ilKey.elementCount].desc.AlignedByteOffset = 0;
+--
+1.9.4.msysgit.1
+
diff --git a/0013-ANGLE-Add-support-for-querying-platform-device.patch b/0013-ANGLE-Add-support-for-querying-platform-device.patch
new file mode 100644
index 0000000..b43dcc3
--- /dev/null
+++ b/0013-ANGLE-Add-support-for-querying-platform-device.patch
@@ -0,0 +1,100 @@
+From 5ef9348de2624c21be1c9fddd265fec5a0851d25 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Thu, 13 Nov 2014 15:34:26 +0200
+Subject: [PATCH 13/16] ANGLE: Add support for querying platform device
+
+The EGL_EXT_device_base extension allows for querying the platform
+device of the graphics hardware via eglQueryDisplayAttribEXT().
+As that extension is not supported by ANGLE, this patch adds similar
+functionality to the existing eglQuerySurfacePointerANGLE API. When
+EGL_DEVICE_EXT is passed as the queried attribute, the underlying
+D3D/DXGI device pointer is passed back to the caller via the value
+argument.
+
+The D3D device is needed for video support in QtMultimedia as well as
+the IDXGIDevice3::Trim() calls required by the Windows Store.
+
+Change-Id: Ibdf228d81d6604e56db9dd8597d7cd2983ebc428
+---
+ src/3rdparty/angle/src/libEGL/libEGL.cpp | 50 +++++++++++++++++++++++++-------
+ 1 file changed, 39 insertions(+), 11 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libEGL/libEGL.cpp b/src/3rdparty/angle/src/libEGL/libEGL.cpp
+index dc20d85..68399d6 100644
+--- a/src/3rdparty/angle/src/libEGL/libEGL.cpp
++++ b/src/3rdparty/angle/src/libEGL/libEGL.cpp
+@@ -17,6 +17,9 @@
+ #include "libGLESv2/Texture.h"
+ #include "libGLESv2/main.h"
+ #include "libGLESv2/renderer/SwapChain.h"
++#if defined(ANGLE_ENABLE_D3D11)
++# include "libGLESv2/renderer/d3d/d3d11/Renderer11.h"
++#endif
+
+ #include "libEGL/main.h"
+ #include "libEGL/Display.h"
+@@ -582,25 +585,50 @@ EGLBoolean __stdcall eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surf
+ egl::Display *display = static_cast<egl::Display*>(dpy);
+ egl::Surface *eglSurface = (egl::Surface*)surface;
+
+- if (!validateSurface(display, eglSurface))
+- {
+- return EGL_FALSE;
+- }
+-
+- if (surface == EGL_NO_SURFACE)
+- {
+- recordError(egl::Error(EGL_BAD_SURFACE));
+- return EGL_FALSE;
+- }
+-
+ switch (attribute)
+ {
+ case EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE:
+ {
++ if (!validateSurface(display, eglSurface))
++ {
++ return EGL_FALSE;
++ }
++
++ if (surface == EGL_NO_SURFACE)
++ {
++ recordError(egl::Error(EGL_BAD_SURFACE));
++ return EGL_FALSE;
++ }
++
+ rx::SwapChain *swapchain = eglSurface->getSwapChain();
+ *value = (void*) (swapchain ? swapchain->getShareHandle() : NULL);
+ }
+ break;
++#if defined(ANGLE_ENABLE_D3D11)
++ case EGL_DEVICE_EXT:
++ {
++ if (!validateDisplay(display))
++ {
++ return EGL_FALSE;
++ }
++
++ rx::Renderer *renderer = display->getRenderer();
++ if (!renderer)
++ {
++ *value = NULL;
++ break;
++ }
++
++ if (renderer->getMajorShaderModel() < 4)
++ {
++ recordError(egl::Error(EGL_BAD_CONTEXT));
++ return EGL_FALSE;
++ }
++
++ *value = static_cast<rx::Renderer11*>(renderer)->getDevice();
++ }
++ break;
++#endif
+ default:
+ recordError(egl::Error(EGL_BAD_ATTRIBUTE));
+ return EGL_FALSE;
+--
+1.9.4.msysgit.1
+
diff --git a/0014-Let-ANGLE-use-multithreaded-devices-if-necessary.patch b/0014-Let-ANGLE-use-multithreaded-devices-if-necessary.patch
new file mode 100644
index 0000000..9ceb34d
--- /dev/null
+++ b/0014-Let-ANGLE-use-multithreaded-devices-if-necessary.patch
@@ -0,0 +1,69 @@
+From 5b3bc73210ed1847d9bd7a94f06cc0d5de8e0b89 Mon Sep 17 00:00:00 2001
+From: Michael Bruning <michael.bruning at digia.com>
+Date: Thu, 13 Nov 2014 15:40:10 +0200
+Subject: [PATCH 14/16] Let ANGLE use multithreaded devices if necessary.
+
+This is needed to prevent lock-ups in application that use ANGLE from
+multiple threads, as e.g. QtWebEngine based applications do.
+
+The environment variable QT_D3DCREATE_MULTITHREADED is used to
+communicate this from the QtWebEngine module.
+
+Change-Id: Ibd5a5c75eb68af567d420d9a35efb3490c93b27c
+---
+ src/3rdparty/angle/src/common/platform.h | 1 +
+ .../angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 10 ++++++++++
+ .../angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp | 4 ++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/src/3rdparty/angle/src/common/platform.h b/src/3rdparty/angle/src/common/platform.h
+index 0065ec7..8b2190d 100644
+--- a/src/3rdparty/angle/src/common/platform.h
++++ b/src/3rdparty/angle/src/common/platform.h
+@@ -57,6 +57,7 @@
+
+ # if defined(ANGLE_ENABLE_D3D11)
+ # include <d3d10_1.h>
++# include <d3d10.h>
+ # include <d3d11.h>
+ # include <d3d11_1.h>
+ # include <dxgi.h>
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+index f6ba930..46b9984 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+@@ -258,6 +258,16 @@ EGLint Renderer11::initialize()
+ }
+
+ #if !defined(ANGLE_ENABLE_WINDOWS_STORE)
++ static wchar_t *qt_d3dcreate_multihreaded_var = _wgetenv(L"QT_D3DCREATE_MULTITHREADED");
++ if (qt_d3dcreate_multihreaded_var && wcsstr(qt_d3dcreate_multihreaded_var, L"1"))
++ {
++ ID3D10Multithread *multithread;
++ result = mDevice->QueryInterface(IID_PPV_ARGS(&multithread));
++ ASSERT(SUCCEEDED(result));
++ result = multithread->SetMultithreadProtected(true);
++ ASSERT(SUCCEEDED(result));
++ multithread->Release();
++ }
+ #if !ANGLE_SKIP_DXGI_1_2_CHECK
+ // In order to create a swap chain for an HWND owned by another process, DXGI 1.2 is required.
+ // The easiest way to check is to query for a IDXGIDevice2.
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+index 82963ec..4c552b2 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+@@ -299,6 +299,10 @@ EGLint Renderer9::initialize()
+ D3DPRESENT_PARAMETERS presentParameters = getDefaultPresentParameters();
+ DWORD behaviorFlags = D3DCREATE_FPU_PRESERVE | D3DCREATE_NOWINDOWCHANGES;
+
++ static wchar_t *qt_d3dcreate_multihreaded_var = _wgetenv(L"QT_D3DCREATE_MULTITHREADED");
++ if (qt_d3dcreate_multihreaded_var && wcsstr(qt_d3dcreate_multihreaded_var, L"1"))
++ behaviorFlags |= D3DCREATE_MULTITHREADED;
++
+ {
+ result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &presentParameters, &mDevice);
+ }
+--
+1.9.4.msysgit.1
+
diff --git a/0015-ANGLE-Fix-angle-d3d11-on-MSVC2010.patch b/0015-ANGLE-Fix-angle-d3d11-on-MSVC2010.patch
new file mode 100644
index 0000000..f78474f
--- /dev/null
+++ b/0015-ANGLE-Fix-angle-d3d11-on-MSVC2010.patch
@@ -0,0 +1,536 @@
+From d9a9219ea2181dd4c1939d05747a21b67f16a906 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Thu, 13 Nov 2014 16:33:53 +0200
+Subject: [PATCH 15/16] ANGLE: Fix -angle-d3d11 on MSVC2010
+
+Allow the D3D11 renderer to build with the June 2010 DirectX SDK.
+
+Change-Id: I2343acedab16845d6a0d4a53cf3145f583efc4a7
+---
+ src/3rdparty/angle/src/common/platform.h | 8 +-
+ src/3rdparty/angle/src/libGLESv2/Context.cpp | 8 +-
+ src/3rdparty/angle/src/libGLESv2/Data.h | 2 +-
+ src/3rdparty/angle/src/libGLESv2/State.cpp | 6 +-
+ .../src/libGLESv2/renderer/d3d/RendererD3D.cpp | 4 +-
+ .../libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 4 +-
+ .../renderer/d3d/d3d11/renderer11_utils.cpp | 137 +++++++++++++++++++++
+ 7 files changed, 156 insertions(+), 13 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/common/platform.h b/src/3rdparty/angle/src/common/platform.h
+index 8b2190d..972eee2 100644
+--- a/src/3rdparty/angle/src/common/platform.h
++++ b/src/3rdparty/angle/src/common/platform.h
+@@ -52,17 +52,23 @@
+
+ # if defined(ANGLE_ENABLE_D3D9)
+ # include <d3d9.h>
++# if !defined(COMPILER_IMPLEMENTATION)
+ # include <d3dcompiler.h>
++# endif
+ # endif
+
+ # if defined(ANGLE_ENABLE_D3D11)
+ # include <d3d10_1.h>
+ # include <d3d10.h>
+ # include <d3d11.h>
+-# include <d3d11_1.h>
+ # include <dxgi.h>
++# if defined(_MSC_VER) && (_MSC_VER >= 1700)
++# include <d3d11_1.h>
+ # include <dxgi1_2.h>
++# endif
++# if !defined(COMPILER_IMPLEMENTATION)
+ # include <d3dcompiler.h>
++# endif
+ # endif
+
+ # if defined(ANGLE_ENABLE_WINDOWS_STORE)
+diff --git a/src/3rdparty/angle/src/libGLESv2/Context.cpp b/src/3rdparty/angle/src/libGLESv2/Context.cpp
+index fe9b1a2..b87689c 100644
+--- a/src/3rdparty/angle/src/libGLESv2/Context.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/Context.cpp
+@@ -168,9 +168,9 @@ Context::~Context()
+ }
+ mIncompleteTextures.clear();
+
+- for (auto &zeroTexture : mZeroTextures)
++ for (TextureMap::iterator i = mZeroTextures.begin(); i != mZeroTextures.end(); i++)
+ {
+- zeroTexture.second.set(NULL);
++ i->second.set(NULL);
+ }
+ mZeroTextures.clear();
+
+@@ -354,7 +354,7 @@ void Context::deleteFenceSync(GLsync fenceSync)
+
+ void Context::deleteVertexArray(GLuint vertexArray)
+ {
+- auto vertexArrayObject = mVertexArrayMap.find(vertexArray);
++ VertexArrayMap::iterator vertexArrayObject = mVertexArrayMap.find(vertexArray);
+
+ if (vertexArrayObject != mVertexArrayMap.end())
+ {
+@@ -460,7 +460,7 @@ FenceSync *Context::getFenceSync(GLsync handle) const
+
+ VertexArray *Context::getVertexArray(GLuint handle) const
+ {
+- auto vertexArray = mVertexArrayMap.find(handle);
++ VertexArrayMap::const_iterator vertexArray = mVertexArrayMap.find(handle);
+
+ if (vertexArray == mVertexArrayMap.end())
+ {
+diff --git a/src/3rdparty/angle/src/libGLESv2/Data.h b/src/3rdparty/angle/src/libGLESv2/Data.h
+index cff872a..9234403 100644
+--- a/src/3rdparty/angle/src/libGLESv2/Data.h
++++ b/src/3rdparty/angle/src/libGLESv2/Data.h
+@@ -14,7 +14,7 @@
+ namespace gl
+ {
+
+-struct Data final
++struct Data
+ {
+ public:
+ Data(GLint clientVersion, const State &state, const Caps &caps,
+diff --git a/src/3rdparty/angle/src/libGLESv2/State.cpp b/src/3rdparty/angle/src/libGLESv2/State.cpp
+index e7acda2..b5b62f5 100644
+--- a/src/3rdparty/angle/src/libGLESv2/State.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/State.cpp
+@@ -665,13 +665,13 @@ void State::detachTexture(const TextureMap &zeroTextures, GLuint texture)
+
+ void State::initializeZeroTextures(const TextureMap &zeroTextures)
+ {
+- for (const auto &zeroTexture : zeroTextures)
++ for (TextureMap::const_iterator i = zeroTextures.begin(); i != zeroTextures.end(); i++)
+ {
+- auto &samplerTextureArray = mSamplerTextures[zeroTexture.first];
++ TextureBindingVector &samplerTextureArray = mSamplerTextures[i->first];
+
+ for (size_t textureUnit = 0; textureUnit < samplerTextureArray.size(); ++textureUnit)
+ {
+- samplerTextureArray[textureUnit].set(zeroTexture.second.get());
++ samplerTextureArray[textureUnit].set(i->second.get());
+ }
+ }
+ }
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp
+index 6f58243..97da6da 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp
+@@ -27,9 +27,9 @@ RendererD3D::RendererD3D(egl::Display *display)
+
+ RendererD3D::~RendererD3D()
+ {
+- for (auto &incompleteTexture : mIncompleteTextures)
++ for (gl::TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); ++i)
+ {
+- incompleteTexture.second.set(NULL);
++ i->second.set(NULL);
+ }
+ mIncompleteTextures.clear();
+ }
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+index 46b9984..a28fd78 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+@@ -873,7 +873,7 @@ bool Renderer11::applyPrimitiveType(GLenum mode, GLsizei count)
+
+ void Renderer11::unsetSRVsWithResource(gl::SamplerType samplerType, const ID3D11Resource *resource)
+ {
+- auto ¤tSRVs = (samplerType == gl::SAMPLER_VERTEX ? mCurVertexSRVs : mCurPixelSRVs);
++ std::vector<ID3D11ShaderResourceView *> ¤tSRVs = (samplerType == gl::SAMPLER_VERTEX ? mCurVertexSRVs : mCurPixelSRVs);
+
+ for (size_t resourceIndex = 0; resourceIndex < currentSRVs.size(); ++resourceIndex)
+ {
+@@ -3398,7 +3398,7 @@ Workarounds Renderer11::generateWorkarounds() const
+
+ void Renderer11::setShaderResource(gl::SamplerType shaderType, UINT resourceSlot, ID3D11ShaderResourceView *srv)
+ {
+- auto ¤tSRVs = (shaderType == gl::SAMPLER_VERTEX ? mCurVertexSRVs : mCurPixelSRVs);
++ std::vector<ID3D11ShaderResourceView *> ¤tSRVs = (shaderType == gl::SAMPLER_VERTEX ? mCurVertexSRVs : mCurPixelSRVs);
+
+ ASSERT(static_cast<size_t>(resourceSlot) < currentSRVs.size());
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+index cbfe557..5831c57 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+@@ -18,6 +18,85 @@
+
+ #include <algorithm>
+
++#ifndef D3D_FL9_1_DEFAULT_MAX_ANISOTROPY
++# define D3D_FL9_1_DEFAULT_MAX_ANISOTROPY 2
++#endif
++#ifndef D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT
++# define D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT 1
++#endif
++#ifndef D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT
++# define D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT 4
++#endif
++#ifndef D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT
++# define D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT 65535
++#endif
++#ifndef D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT
++# define D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT 1048575
++#endif
++#ifndef D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION
++# define D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION 512
++#endif
++#ifndef D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION
++# define D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION 4096
++#endif
++#ifndef D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION
++# define D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION 2048
++#endif
++#ifndef D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION
++# define D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION 256
++#endif
++#ifndef D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION
++# define D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION 4096
++#endif
++#ifndef D3D11_REQ_TEXTURECUBE_DIMENSION
++# define D3D11_REQ_TEXTURECUBE_DIMENSION 16384
++#endif
++#ifndef D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION
++# define D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION 2048
++#endif
++#ifndef D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION
++# define D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION 2048
++#endif
++#ifndef D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP
++# define D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP 32
++#endif
++#ifndef D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP
++# define D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP 32
++#endif
++#ifndef D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT
++# define D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT 32
++#endif
++#ifndef D3D11_STANDARD_VERTEX_ELEMENT_COUNT
++# define D3D11_STANDARD_VERTEX_ELEMENT_COUNT 32
++#endif
++#ifndef D3D10_1_SO_BUFFER_SLOT_COUNT
++# define D3D10_1_SO_BUFFER_SLOT_COUNT 4
++#endif
++#ifndef D3D11_SO_BUFFER_SLOT_COUNT
++# define D3D11_SO_BUFFER_SLOT_COUNT 4
++#endif
++#ifndef D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
++# define D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT 14
++#endif
++#ifndef D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT
++# define D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT 16
++#endif
++#ifndef D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE
++# define D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE -8
++#endif
++#ifndef D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE
++# define D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE 7
++#endif
++#ifndef D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT
++# define D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT 4096
++#endif
++#ifndef D3D11_PS_INPUT_REGISTER_COUNT
++# define D3D11_PS_INPUT_REGISTER_COUNT 32
++#endif
++#ifndef D3D10_1_VS_OUTPUT_REGISTER_COUNT
++# define D3D10_1_VS_OUTPUT_REGISTER_COUNT 32
++#endif
++
+ namespace rx
+ {
+
+@@ -276,7 +355,9 @@ static bool GetNPOTTextureSupport(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0: return true;
+@@ -294,7 +375,9 @@ static float GetMaximumAnisotropy(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_MAX_MAXANISOTROPY;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -314,7 +397,9 @@ static bool GetOcclusionQuerySupport(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0: return true;
+@@ -334,7 +419,9 @@ static bool GetEventQuerySupport(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0:
+@@ -352,7 +439,9 @@ static bool GetInstancingSupport(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0:
+@@ -375,7 +464,9 @@ static bool GetDerivativeInstructionSupport(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0:
+@@ -393,7 +484,9 @@ static size_t GetMaximumSimultaneousRenderTargets(D3D_FEATURE_LEVEL featureLevel
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -411,7 +504,9 @@ static size_t GetMaximum2DTextureSize(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -429,7 +524,9 @@ static size_t GetMaximumCubeMapTextureSize(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURECUBE_DIMENSION;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -447,7 +544,9 @@ static size_t GetMaximum2DTextureArraySize(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -465,7 +564,9 @@ static size_t GetMaximum3DTextureSize(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -483,7 +584,9 @@ static size_t GetMaximumViewportSize(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_VIEWPORT_BOUNDS_MAX;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -507,7 +610,9 @@ static size_t GetMaximumDrawIndexedIndexCount(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0: return std::numeric_limits<GLint>::max();
+@@ -529,7 +634,9 @@ static size_t GetMaximumDrawVertexCount(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0: return std::numeric_limits<GLint>::max();
+@@ -546,7 +653,9 @@ static size_t GetMaximumVertexInputSlots(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_STANDARD_VERTEX_ELEMENT_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1: return D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT;
+@@ -566,7 +675,9 @@ static size_t GetMaximumVertexUniformVectors(D3D_FEATURE_LEVEL featureLevel)
+ // TODO(geofflang): Remove hard-coded limit once the gl-uniform-arrays test can pass
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return 1024; // D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -591,7 +702,9 @@ static size_t GetMaximumVertexUniformBlocks(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - GetReservedVertexUniformBuffers();
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -618,7 +731,9 @@ static size_t GetMaximumVertexOutputVectors(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors();
+
+ case D3D_FEATURE_LEVEL_10_1: return D3D10_1_VS_OUTPUT_REGISTER_COUNT - GetReservedVertexOutputVectors();
+@@ -637,7 +752,9 @@ static size_t GetMaximumVertexTextureUnits(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -659,7 +776,9 @@ static size_t GetMaximumPixelUniformVectors(D3D_FEATURE_LEVEL featureLevel)
+ // TODO(geofflang): Remove hard-coded limit once the gl-uniform-arrays test can pass
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return 1024; // D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -684,7 +803,9 @@ static size_t GetMaximumPixelUniformBlocks(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - GetReservedPixelUniformBuffers();
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -703,7 +824,9 @@ static size_t GetMaximumPixelInputVectors(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_PS_INPUT_REGISTER_COUNT - GetReservedVertexOutputVectors();
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -722,7 +845,9 @@ static size_t GetMaximumPixelTextureUnits(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -741,7 +866,9 @@ static int GetMinimumTexelOffset(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -760,7 +887,9 @@ static int GetMaximumTexelOffset(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE;
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0: return D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE;
+@@ -783,7 +912,9 @@ static size_t GetMaximumConstantBufferSize(D3D_FEATURE_LEVEL featureLevel)
+
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * bytesPerComponent;
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -802,7 +933,9 @@ static size_t GetMaximumStreamOutputBuffers(D3D_FEATURE_LEVEL featureLevel)
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return D3D11_SO_BUFFER_SLOT_COUNT;
+
+ case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SO_BUFFER_SLOT_COUNT;
+@@ -820,7 +953,9 @@ static size_t GetMaximumStreamOutputInterleavedComponents(D3D_FEATURE_LEVEL feat
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0:
+
+ case D3D_FEATURE_LEVEL_10_1:
+@@ -838,7 +973,9 @@ static size_t GetMaximumStreamOutputSeparateComponents(D3D_FEATURE_LEVEL feature
+ {
+ switch (featureLevel)
+ {
++#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
+ case D3D_FEATURE_LEVEL_11_1:
++#endif
+ case D3D_FEATURE_LEVEL_11_0: return GetMaximumStreamOutputInterleavedComponents(featureLevel) /
+ GetMaximumStreamOutputBuffers(featureLevel);
+
+--
+1.9.4.msysgit.1
+
diff --git a/0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch b/0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch
new file mode 100644
index 0000000..e3df95d
--- /dev/null
+++ b/0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch
@@ -0,0 +1,169 @@
+From 43c8ceb17ccd6d5ae13a07c6d01b45eb40983917 Mon Sep 17 00:00:00 2001
+From: Andrew Knight <andrew.knight at theqtcompany.com>
+Date: Tue, 11 Nov 2014 14:36:43 +0200
+Subject: [PATCH 16/16] ANGLE: Fix compilation with MinGW + D3D11
+
+Provide workarounds for things GCC doesn't like, and define a few
+missing definitions not found in the MinGW headers.
+
+Change-Id: I254c208209c0071fae5efb6727f2b3cfd5542da6
+---
+ src/3rdparty/angle/src/common/platform.h | 73 ++++++++++++++++++++++
+ .../src/libGLESv2/renderer/d3d/HLSLCompiler.cpp | 6 ++
+ .../libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 2 +-
+ .../renderer/d3d/d3d11/renderer11_utils.cpp | 2 +-
+ .../src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp | 4 +-
+ 5 files changed, 83 insertions(+), 4 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/common/platform.h b/src/3rdparty/angle/src/common/platform.h
+index 972eee2..0001e71 100644
+--- a/src/3rdparty/angle/src/common/platform.h
++++ b/src/3rdparty/angle/src/common/platform.h
+@@ -81,6 +81,79 @@
+ # endif
+ # endif
+
++# if defined(__MINGW32__) // Missing defines on MinGW
++typedef enum D3D11_MAP_FLAG
++{
++ D3D11_MAP_FLAG_DO_NOT_WAIT = 0x100000L
++} D3D11_MAP_FLAG;
++typedef struct D3D11_QUERY_DATA_SO_STATISTICS
++{
++ UINT64 NumPrimitivesWritten;
++ UINT64 PrimitivesStorageNeeded;
++} D3D11_QUERY_DATA_SO_STATISTICS;
++typedef HRESULT (WINAPI *PFN_D3D11_CREATE_DEVICE)(
++ IDXGIAdapter *, D3D_DRIVER_TYPE, HMODULE, UINT, CONST D3D_FEATURE_LEVEL *,
++ UINT FeatureLevels, UINT, ID3D11Device **, D3D_FEATURE_LEVEL *, ID3D11DeviceContext **);
++#define D3D11_MESSAGE_CATEGORY UINT
++#define D3D11_MESSAGE_SEVERITY UINT
++#define D3D11_MESSAGE_ID UINT
++struct D3D11_MESSAGE;
++typedef struct D3D11_INFO_QUEUE_FILTER_DESC
++{
++ UINT NumCategories;
++ D3D11_MESSAGE_CATEGORY *pCategoryList;
++ UINT NumSeverities;
++ D3D11_MESSAGE_SEVERITY *pSeverityList;
++ UINT NumIDs;
++ D3D11_MESSAGE_ID *pIDList;
++} D3D11_INFO_QUEUE_FILTER_DESC;
++typedef struct D3D11_INFO_QUEUE_FILTER
++{
++ D3D11_INFO_QUEUE_FILTER_DESC AllowList;
++ D3D11_INFO_QUEUE_FILTER_DESC DenyList;
++} D3D11_INFO_QUEUE_FILTER;
++static const IID IID_ID3D11InfoQueue = { 0x6543dbb6, 0x1b48, 0x42f5, 0xab, 0x82, 0xe9, 0x7e, 0xc7, 0x43, 0x26, 0xf6 };
++MIDL_INTERFACE("6543dbb6-1b48-42f5-ab82-e97ec74326f6") ID3D11InfoQueue : public IUnknown
++{
++public:
++ virtual HRESULT __stdcall SetMessageCountLimit(UINT64) = 0;
++ virtual void __stdcall ClearStoredMessages() = 0;
++ virtual HRESULT __stdcall GetMessage(UINT64, D3D11_MESSAGE *, SIZE_T *) = 0;
++ virtual UINT64 __stdcall GetNumMessagesAllowedByStorageFilter() = 0;
++ virtual UINT64 __stdcall GetNumMessagesDeniedByStorageFilter() = 0;
++ virtual UINT64 __stdcall GetNumStoredMessages() = 0;
++ virtual UINT64 __stdcall GetNumStoredMessagesAllowedByRetrievalFilter() = 0;
++ virtual UINT64 __stdcall GetNumMessagesDiscardedByMessageCountLimit() = 0;
++ virtual UINT64 __stdcall GetMessageCountLimit() = 0;
++ virtual HRESULT __stdcall AddStorageFilterEntries(D3D11_INFO_QUEUE_FILTER *) = 0;
++ virtual HRESULT __stdcall GetStorageFilter(D3D11_INFO_QUEUE_FILTER *, SIZE_T *) = 0;
++ virtual void __stdcall ClearStorageFilter() = 0;
++ virtual HRESULT __stdcall PushEmptyStorageFilter() = 0;
++ virtual HRESULT __stdcall PushCopyOfStorageFilter() = 0;
++ virtual HRESULT __stdcall PushStorageFilter(D3D11_INFO_QUEUE_FILTER *) = 0;
++ virtual void __stdcall PopStorageFilter() = 0;
++ virtual UINT __stdcall GetStorageFilterStackSize() = 0;
++ virtual HRESULT __stdcall AddRetrievalFilterEntries(D3D11_INFO_QUEUE_FILTER *) = 0;
++ virtual HRESULT __stdcall GetRetrievalFilter(D3D11_INFO_QUEUE_FILTER *, SIZE_T *) = 0;
++ virtual void __stdcall ClearRetrievalFilter() = 0;
++ virtual HRESULT __stdcall PushEmptyRetrievalFilter() = 0;
++ virtual HRESULT __stdcall PushCopyOfRetrievalFilter() = 0;
++ virtual HRESULT __stdcall PushRetrievalFilter(D3D11_INFO_QUEUE_FILTER *) = 0;
++ virtual void __stdcall PopRetrievalFilter() = 0;
++ virtual UINT __stdcall GetRetrievalFilterStackSize() = 0;
++ virtual HRESULT __stdcall AddMessage(D3D11_MESSAGE_CATEGORY, D3D11_MESSAGE_SEVERITY, D3D11_MESSAGE_ID, LPCSTR) = 0;
++ virtual HRESULT __stdcall AddApplicationMessage(D3D11_MESSAGE_SEVERITY, LPCSTR) = 0;
++ virtual HRESULT __stdcall SetBreakOnCategory(D3D11_MESSAGE_CATEGORY, BOOL) = 0;
++ virtual HRESULT __stdcall SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY, BOOL) = 0;
++ virtual HRESULT __stdcall SetBreakOnID(D3D11_MESSAGE_ID, BOOL) = 0;
++ virtual BOOL __stdcall GetBreakOnCategory(D3D11_MESSAGE_CATEGORY) = 0;
++ virtual BOOL __stdcall GetBreakOnSeverity(D3D11_MESSAGE_SEVERITY) = 0;
++ virtual BOOL __stdcall GetBreakOnID(D3D11_MESSAGE_ID) = 0;
++ virtual void __stdcall SetMuteDebugOutput(BOOL) = 0;
++ virtual BOOL __stdcall GetMuteDebugOutput() = 0;
++};
++#endif // __MINGW32__
++
+ # undef near
+ # undef far
+ #endif
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
+index 9d003b4..776d92b 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/HLSLCompiler.cpp
+@@ -14,6 +14,12 @@
+ #ifndef QT_D3DCOMPILER_DLL
+ #define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL
+ #endif
++#ifndef D3DCOMPILE_RESERVED16
++#define D3DCOMPILE_RESERVED16 (1 << 16)
++#endif
++#ifndef D3DCOMPILE_RESERVED17
++#define D3DCOMPILE_RESERVED17 (1 << 17)
++#endif
+
+ // Definitions local to the translation unit
+ namespace
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+index a28fd78..e6d7f30 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+@@ -333,7 +333,7 @@ EGLint Renderer11::initialize()
+ // Disable some spurious D3D11 debug warnings to prevent them from flooding the output log
+ #if defined(ANGLE_SUPPRESS_D3D11_HAZARD_WARNINGS) && defined(_DEBUG)
+ ID3D11InfoQueue *infoQueue;
+- result = mDevice->QueryInterface(__uuidof(ID3D11InfoQueue), (void **)&infoQueue);
++ result = mDevice->QueryInterface(IID_ID3D11InfoQueue, (void **)&infoQueue);
+
+ if (SUCCEEDED(result))
+ {
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+index 5831c57..121aa3b 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/renderer11_utils.cpp
+@@ -1196,7 +1196,7 @@ void SetPositionLayerTexCoord3DVertex(PositionLayerTexCoord3DVertex* vertex, flo
+
+ HRESULT SetDebugName(ID3D11DeviceChild *resource, const char *name)
+ {
+-#if defined(_DEBUG)
++#if defined(_DEBUG) && !defined(__MINGW32__)
+ return resource->SetPrivateData(WKPDID_D3DDebugObjectName, strlen(name), name);
+ #else
+ return S_OK;
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+index 4c552b2..601cd24 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+@@ -200,7 +200,7 @@ EGLint Renderer9::initialize()
+ if (ANGLE_D3D9EX == ANGLE_ENABLED && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex)))
+ {
+ ASSERT(mD3d9Ex);
+- mD3d9Ex->QueryInterface(__uuidof(IDirect3D9), reinterpret_cast<void**>(&mD3d9));
++ mD3d9Ex->QueryInterface(IID_IDirect3D9, reinterpret_cast<void**>(&mD3d9));
+ ASSERT(mD3d9);
+ }
+ else
+@@ -324,7 +324,7 @@ EGLint Renderer9::initialize()
+
+ if (mD3d9Ex)
+ {
+- result = mDevice->QueryInterface(__uuidof(IDirect3DDevice9Ex), (void**)&mDeviceEx);
++ result = mDevice->QueryInterface(IID_IDirect3DDevice9Ex, (void**)&mDeviceEx);
+ ASSERT(SUCCEEDED(result));
+ }
+
+--
+1.9.4.msysgit.1
+
diff --git a/0017-ANGLE-Fix-compilation-with-D3D9.patch b/0017-ANGLE-Fix-compilation-with-D3D9.patch
new file mode 100644
index 0000000..4ada6d4
--- /dev/null
+++ b/0017-ANGLE-Fix-compilation-with-D3D9.patch
@@ -0,0 +1,62 @@
+From d7839cc052de126cc3b457fe41963fd9c7e91846 Mon Sep 17 00:00:00 2001
+From: Kai Koehne <kai.koehne at theqtcompany.com>
+Date: Mon, 17 Nov 2014 15:10:10 +0100
+Subject: [PATCH] ANGLE: Fix compilation with D3D9
+
+Fixes a regression introduced in c6df5fe3ed0f2a722 that
+broke compilation with d3d9 (namely, -target xp).
+
+Task-number: QTBUG-42714
+Change-Id: I1a5e9682d5463bfa082a5d0c062399a131a7cf52
+---
+ src/3rdparty/angle/src/common/NativeWindow.h | 7 ++++++-
+ src/3rdparty/angle/src/common/platform.h | 1 +
+ src/3rdparty/angle/src/common/win32/NativeWindow.cpp | 2 +-
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/common/NativeWindow.h b/src/3rdparty/angle/src/common/NativeWindow.h
+index 9e93aea..c4a0e42 100644
+--- a/src/3rdparty/angle/src/common/NativeWindow.h
++++ b/src/3rdparty/angle/src/common/NativeWindow.h
+@@ -54,7 +54,12 @@ public:
+ bool getClientRect(LPRECT rect);
+ bool isIconic();
+
+- HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
++# if defined(ANGLE_ENABLE_D3D11)
++ typedef ID3D11Device Device;
++#else
++ typedef IDirect3DDevice9 Device;
++#endif
++ HRESULT createSwapChain(Device* device, DXGIFactory* factory,
+ DXGI_FORMAT format, UINT width, UINT height,
+ DXGISwapChain** swapChain);
+
+diff --git a/src/3rdparty/angle/src/common/platform.h b/src/3rdparty/angle/src/common/platform.h
+index 0001e71..5bf97f9 100644
+--- a/src/3rdparty/angle/src/common/platform.h
++++ b/src/3rdparty/angle/src/common/platform.h
+@@ -52,6 +52,7 @@
+
+ # if defined(ANGLE_ENABLE_D3D9)
+ # include <d3d9.h>
++# include <dxgi.h>
+ # if !defined(COMPILER_IMPLEMENTATION)
+ # include <d3dcompiler.h>
+ # endif
+diff --git a/src/3rdparty/angle/src/common/win32/NativeWindow.cpp b/src/3rdparty/angle/src/common/win32/NativeWindow.cpp
+index 2440747..46082a2 100644
+--- a/src/3rdparty/angle/src/common/win32/NativeWindow.cpp
++++ b/src/3rdparty/angle/src/common/win32/NativeWindow.cpp
+@@ -35,7 +35,7 @@ bool NativeWindow::isIconic()
+ return IsIconic(mWindow) == TRUE;
+ }
+
+-HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
++HRESULT NativeWindow::createSwapChain(NativeWindow::Device* device, DXGIFactory* factory,
+ DXGI_FORMAT format, unsigned int width, unsigned int height,
+ DXGISwapChain** swapChain)
+ {
+--
+1.9.4.msysgit.0
+
diff --git a/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch b/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch
new file mode 100644
index 0000000..97847ad
--- /dev/null
+++ b/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch
@@ -0,0 +1,106 @@
+From 014d3fcf6011109491b0489da9c1abb1fdc6dbdc Mon Sep 17 00:00:00 2001
+From: Kai Koehne <kai.koehne at theqtcompany.com>
+Date: Mon, 24 Nov 2014 10:52:03 +0100
+Subject: [PATCH] ANGLE: Fix releasing textures after we kill D3D11
+
+Cherry-pick upstream commit cc4cd2925b9a4f1142a86df131345a861c9d7cd9
+to fix crashes on exit.
+
+Task-number: QTBUG-42772
+Change-Id: Ib74be17f2b5fdd58f9e0568e1da74ba19e943019
+---
+ src/3rdparty/angle/src/libGLESv2/Context.cpp | 6 ------
+ src/3rdparty/angle/src/libGLESv2/Context.h | 1 -
+ src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp | 5 +++++
+ src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h | 2 ++
+ src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 2 ++
+ src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp | 2 ++
+ 6 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/Context.cpp b/src/3rdparty/angle/src/libGLESv2/Context.cpp
+index b87689c..3772da6 100644
+--- a/src/3rdparty/angle/src/libGLESv2/Context.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/Context.cpp
+@@ -162,12 +162,6 @@ Context::~Context()
+ deleteTransformFeedback(mTransformFeedbackMap.begin()->first);
+ }
+
+- for (TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); i++)
+- {
+- i->second.set(NULL);
+- }
+- mIncompleteTextures.clear();
+-
+ for (TextureMap::iterator i = mZeroTextures.begin(); i != mZeroTextures.end(); i++)
+ {
+ i->second.set(NULL);
+diff --git a/src/3rdparty/angle/src/libGLESv2/Context.h b/src/3rdparty/angle/src/libGLESv2/Context.h
+index 1e890de..0699592 100644
+--- a/src/3rdparty/angle/src/libGLESv2/Context.h
++++ b/src/3rdparty/angle/src/libGLESv2/Context.h
+@@ -247,7 +247,6 @@ class Context
+ int mClientVersion;
+
+ TextureMap mZeroTextures;
+- TextureMap mIncompleteTextures;
+
+ typedef std::unordered_map<GLuint, Framebuffer*> FramebufferMap;
+ FramebufferMap mFramebufferMap;
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp
+index 97da6da..5cddd8a 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp
+@@ -27,6 +27,11 @@ RendererD3D::RendererD3D(egl::Display *display)
+
+ RendererD3D::~RendererD3D()
+ {
++ cleanup();
++}
++
++void RendererD3D::cleanup()
++{
+ for (gl::TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); ++i)
+ {
+ i->second.set(NULL);
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h
+index 9919207..a2f7787 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h
+@@ -160,6 +160,8 @@ class RendererD3D : public Renderer
+ const gl::Rectangle *scissor, bool blitRenderTarget,
+ bool blitDepth, bool blitStencil, GLenum filter) = 0;
+
++ void cleanup();
++
+ egl::Display *mDisplay;
+
+ private:
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+index e6d7f30..777308e 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp
+@@ -1870,6 +1870,8 @@ bool Renderer11::testDeviceResettable()
+
+ void Renderer11::release()
+ {
++ RendererD3D::cleanup();
++
+ releaseShaderCompiler();
+ releaseDeviceResources();
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+index 601cd24..18e6e2d 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp
+@@ -151,6 +151,8 @@ Renderer9::~Renderer9()
+
+ void Renderer9::release()
+ {
++ RendererD3D::cleanup();
++
+ releaseShaderCompiler();
+ releaseDeviceResources();
+
+--
+1.9.4.msysgit.0
+
diff --git a/angleproject-disable-debug-annotations.patch b/angleproject-disable-debug-annotations.patch
new file mode 100644
index 0000000..1df4e5c
--- /dev/null
+++ b/angleproject-disable-debug-annotations.patch
@@ -0,0 +1,33 @@
+--- angle/src/libGLESv2.gypi.orig 2014-12-29 14:50:37.625335694 +0100
++++ angle/src/libGLESv2.gypi 2014-12-29 14:51:18.659761527 +0100
+@@ -483,11 +483,6 @@
+ {
+ 'Debug_Base':
+ {
+- 'defines':
+- [
+- 'ANGLE_ENABLE_DEBUG_ANNOTATIONS',
+- 'ANGLE_GENERATE_SHADER_DEBUG_INFO'
+- ],
+ 'msvs_settings':
+ {
+ 'VCLinkerTool':
+--- angle/src/libEGL.gypi.orig 2014-12-29 16:05:56.119799976 +0100
++++ angle/src/libEGL.gypi 2014-12-29 16:06:17.452019110 +0100
+@@ -171,16 +171,6 @@
+ ],
+ },
+ },
+- 'configurations':
+- {
+- 'Debug_Base':
+- {
+- 'defines':
+- [
+- 'ANGLE_ENABLE_DEBUG_ANNOTATIONS',
+- ],
+- },
+- },
+ },
+ ],
+ },
diff --git a/angleproject-export-shader-symbols.patch b/angleproject-export-shader-symbols.patch
index da8099a..91bc337 100644
--- a/angleproject-export-shader-symbols.patch
+++ b/angleproject-export-shader-symbols.patch
@@ -1,38 +1,36 @@
---- src/libGLESv2/libGLESv2.def.orig 2013-05-18 01:58:46.861793130 +0200
-+++ src/libGLESv2/libGLESv2.def 2013-05-18 02:02:52.124966085 +0200
-@@ -180,3 +180,16 @@
- glGetCurrentContext @147 NONAME
- glGetProcAddress @148 NONAME
+--- angle/src/libGLESv2/libGLESv2.def.orig 2014-12-30 12:59:07.560620988 +0100
++++ angle/src/libGLESv2/libGLESv2.def 2014-12-30 13:00:22.381399755 +0100
+@@ -294,3 +294,15 @@
glBindTexImage @158 NONAME
+ glCreateRenderer @177 NONAME
+ glDestroyRenderer @178 NONAME
+
+ ; WebKit dependencies
-+ ShInitBuiltInResources @200 NONAME
-+ ShInitialize @201 NONAME
-+ ShDestruct @202 NONAME
-+ ShGetInfo @203 NONAME
-+ ShGetInfoLog @204 NONAME
-+ ShGetActiveAttrib @205 NONAME
-+ ShGetActiveUniform @206 NONAME
-+ ShGetObjectCode @207 NONAME
-+ ShCompile @208 NONAME
-+ ShConstructCompiler @209 NONAME
++ ShInitBuiltInResources @300 NONAME
++ ShInitialize @301 NONAME
++ ShDestruct @302 NONAME
++ ShGetInfo @303 NONAME
++ ShGetInfoLog @304 NONAME
++ ShGetVariableInfo @305 NONAME
++ ShGetObjectCode @306 NONAME
++ ShCompile @307 NONAME
++ ShConstructCompiler @308 NONAME
+
---- src/libGLESv2/libGLESv2_mingw32.def.orig 2013-05-18 02:03:03.822165103 +0200
-+++ src/libGLESv2/libGLESv2_mingw32.def 2013-05-18 02:05:11.743341697 +0200
-@@ -180,3 +180,16 @@
- glGetCurrentContext @147 NONAME
- glGetProcAddress at 4 @148 NONAME
- glBindTexImage at 4 @158 NONAME
+--- angle/src/libGLESv2/libGLESv2_mingw32.def.orig 2014-12-30 12:59:07.561620998 +0100
++++ angle/src/libGLESv2/libGLESv2_mingw32.def 2014-12-30 13:01:37.782182097 +0100
+@@ -294,3 +294,15 @@
+ glBindTexImage at 4 @158 NONAME
+ glCreateRenderer @177 NONAME
+ glDestroyRenderer @178 NONAME
+
-+ ; WebKit dependencies
-+ ShInitBuiltInResources @200 NONAME
-+ ShInitialize @201 NONAME
-+ ShDestruct @202 NONAME
-+ ShGetInfo @203 NONAME
-+ ShGetInfoLog @204 NONAME
-+ ShGetActiveAttrib @205 NONAME
-+ ShGetActiveUniform @206 NONAME
-+ ShGetObjectCode @207 NONAME
-+ ShCompile @208 NONAME
-+ ShConstructCompiler @209 NONAME
++ ; WebKit dependencies
++ ShInitBuiltInResources @300 NONAME
++ ShInitialize @301 NONAME
++ ShDestruct @302 NONAME
++ ShGetInfo @303 NONAME
++ ShGetInfoLog @304 NONAME
++ ShGetVariableInfo @305 NONAME
++ ShGetObjectCode @306 NONAME
++ ShCompile @307 NONAME
++ ShConstructCompiler @308 NONAME
+
diff --git a/angleproject-include-import-library-and-use-def-file.patch b/angleproject-include-import-library-and-use-def-file.patch
index d83feff..034a2e0 100644
--- a/angleproject-include-import-library-and-use-def-file.patch
+++ b/angleproject-include-import-library-and-use-def-file.patch
@@ -1,32 +1,30 @@
---- src/build_angle.gypi.orig 2012-12-15 00:59:30.603075035 +0100
-+++ src/build_angle.gypi 2012-12-15 01:02:09.464724684 +0100
-@@ -205,6 +205,14 @@
- 'target_name': 'libGLESv2',
- 'type': 'shared_library',
- 'dependencies': ['translator_hlsl'],
-+ 'conditions': [
-+ ['TARGET=="win32"', {
-+ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a ../src/libGLESv2/libGLESv2_mingw32.def' ],
-+ }],
-+ ['TARGET=="win64"', {
-+ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a ../src/libGLESv2/libGLESv2.def' ],
-+ }],
-+ ],
- 'include_dirs': [
- '.',
- '../include',
-@@ -275,6 +283,14 @@
- 'target_name': 'libEGL',
- 'type': 'shared_library',
- 'dependencies': ['libGLESv2'],
-+ 'conditions': [
-+ ['TARGET=="win32"', {
-+ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a ../src/libEGL/libEGL_mingw32.def' ],
-+ }],
-+ ['TARGET=="win64"', {
-+ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a ../src/libEGL/libEGL.def' ],
-+ }],
-+ ],
- 'include_dirs': [
- '.',
- '../include',
+--- angle/src/libGLESv2.gypi.orig 2014-12-29 16:26:05.272220904 +0100
++++ angle/src/libGLESv2.gypi 2014-12-29 16:27:33.694129236 +0100
+@@ -531,6 +531,12 @@
+ {
+ 'msvs_enable_winphone' : '1',
+ }],
++ ['TARGET=="win32"', {
++ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a ../src/libGLESv2/libGLESv2_mingw32.def' ],
++ }],
++ ['TARGET=="win64"', {
++ 'ldflags': [ '-Wl,--out-implib,libGLESv2.dll.a ../src/libGLESv2/libGLESv2.def' ],
++ }],
+ ],
+ 'configurations':
+ {
+--- angle/src/libEGL.gypi.orig 2014-12-29 16:27:51.546312626 +0100
++++ angle/src/libEGL.gypi 2014-12-29 16:28:53.332947338 +0100
+@@ -146,6 +146,12 @@
+ {
+ 'msvs_enable_winphone' : '1',
+ }],
++ ['TARGET=="win32"', {
++ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a ../src/libEGL/libEGL_mingw32.def' ],
++ }],
++ ['TARGET=="win64"', {
++ 'ldflags': [ '-Wl,--out-implib,libEGL.dll.a ../src/libEGL/libEGL.def' ],
++ }],
+ ],
+ 'includes': [ '../build/common_defines.gypi', ],
+ 'msvs_settings':
diff --git a/angleproject-prevent-multiple-definition-errors.patch b/angleproject-prevent-multiple-definition-errors.patch
new file mode 100644
index 0000000..836fffc
--- /dev/null
+++ b/angleproject-prevent-multiple-definition-errors.patch
@@ -0,0 +1,39 @@
+--- angle/src/libGLESv2.gypi.orig 2014-12-29 15:37:12.356076212 +0100
++++ angle/src/libGLESv2.gypi 2014-12-29 15:37:36.310322769 +0100
+@@ -21,25 +21,11 @@
+ '../include/GLSLANG/ShaderVars.h',
+ '../include/KHR/khrplatform.h',
+ '../include/angle_gl.h',
+- 'common/RefCountObject.cpp',
+- 'common/RefCountObject.h',
+- 'common/angleutils.cpp',
+- 'common/angleutils.h',
+- 'common/blocklayout.cpp',
+- 'common/blocklayout.h',
+ 'common/debug.cpp',
+ 'common/debug.h',
+- 'common/event_tracer.cpp',
+- 'common/event_tracer.h',
+ 'common/features.h',
+- 'common/mathutil.cpp',
+- 'common/mathutil.h',
+ 'common/platform.h',
+ 'common/NativeWindow.h',
+- 'common/tls.cpp',
+- 'common/tls.h',
+- 'common/utilities.cpp',
+- 'common/utilities.h',
+ 'common/version.h',
+ 'libGLESv2/BinaryStream.h',
+ 'libGLESv2/Buffer.cpp',
+--- angle/src/compiler.gypi.orig 2014-12-30 16:14:45.387688544 +0100
++++ angle/src/compiler.gypi 2014-12-30 16:14:52.091758591 +0100
+@@ -27,8 +27,6 @@
+ 'common/angleutils.cpp',
+ 'common/blocklayout.cpp',
+ 'common/blocklayout.h',
+- 'common/debug.cpp',
+- 'common/debug.h',
+ 'common/event_tracer.cpp',
+ 'common/event_tracer.h',
+ 'common/mathutil.cpp',
diff --git a/angleproject-undo-mingw-org-compatibility.patch b/angleproject-undo-mingw-org-compatibility.patch
new file mode 100644
index 0000000..4496d69
--- /dev/null
+++ b/angleproject-undo-mingw-org-compatibility.patch
@@ -0,0 +1,11 @@
+--- angle/src/common/platform.h.orig 2014-12-29 14:28:40.707691427 +0100
++++ angle/src/common/platform.h 2014-12-29 14:28:57.662866462 +0100
+@@ -82,7 +82,7 @@
+ # endif
+ # endif
+
+-# if defined(__MINGW32__) // Missing defines on MinGW
++# if defined(__MINGW32__) && 0 // Missing defines on MinGW
+ typedef enum D3D11_MAP_FLAG
+ {
+ D3D11_MAP_FLAG_DO_NOT_WAIT = 0x100000L
diff --git a/angleproject-undo-mingw-org-compatibility2.patch b/angleproject-undo-mingw-org-compatibility2.patch
new file mode 100644
index 0000000..f4db281
--- /dev/null
+++ b/angleproject-undo-mingw-org-compatibility2.patch
@@ -0,0 +1,13 @@
+--- angle/src/common/platform.h.orig 2014-12-30 22:25:05.452862806 +0100
++++ angle/src/common/platform.h 2014-12-30 22:25:23.828052663 +0100
+@@ -63,9 +63,9 @@
+ # include <d3d10.h>
+ # include <d3d11.h>
+ # include <dxgi.h>
++# include <dxgi1_2.h>
+ # if defined(_MSC_VER) && (_MSC_VER >= 1700)
+ # include <d3d11_1.h>
+-# include <dxgi1_2.h>
+ # endif
+ # if !defined(COMPILER_IMPLEMENTATION)
+ # include <d3dcompiler.h>
diff --git a/angleproject-undo-shader-renames.patch b/angleproject-undo-shader-renames.patch
new file mode 100644
index 0000000..470756a
--- /dev/null
+++ b/angleproject-undo-shader-renames.patch
@@ -0,0 +1,162 @@
+--- angle/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp 2014-12-29 14:58:14.398042285 +0100
++++ angle/src/libGLESv2/renderer/d3d/d3d9/Blit9.cpp.orig 2014-12-29 14:57:55.097843925 +0100
+@@ -27,20 +27,20 @@
+
+ const BYTE* const g_shaderCode[] =
+ {
+- g_vs20_VS_standard,
+- g_vs20_VS_flipy,
+- g_ps20_PS_passthrough,
+- g_ps20_PS_luminance,
+- g_ps20_PS_componentmask
++ g_vs20_standardvs,
++ g_vs20_flipyvs,
++ g_ps20_passthroughps,
++ g_ps20_luminanceps,
++ g_ps20_componentmaskps
+ };
+
+ const size_t g_shaderSize[] =
+ {
+- sizeof(g_vs20_VS_standard),
+- sizeof(g_vs20_VS_flipy),
+- sizeof(g_ps20_PS_passthrough),
+- sizeof(g_ps20_PS_luminance),
+- sizeof(g_ps20_PS_componentmask)
++ sizeof(g_vs20_standardvs),
++ sizeof(g_vs20_flipyvs),
++ sizeof(g_ps20_passthroughps),
++ sizeof(g_ps20_luminanceps),
++ sizeof(g_ps20_componentmaskps)
+ };
+ }
+
+--- angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp.orig 2014-12-29 15:05:57.769805226 +0100
++++ angle/src/libGLESv2/renderer/d3d/d3d11/Blit11.cpp 2014-12-29 15:06:40.179241153 +0100
+@@ -13,39 +13,39 @@
+ #include "libGLESv2/main.h"
+ #include "libGLESv2/formatutils.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2dvs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughdepth2dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum2dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughdepth2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg2di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr2di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum2d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha2d11ps.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3dvs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3dgs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3duips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3dips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum3dps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha3dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3d11vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough3d11gs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrg3di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3dui11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughr3di11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlum3d11ps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughlumalpha3d11ps.h"
+
+ #include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/swizzlef2dps.h"
+ #include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/swizzlei2dps.h"
+--- angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp.orig 2014-12-29 15:07:22.962680910 +0100
++++ angle/src/libGLESv2/renderer/d3d/d3d11/Clear11.cpp 2014-12-29 15:07:33.924793589 +0100
+@@ -15,14 +15,14 @@
+ #include "libGLESv2/FramebufferAttachment.h"
+
+ // Precompiled shaders
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloatvs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloatps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloat11vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearfloat11ps.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuintvs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuintps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuint11vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearuint11ps.h"
+
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsintvs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsintps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsint11vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/clearsint11ps.h"
+
+ namespace rx
+ {
+--- angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp.orig 2014-12-29 15:08:04.781110747 +0100
++++ angle/src/libGLESv2/renderer/d3d/d3d11/PixelTransfer11.cpp 2014-12-29 15:08:16.912235446 +0100
+@@ -22,11 +22,11 @@
+ #include "libGLESv2/Context.h"
+
+ // Precompiled shaders
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexturevs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexturegs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture_4fps.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture_4ips.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture_4uips.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_gs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_ps_4f.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_ps_4i.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/buffertotexture11_ps_4ui.h"
+
+ namespace rx
+ {
+--- angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp.orig 2014-12-29 15:08:54.720624075 +0100
++++ angle/src/libGLESv2/renderer/d3d/d3d11/SwapChain11.cpp 2014-12-29 15:09:04.775727437 +0100
+@@ -12,8 +12,8 @@
+ #include "libGLESv2/renderer/d3d/d3d11/Renderer11.h"
+
+ // Precompiled shaders
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2dvs.h"
+-#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dps.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h"
++#include "libGLESv2/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h"
+
+ #include "common/features.h"
+ #include "common/NativeWindow.h"
diff --git a/commit-409078f b/commit-409078f
new file mode 100644
index 0000000..af016de
--- /dev/null
+++ b/commit-409078f
@@ -0,0 +1,363 @@
+commit 409078f1e7c4ec79a1cbc58e3d0b3c399831ac5b
+Author: Zhenyao Mo <zmo at chromium.org>
+Date: Tue Oct 28 13:23:18 2014 -0700
+
+ Remove ShGetVariableInfo() and related code.
+
+ BUG=angle:775
+ TEST=chromium builds and runs fine
+
+ Change-Id: Ic62d3a3c9a8f034880b77a96f7f1c6be2691985e
+ Reviewed-on: https://chromium-review.googlesource.com/226004
+ Tested-by: Zhenyao Mo <zmo at chromium.org>
+ Reviewed-by: Jamie Madill <jmadill at chromium.org>
+ Reviewed-by: Shannon Woods <shannonwoods at chromium.org>
+
+diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h
+index 76012cf..def4946 100644
+--- a/include/GLSLANG/ShaderLang.h
++++ b/include/GLSLANG/ShaderLang.h
+@@ -48,7 +48,7 @@ extern "C" {
+
+ // Version number for shader translation API.
+ // It is incremented every time the API changes.
+-#define ANGLE_SH_VERSION 130
++#define ANGLE_SH_VERSION 131
+
+ typedef enum {
+ SH_GLES2_SPEC = 0x8B40,
+@@ -86,21 +86,8 @@ typedef enum {
+ } ShShaderOutput;
+
+ typedef enum {
+- SH_PRECISION_HIGHP = 0x5001,
+- SH_PRECISION_MEDIUMP = 0x5002,
+- SH_PRECISION_LOWP = 0x5003,
+- SH_PRECISION_UNDEFINED = 0
+-} ShPrecisionType;
+-
+-typedef enum {
+ SH_INFO_LOG_LENGTH = 0x8B84,
+ SH_OBJECT_CODE_LENGTH = 0x8B88, // GL_SHADER_SOURCE_LENGTH
+- SH_ACTIVE_UNIFORMS = 0x8B86,
+- SH_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87,
+- SH_ACTIVE_ATTRIBUTES = 0x8B89,
+- SH_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A,
+- SH_VARYINGS = 0x8BBB,
+- SH_VARYING_MAX_LENGTH = 0x8BBC,
+ SH_MAPPED_NAME_MAX_LENGTH = 0x6000,
+ SH_NAME_MAX_LENGTH = 0x6001,
+ SH_HASHED_NAME_MAX_LENGTH = 0x6002,
+@@ -364,17 +351,6 @@ COMPILER_EXPORT int ShCompile(
+ // including the null termination character.
+ // SH_OBJECT_CODE_LENGTH: the number of characters in the object code
+ // including the null termination character.
+-// SH_ACTIVE_ATTRIBUTES: the number of active attribute variables.
+-// SH_ACTIVE_ATTRIBUTE_MAX_LENGTH: the length of the longest active attribute
+-// variable name including the null
+-// termination character.
+-// SH_ACTIVE_UNIFORMS: the number of active uniform variables.
+-// SH_ACTIVE_UNIFORM_MAX_LENGTH: the length of the longest active uniform
+-// variable name including the null
+-// termination character.
+-// SH_VARYINGS: the number of varying variables.
+-// SH_VARYING_MAX_LENGTH: the length of the longest varying variable name
+-// including the null termination character.
+ // SH_MAPPED_NAME_MAX_LENGTH: the length of the mapped variable name including
+ // the null termination character.
+ // SH_NAME_MAX_LENGTH: the max length of a user-defined name including the
+@@ -410,44 +386,6 @@ COMPILER_EXPORT void ShGetInfoLog(const ShHandle handle, char* infoLog);
+ // ShGetInfo with SH_OBJECT_CODE_LENGTH.
+ COMPILER_EXPORT void ShGetObjectCode(const ShHandle handle, char* objCode);
+
+-// Returns information about a shader variable.
+-// Parameters:
+-// handle: Specifies the compiler
+-// variableType: Specifies the variable type; options include
+-// SH_ACTIVE_ATTRIBUTES, SH_ACTIVE_UNIFORMS, SH_VARYINGS.
+-// index: Specifies the index of the variable to be queried.
+-// length: Returns the number of characters actually written in the string
+-// indicated by name (excluding the null terminator) if a value other
+-// than NULL is passed.
+-// size: Returns the size of the variable.
+-// type: Returns the data type of the variable.
+-// precision: Returns the precision of the variable.
+-// staticUse: Returns 1 if the variable is accessed in a statement after
+-// pre-processing, whether or not run-time flow of control will
+-// cause that statement to be executed.
+-// Returns 0 otherwise.
+-// name: Returns a null terminated string containing the name of the
+-// variable. It is assumed that name has enough memory to accormodate
+-// the variable name. The size of the buffer required to store the
+-// variable name can be obtained by calling ShGetInfo with
+-// SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, SH_ACTIVE_UNIFORM_MAX_LENGTH,
+-// SH_VARYING_MAX_LENGTH.
+-// mappedName: Returns a null terminated string containing the mapped name of
+-// the variable, It is assumed that mappedName has enough memory
+-// (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care about the
+-// mapped name. If the name is not mapped, then name and mappedName
+-// are the same.
+-COMPILER_EXPORT void ShGetVariableInfo(const ShHandle handle,
+- ShShaderInfo variableType,
+- int index,
+- size_t* length,
+- int* size,
+- sh::GLenum* type,
+- ShPrecisionType* precision,
+- int* staticUse,
+- char* name,
+- char* mappedName);
+-
+ // Returns information about a name hashing entry from the latest compile.
+ // Parameters:
+ // handle: Specifies the compiler
+diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
+index 2824064..a93d7e6 100644
+--- a/src/compiler/translator/Compiler.cpp
++++ b/src/compiler/translator/Compiler.cpp
+@@ -384,7 +384,6 @@ void TCompiler::clearResults()
+ uniforms.clear();
+ expandedUniforms.clear();
+ varyings.clear();
+- expandedVaryings.clear();
+ interfaceBlocks.clear();
+
+ builtInFunctionEmulator.Cleanup();
+@@ -518,10 +517,8 @@ void TCompiler::collectVariables(TIntermNode* root)
+ symbolTable);
+ root->traverse(&collect);
+
+- // For backwards compatiblity with ShGetVariableInfo, expand struct
+- // uniforms and varyings into separate variables for each field.
+- sh::ExpandVariables(uniforms, &expandedUniforms);
+- sh::ExpandVariables(varyings, &expandedVaryings);
++ // This is for enforcePackingRestriction().
++ sh::ExpandUniforms(uniforms, &expandedUniforms);
+ }
+
+ bool TCompiler::enforcePackingRestrictions()
+diff --git a/src/compiler/translator/Compiler.h b/src/compiler/translator/Compiler.h
+index 6d1e225..145ecb4 100644
+--- a/src/compiler/translator/Compiler.h
++++ b/src/compiler/translator/Compiler.h
+@@ -72,9 +72,7 @@ class TCompiler : public TShHandleBase
+ const std::vector<sh::Attribute> &getAttributes() const { return attributes; }
+ const std::vector<sh::Attribute> &getOutputVariables() const { return outputVariables; }
+ const std::vector<sh::Uniform> &getUniforms() const { return uniforms; }
+- const std::vector<sh::ShaderVariable> &getExpandedUniforms() const { return expandedUniforms; }
+ const std::vector<sh::Varying> &getVaryings() const { return varyings; }
+- const std::vector<sh::ShaderVariable> &getExpandedVaryings() const { return expandedVaryings; }
+ const std::vector<sh::InterfaceBlock> &getInterfaceBlocks() const { return interfaceBlocks; }
+
+ ShHashFunction64 getHashFunction() const { return hashFunction; }
+@@ -144,7 +142,6 @@ class TCompiler : public TShHandleBase
+ std::vector<sh::Uniform> uniforms;
+ std::vector<sh::ShaderVariable> expandedUniforms;
+ std::vector<sh::Varying> varyings;
+- std::vector<sh::ShaderVariable> expandedVaryings;
+ std::vector<sh::InterfaceBlock> interfaceBlocks;
+
+ private:
+diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
+index 144ef90..35dac5f 100644
+--- a/src/compiler/translator/ShaderLang.cpp
++++ b/src/compiler/translator/ShaderLang.cpp
+@@ -37,72 +37,6 @@ bool isInitialized = false;
+ // and the shading language compiler.
+ //
+
+-static bool CheckVariableMaxLengths(const ShHandle handle,
+- size_t expectedValue)
+-{
+- size_t activeUniformLimit = 0;
+- ShGetInfo(handle, SH_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformLimit);
+- size_t activeAttribLimit = 0;
+- ShGetInfo(handle, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttribLimit);
+- size_t varyingLimit = 0;
+- ShGetInfo(handle, SH_VARYING_MAX_LENGTH, &varyingLimit);
+- return (expectedValue == activeUniformLimit &&
+- expectedValue == activeAttribLimit &&
+- expectedValue == varyingLimit);
+-}
+-
+-bool CheckMappedNameMaxLength(const ShHandle handle, size_t expectedValue)
+-{
+- size_t mappedNameMaxLength = 0;
+- ShGetInfo(handle, SH_MAPPED_NAME_MAX_LENGTH, &mappedNameMaxLength);
+- return (expectedValue == mappedNameMaxLength);
+-}
+-
+-template <typename VarT>
+-const sh::ShaderVariable *ReturnVariable(const std::vector<VarT> &infoList, int index)
+-{
+- if (index < 0 || static_cast<size_t>(index) >= infoList.size())
+- {
+- return NULL;
+- }
+-
+- return &infoList[index];
+-}
+-
+-const sh::ShaderVariable *GetVariable(const TCompiler *compiler, ShShaderInfo varType, int index)
+-{
+- switch (varType)
+- {
+- case SH_ACTIVE_ATTRIBUTES:
+- return ReturnVariable(compiler->getAttributes(), index);
+- case SH_ACTIVE_UNIFORMS:
+- return ReturnVariable(compiler->getExpandedUniforms(), index);
+- case SH_VARYINGS:
+- return ReturnVariable(compiler->getExpandedVaryings(), index);
+- default:
+- UNREACHABLE();
+- return NULL;
+- }
+-}
+-
+-ShPrecisionType ConvertPrecision(sh::GLenum precision)
+-{
+- switch (precision)
+- {
+- case GL_HIGH_FLOAT:
+- case GL_HIGH_INT:
+- return SH_PRECISION_HIGHP;
+- case GL_MEDIUM_FLOAT:
+- case GL_MEDIUM_INT:
+- return SH_PRECISION_MEDIUMP;
+- case GL_LOW_FLOAT:
+- case GL_LOW_INT:
+- return SH_PRECISION_LOWP;
+- default:
+- return SH_PRECISION_UNDEFINED;
+- }
+-}
+-
+ template <typename VarT>
+ const std::vector<VarT> *GetVariableList(const TCompiler *compiler, ShaderVariableType variableType);
+
+@@ -315,24 +249,6 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, size_t* params)
+ case SH_OBJECT_CODE_LENGTH:
+ *params = compiler->getInfoSink().obj.size() + 1;
+ break;
+- case SH_ACTIVE_UNIFORMS:
+- *params = compiler->getExpandedUniforms().size();
+- break;
+- case SH_ACTIVE_UNIFORM_MAX_LENGTH:
+- *params = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- break;
+- case SH_ACTIVE_ATTRIBUTES:
+- *params = compiler->getAttributes().size();
+- break;
+- case SH_ACTIVE_ATTRIBUTE_MAX_LENGTH:
+- *params = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- break;
+- case SH_VARYINGS:
+- *params = compiler->getExpandedVaryings().size();
+- break;
+- case SH_VARYING_MAX_LENGTH:
+- *params = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- break;
+ case SH_MAPPED_NAME_MAX_LENGTH:
+ // Use longer length than MAX_SHORTENED_IDENTIFIER_SIZE to
+ // handle array and struct dereferences.
+@@ -400,58 +316,6 @@ void ShGetObjectCode(const ShHandle handle, char* objCode)
+ strcpy(objCode, infoSink.obj.c_str());
+ }
+
+-void ShGetVariableInfo(const ShHandle handle,
+- ShShaderInfo varType,
+- int index,
+- size_t* length,
+- int* size,
+- sh::GLenum* type,
+- ShPrecisionType* precision,
+- int* staticUse,
+- char* name,
+- char* mappedName)
+-{
+- if (!handle || !size || !type || !precision || !staticUse || !name)
+- return;
+- ASSERT((varType == SH_ACTIVE_ATTRIBUTES) ||
+- (varType == SH_ACTIVE_UNIFORMS) ||
+- (varType == SH_VARYINGS));
+-
+- TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+- TCompiler* compiler = base->getAsCompiler();
+- if (compiler == 0)
+- return;
+-
+- const sh::ShaderVariable *varInfo = GetVariable(compiler, varType, index);
+- if (!varInfo)
+- {
+- return;
+- }
+-
+- if (length) *length = varInfo->name.size();
+- *size = varInfo->elementCount();
+- *type = varInfo->type;
+- *precision = ConvertPrecision(varInfo->precision);
+- *staticUse = varInfo->staticUse ? 1 : 0;
+-
+- // This size must match that queried by
+- // SH_ACTIVE_UNIFORM_MAX_LENGTH, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, SH_VARYING_MAX_LENGTH
+- // in ShGetInfo, below.
+- size_t variableLength = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- ASSERT(CheckVariableMaxLengths(handle, variableLength));
+- strncpy(name, varInfo->name.c_str(), variableLength);
+- name[variableLength - 1] = 0;
+- if (mappedName)
+- {
+- // This size must match that queried by
+- // SH_MAPPED_NAME_MAX_LENGTH in ShGetInfo, below.
+- size_t maxMappedNameLength = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- ASSERT(CheckMappedNameMaxLength(handle, maxMappedNameLength));
+- strncpy(mappedName, varInfo->mappedName.c_str(), maxMappedNameLength);
+- mappedName[maxMappedNameLength - 1] = 0;
+- }
+-}
+-
+ void ShGetNameHashingEntry(const ShHandle handle,
+ int index,
+ char* name,
+diff --git a/src/compiler/translator/VariableInfo.cpp b/src/compiler/translator/VariableInfo.cpp
+index cd92706..d8e1378 100644
+--- a/src/compiler/translator/VariableInfo.cpp
++++ b/src/compiler/translator/VariableInfo.cpp
+@@ -466,9 +466,8 @@ bool CollectVariables::visitBinary(Visit, TIntermBinary *binaryNode)
+ return true;
+ }
+
+-template <typename VarT>
+-void ExpandVariables(const std::vector<VarT> &compact,
+- std::vector<ShaderVariable> *expanded)
++void ExpandUniforms(const std::vector<Uniform> &compact,
++ std::vector<ShaderVariable> *expanded)
+ {
+ for (size_t variableIndex = 0; variableIndex < compact.size(); variableIndex++)
+ {
+@@ -477,7 +476,4 @@ void ExpandVariables(const std::vector<VarT> &compact,
+ }
+ }
+
+-template void ExpandVariables(const std::vector<Uniform> &, std::vector<ShaderVariable> *);
+-template void ExpandVariables(const std::vector<Varying> &, std::vector<ShaderVariable> *);
+-
+ }
+diff --git a/src/compiler/translator/VariableInfo.h b/src/compiler/translator/VariableInfo.h
+index 9c6b6ba..92d376d 100644
+--- a/src/compiler/translator/VariableInfo.h
++++ b/src/compiler/translator/VariableInfo.h
+@@ -59,10 +59,9 @@ class CollectVariables : public TIntermTraverser
+ const TSymbolTable &mSymbolTable;
+ };
+
+-// Expand struct variables to flattened lists of split variables
+-template <typename VarT>
+-void ExpandVariables(const std::vector<VarT> &compact,
+- std::vector<ShaderVariable> *expanded);
++// Expand struct uniforms to flattened lists of split variables
++void ExpandUniforms(const std::vector<Uniform> &compact,
++ std::vector<ShaderVariable> *expanded);
+
+ }
+
diff --git a/commit-4de44cb b/commit-4de44cb
new file mode 100644
index 0000000..4c1c63e
--- /dev/null
+++ b/commit-4de44cb
@@ -0,0 +1,747 @@
+commit 4de44cb67e9e36966fb1993c0be35659a47182ef
+Author: Zhenyao Mo <zmo at chromium.org>
+Date: Wed Oct 29 18:03:46 2014 -0700
+
+ Change ShaderLang APIs from c style to c++ style.
+
+ BUG=angle:816
+ TEST=gpu_unittests,angle_unittests,webgl_conformance
+
+ Change-Id: I0b46c11f6055a82511bb946a6dc491360835526e
+ Reviewed-on: https://chromium-review.googlesource.com/226410
+ Reviewed-by: Zhenyao Mo <zmo at chromium.org>
+ Tested-by: Zhenyao Mo <zmo at chromium.org>
+
+diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h
+index 0c1f8a0..647fed6 100644
+--- a/include/GLSLANG/ShaderLang.h
++++ b/include/GLSLANG/ShaderLang.h
+@@ -27,6 +27,10 @@
+
+ #include "KHR/khrplatform.h"
+
++#include <map>
++#include <string>
++#include <vector>
++
+ //
+ // This is the platform independent interface between an OGL driver
+ // and the shading language compiler.
+@@ -42,13 +46,9 @@ typedef unsigned int GLenum;
+ // Note: make sure to increment ANGLE_SH_VERSION when changing ShaderVars.h
+ #include "ShaderVars.h"
+
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+ // Version number for shader translation API.
+ // It is incremented every time the API changes.
+-#define ANGLE_SH_VERSION 131
++#define ANGLE_SH_VERSION 132
+
+ typedef enum {
+ SH_GLES2_SPEC = 0x8B40,
+@@ -88,18 +88,6 @@ typedef enum {
+ SH_HLSL11_OUTPUT = 0x8B48
+ } ShShaderOutput;
+
+-typedef enum {
+- SH_INFO_LOG_LENGTH = 0x8B84,
+- SH_OBJECT_CODE_LENGTH = 0x8B88, // GL_SHADER_SOURCE_LENGTH
+- SH_MAPPED_NAME_MAX_LENGTH = 0x6000,
+- SH_NAME_MAX_LENGTH = 0x6001,
+- SH_HASHED_NAME_MAX_LENGTH = 0x6002,
+- SH_HASHED_NAMES_COUNT = 0x6003,
+- SH_SHADER_VERSION = 0x6004,
+- SH_RESOURCES_STRING_LENGTH = 0x6005,
+- SH_OUTPUT_TYPE = 0x6006
+-} ShShaderInfo;
+-
+ // Compile options.
+ typedef enum {
+ SH_VALIDATE = 0,
+@@ -198,14 +186,14 @@ typedef enum {
+ //
+ // Driver must call this first, once, before doing any other
+ // compiler operations.
+-// If the function succeeds, the return value is nonzero, else zero.
++// If the function succeeds, the return value is true, else false.
+ //
+-COMPILER_EXPORT int ShInitialize();
++COMPILER_EXPORT bool ShInitialize();
+ //
+ // Driver should call this at shutdown.
+-// If the function succeeds, the return value is nonzero, else zero.
++// If the function succeeds, the return value is true, else false.
+ //
+-COMPILER_EXPORT int ShFinalize();
++COMPILER_EXPORT bool ShFinalize();
+
+ // The 64 bits hash function. The first parameter is the input string; the
+ // second parameter is the string length.
+@@ -273,7 +261,7 @@ typedef struct
+ // Parameters:
+ // resources: The object to initialize. Will be comparable with memcmp.
+ //
+-COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources);
++COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources *resources);
+
+ //
+ // ShHandle held by but opaque to the driver. It is allocated,
+@@ -282,18 +270,15 @@ COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources);
+ //
+ // If handle creation fails, 0 will be returned.
+ //
+-typedef void* ShHandle;
++typedef void *ShHandle;
+
+ //
+-// Returns the a concatenated list of the items in ShBuiltInResources as a string.
++// Returns the a concatenated list of the items in ShBuiltInResources as a
++// null-terminated string.
+ // This function must be updated whenever ShBuiltInResources is changed.
+ // Parameters:
+ // handle: Specifies the handle of the compiler to be used.
+-// outStringLen: Specifies the size of the buffer, in number of characters. The size
+-// of the buffer required to store the resources string can be obtained
+-// by calling ShGetInfo with SH_RESOURCES_STRING_LENGTH.
+-// outStr: Returns a null-terminated string representing all the built-in resources.
+-COMPILER_EXPORT void ShGetBuiltInResourcesString(const ShHandle handle, size_t outStringLen, char *outStr);
++COMPILER_EXPORT const std::string &ShGetBuiltInResourcesString(const ShHandle handle);
+
+ //
+ // Driver calls these to create and destroy compiler objects.
+@@ -311,12 +296,12 @@ COMPILER_EXPORT ShHandle ShConstructCompiler(
+ sh::GLenum type,
+ ShShaderSpec spec,
+ ShShaderOutput output,
+- const ShBuiltInResources* resources);
++ const ShBuiltInResources *resources);
+ COMPILER_EXPORT void ShDestruct(ShHandle handle);
+
+ //
+ // Compiles the given shader source.
+-// If the function succeeds, the return value is nonzero, else zero.
++// If the function succeeds, the return value is true, else false.
+ // Parameters:
+ // handle: Specifies the handle of compiler to be used.
+ // shaderStrings: Specifies an array of pointers to null-terminated strings
+@@ -338,74 +323,36 @@ COMPILER_EXPORT void ShDestruct(ShHandle handle);
+ // SH_VARIABLES: Extracts attributes, uniforms, and varyings.
+ // Can be queried by calling ShGetVariableInfo().
+ //
+-COMPILER_EXPORT int ShCompile(
++COMPILER_EXPORT bool ShCompile(
+ const ShHandle handle,
+- const char* const shaderStrings[],
++ const char * const shaderStrings[],
+ size_t numStrings,
+- int compileOptions
+- );
++ int compileOptions);
+
+-// Returns a parameter from a compiled shader.
+-// Parameters:
+-// handle: Specifies the compiler
+-// pname: Specifies the parameter to query.
+-// The following parameters are defined:
+-// SH_INFO_LOG_LENGTH: the number of characters in the information log
+-// including the null termination character.
+-// SH_OBJECT_CODE_LENGTH: the number of characters in the object code
+-// including the null termination character.
+-// SH_MAPPED_NAME_MAX_LENGTH: the length of the mapped variable name including
+-// the null termination character.
+-// SH_NAME_MAX_LENGTH: the max length of a user-defined name including the
+-// null termination character.
+-// SH_HASHED_NAME_MAX_LENGTH: the max length of a hashed name including the
+-// null termination character.
+-// SH_HASHED_NAMES_COUNT: the number of hashed names from the latest compile.
+-// SH_SHADER_VERSION: the version of the shader language
+-// SH_OUTPUT_TYPE: the currently set language output type
+-//
+-// params: Requested parameter
+-COMPILER_EXPORT void ShGetInfo(const ShHandle handle,
+- ShShaderInfo pname,
+- size_t* params);
++// Return the version of the shader language.
++COMPILER_EXPORT int ShGetShaderVersion(const ShHandle handle);
++
++// Return the currently set language output type.
++COMPILER_EXPORT ShShaderOutput ShGetShaderOutputType(
++ const ShHandle handle);
+
+-// Returns nul-terminated information log for a compiled shader.
++// Returns null-terminated information log for a compiled shader.
+ // Parameters:
+ // handle: Specifies the compiler
+-// infoLog: Specifies an array of characters that is used to return
+-// the information log. It is assumed that infoLog has enough memory
+-// to accomodate the information log. The size of the buffer required
+-// to store the returned information log can be obtained by calling
+-// ShGetInfo with SH_INFO_LOG_LENGTH.
+-COMPILER_EXPORT void ShGetInfoLog(const ShHandle handle, char* infoLog);
++COMPILER_EXPORT const std::string &ShGetInfoLog(const ShHandle handle);
+
+ // Returns null-terminated object code for a compiled shader.
+ // Parameters:
+ // handle: Specifies the compiler
+-// infoLog: Specifies an array of characters that is used to return
+-// the object code. It is assumed that infoLog has enough memory to
+-// accomodate the object code. The size of the buffer required to
+-// store the returned object code can be obtained by calling
+-// ShGetInfo with SH_OBJECT_CODE_LENGTH.
+-COMPILER_EXPORT void ShGetObjectCode(const ShHandle handle, char* objCode);
+-
+-// Returns information about a name hashing entry from the latest compile.
++COMPILER_EXPORT const std::string &ShGetObjectCode(const ShHandle handle);
++
++// Returns a (original_name, hash) map containing all the user defined
++// names in the shader, including variable names, function names, struct
++// names, and struct field names.
+ // Parameters:
+ // handle: Specifies the compiler
+-// index: Specifies the index of the name hashing entry to be queried.
+-// name: Returns a null terminated string containing the user defined name.
+-// It is assumed that name has enough memory to accomodate the name.
+-// The size of the buffer required to store the user defined name can
+-// be obtained by calling ShGetInfo with SH_NAME_MAX_LENGTH.
+-// hashedName: Returns a null terminated string containing the hashed name of
+-// the uniform variable, It is assumed that hashedName has enough
+-// memory to accomodate the name. The size of the buffer required
+-// to store the name can be obtained by calling ShGetInfo with
+-// SH_HASHED_NAME_MAX_LENGTH.
+-COMPILER_EXPORT void ShGetNameHashingEntry(const ShHandle handle,
+- int index,
+- char* name,
+- char* hashedName);
++COMPILER_EXPORT const std::map<std::string, std::string> *ShGetNameHashingMap(
++ const ShHandle handle);
+
+ // Shader variable inspection.
+ // Returns a pointer to a list of variables of the designated type.
+@@ -425,17 +372,17 @@ typedef struct
+ int size;
+ } ShVariableInfo;
+
+-// Returns 1 if the passed in variables pack in maxVectors following
++// Returns true if the passed in variables pack in maxVectors following
+ // the packing rules from the GLSL 1.017 spec, Appendix A, section 7.
+-// Returns 0 otherwise. Also look at the SH_ENFORCE_PACKING_RESTRICTIONS
++// Returns false otherwise. Also look at the SH_ENFORCE_PACKING_RESTRICTIONS
+ // flag above.
+ // Parameters:
+ // maxVectors: the available rows of registers.
+ // varInfoArray: an array of variable info (types and sizes).
+ // varInfoArraySize: the size of the variable array.
+-COMPILER_EXPORT int ShCheckVariablesWithinPackingLimits(
++COMPILER_EXPORT bool ShCheckVariablesWithinPackingLimits(
+ int maxVectors,
+- ShVariableInfo* varInfoArray,
++ ShVariableInfo *varInfoArray,
+ size_t varInfoArraySize);
+
+ // Gives the compiler-assigned register for an interface block.
+@@ -446,7 +393,7 @@ COMPILER_EXPORT int ShCheckVariablesWithinPackingLimits(
+ // interfaceBlockName: Specifies the interface block
+ // indexOut: output variable that stores the assigned register
+ COMPILER_EXPORT bool ShGetInterfaceBlockRegister(const ShHandle handle,
+- const char *interfaceBlockName,
++ const std::string &interfaceBlockName,
+ unsigned int *indexOut);
+
+ // Gives the compiler-assigned register for uniforms in the default
+@@ -458,11 +405,7 @@ COMPILER_EXPORT bool ShGetInterfaceBlockRegister(const ShHandle handle,
+ // interfaceBlockName: Specifies the uniform
+ // indexOut: output variable that stores the assigned register
+ COMPILER_EXPORT bool ShGetUniformRegister(const ShHandle handle,
+- const char *uniformName,
++ const std::string &uniformName,
+ unsigned int *indexOut);
+
+-#ifdef __cplusplus
+-}
+-#endif
+-
+ #endif // _COMPILER_INTERFACE_INCLUDED_
+diff --git a/src/compiler/translator/Compiler.h b/src/compiler/translator/Compiler.h
+index 145ecb4..b6c9d13 100644
+--- a/src/compiler/translator/Compiler.h
++++ b/src/compiler/translator/Compiler.h
+@@ -80,7 +80,7 @@ class TCompiler : public TShHandleBase
+ TSymbolTable& getSymbolTable() { return symbolTable; }
+ ShShaderSpec getShaderSpec() const { return shaderSpec; }
+ ShShaderOutput getOutputType() const { return outputType; }
+- std::string getBuiltInResourcesString() const { return builtInResourcesString; }
++ const std::string &getBuiltInResourcesString() const { return builtInResourcesString; }
+
+ // Get the resources set by InitBuiltInSymbolTable
+ const ShBuiltInResources& getResources() const;
+diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
+index 35dac5f..0d6a1d6 100644
+--- a/src/compiler/translator/ShaderLang.cpp
++++ b/src/compiler/translator/ShaderLang.cpp
+@@ -84,32 +84,48 @@ const std::vector<VarT> *GetShaderVariables(const ShHandle handle, ShaderVariabl
+ return GetVariableList<VarT>(compiler, variableType);
+ }
+
++TCompiler *GetCompilerFromHandle(ShHandle handle)
++{
++ if (!handle)
++ return NULL;
++ TShHandleBase *base = static_cast<TShHandleBase *>(handle);
++ return base->getAsCompiler();
+ }
+
++TranslatorHLSL *GetTranslatorHLSLFromHandle(ShHandle handle)
++{
++ if (!handle)
++ return NULL;
++ TShHandleBase *base = static_cast<TShHandleBase *>(handle);
++ return base->getAsTranslatorHLSL();
++}
++
++} // namespace anonymous
++
+ //
+ // Driver must call this first, once, before doing any other compiler operations.
+ // Subsequent calls to this function are no-op.
+ //
+-int ShInitialize()
++bool ShInitialize()
+ {
+ if (!isInitialized)
+ {
+ isInitialized = InitProcess();
+ }
+- return isInitialized ? 1 : 0;
++ return isInitialized;
+ }
+
+ //
+ // Cleanup symbol tables
+ //
+-int ShFinalize()
++bool ShFinalize()
+ {
+ if (isInitialized)
+ {
+ DetachProcess();
+ isInitialized = false;
+ }
+- return 1;
++ return true;
+ }
+
+ //
+@@ -190,23 +206,13 @@ void ShDestruct(ShHandle handle)
+ DeleteCompiler(base->getAsCompiler());
+ }
+
+-void ShGetBuiltInResourcesString(const ShHandle handle, size_t outStringLen, char *outString)
++const std::string &ShGetBuiltInResourcesString(const ShHandle handle)
+ {
+- if (!handle || !outString)
+- {
+- return;
+- }
+-
+- TShHandleBase *base = static_cast<TShHandleBase*>(handle);
+- TCompiler *compiler = base->getAsCompiler();
+- if (!compiler)
+- {
+- return;
+- }
+-
+- strncpy(outString, compiler->getBuiltInResourcesString().c_str(), outStringLen);
+- outString[outStringLen - 1] = '\0';
++ TCompiler *compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
++ return compiler->getBuiltInResourcesString();
+ }
++
+ //
+ // Do an actual compile on the given strings. The result is left
+ // in the given compile object.
+@@ -214,149 +220,62 @@ void ShGetBuiltInResourcesString(const ShHandle handle, size_t outStringLen, cha
+ // Return: The return value of ShCompile is really boolean, indicating
+ // success or failure.
+ //
+-int ShCompile(
++bool ShCompile(
+ const ShHandle handle,
+- const char* const shaderStrings[],
++ const char *const shaderStrings[],
+ size_t numStrings,
+ int compileOptions)
+ {
+- if (handle == 0)
+- return 0;
+-
+- TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
+- TCompiler* compiler = base->getAsCompiler();
+- if (compiler == 0)
+- return 0;
++ TCompiler *compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
+
+- bool success = compiler->compile(shaderStrings, numStrings, compileOptions);
+- return success ? 1 : 0;
++ return compiler->compile(shaderStrings, numStrings, compileOptions);
+ }
+
+-void ShGetInfo(const ShHandle handle, ShShaderInfo pname, size_t* params)
++int ShGetShaderVersion(const ShHandle handle)
+ {
+- if (!handle || !params)
+- return;
+-
+- TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+- TCompiler* compiler = base->getAsCompiler();
+- if (!compiler) return;
++ TCompiler* compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
++ return compiler->getShaderVersion();
++}
+
+- switch(pname)
+- {
+- case SH_INFO_LOG_LENGTH:
+- *params = compiler->getInfoSink().info.size() + 1;
+- break;
+- case SH_OBJECT_CODE_LENGTH:
+- *params = compiler->getInfoSink().obj.size() + 1;
+- break;
+- case SH_MAPPED_NAME_MAX_LENGTH:
+- // Use longer length than MAX_SHORTENED_IDENTIFIER_SIZE to
+- // handle array and struct dereferences.
+- *params = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- break;
+- case SH_NAME_MAX_LENGTH:
+- *params = 1 + GetGlobalMaxTokenSize(compiler->getShaderSpec());
+- break;
+- case SH_HASHED_NAME_MAX_LENGTH:
+- if (compiler->getHashFunction() == NULL) {
+- *params = 0;
+- } else {
+- // 64 bits hashing output requires 16 bytes for hex
+- // representation.
+- const char HashedNamePrefix[] = HASHED_NAME_PREFIX;
+- (void)HashedNamePrefix;
+- *params = 16 + sizeof(HashedNamePrefix);
+- }
+- break;
+- case SH_HASHED_NAMES_COUNT:
+- *params = compiler->getNameMap().size();
+- break;
+- case SH_SHADER_VERSION:
+- *params = compiler->getShaderVersion();
+- break;
+- case SH_RESOURCES_STRING_LENGTH:
+- *params = compiler->getBuiltInResourcesString().length() + 1;
+- break;
+- case SH_OUTPUT_TYPE:
+- *params = compiler->getOutputType();
+- break;
+- default: UNREACHABLE();
+- }
++ShShaderOutput ShGetShaderOutputType(const ShHandle handle)
++{
++ TCompiler* compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
++ return compiler->getOutputType();
+ }
+
+ //
+ // Return any compiler log of messages for the application.
+ //
+-void ShGetInfoLog(const ShHandle handle, char* infoLog)
++const std::string &ShGetInfoLog(const ShHandle handle)
+ {
+- if (!handle || !infoLog)
+- return;
++ TCompiler *compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
+
+- TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+- TCompiler* compiler = base->getAsCompiler();
+- if (!compiler) return;
+-
+- TInfoSink& infoSink = compiler->getInfoSink();
+- strcpy(infoLog, infoSink.info.c_str());
++ TInfoSink &infoSink = compiler->getInfoSink();
++ return infoSink.info.str();
+ }
+
+ //
+ // Return any object code.
+ //
+-void ShGetObjectCode(const ShHandle handle, char* objCode)
++const std::string &ShGetObjectCode(const ShHandle handle)
+ {
+- if (!handle || !objCode)
+- return;
++ TCompiler *compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
+
+- TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+- TCompiler* compiler = base->getAsCompiler();
+- if (!compiler) return;
+-
+- TInfoSink& infoSink = compiler->getInfoSink();
+- strcpy(objCode, infoSink.obj.c_str());
++ TInfoSink &infoSink = compiler->getInfoSink();
++ return infoSink.obj.str();
+ }
+
+-void ShGetNameHashingEntry(const ShHandle handle,
+- int index,
+- char* name,
+- char* hashedName)
++const std::map<std::string, std::string> *ShGetNameHashingMap(
++ const ShHandle handle)
+ {
+- if (!handle || !name || !hashedName || index < 0)
+- return;
+-
+- TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+- TCompiler* compiler = base->getAsCompiler();
+- if (!compiler) return;
+-
+- const NameMap& nameMap = compiler->getNameMap();
+- if (index >= static_cast<int>(nameMap.size()))
+- return;
+-
+- NameMap::const_iterator it = nameMap.begin();
+- for (int i = 0; i < index; ++i)
+- ++it;
+-
+- size_t len = it->first.length() + 1;
+- size_t max_len = 0;
+- ShGetInfo(handle, SH_NAME_MAX_LENGTH, &max_len);
+- if (len > max_len) {
+- ASSERT(false);
+- len = max_len;
+- }
+- strncpy(name, it->first.c_str(), len);
+- // To be on the safe side in case the source is longer than expected.
+- name[len - 1] = '\0';
+-
+- len = it->second.length() + 1;
+- max_len = 0;
+- ShGetInfo(handle, SH_HASHED_NAME_MAX_LENGTH, &max_len);
+- if (len > max_len) {
+- ASSERT(false);
+- len = max_len;
+- }
+- strncpy(hashedName, it->second.c_str(), len);
+- // To be on the safe side in case the source is longer than expected.
+- hashedName[len - 1] = '\0';
++ TCompiler *compiler = GetCompilerFromHandle(handle);
++ ASSERT(compiler);
++ return &(compiler->getNameMap());
+ }
+
+ const std::vector<sh::Uniform> *ShGetUniforms(const ShHandle handle)
+@@ -384,11 +303,11 @@ const std::vector<sh::InterfaceBlock> *ShGetInterfaceBlocks(const ShHandle handl
+ return GetShaderVariables<sh::InterfaceBlock>(handle, SHADERVAR_INTERFACEBLOCK);
+ }
+
+-int ShCheckVariablesWithinPackingLimits(
+- int maxVectors, ShVariableInfo* varInfoArray, size_t varInfoArraySize)
++bool ShCheckVariablesWithinPackingLimits(
++ int maxVectors, ShVariableInfo *varInfoArray, size_t varInfoArraySize)
+ {
+ if (varInfoArraySize == 0)
+- return 1;
++ return true;
+ ASSERT(varInfoArray);
+ std::vector<sh::ShaderVariable> variables;
+ for (size_t ii = 0; ii < varInfoArraySize; ++ii)
+@@ -397,24 +316,17 @@ int ShCheckVariablesWithinPackingLimits(
+ variables.push_back(var);
+ }
+ VariablePacker packer;
+- return packer.CheckVariablesWithinPackingLimits(maxVectors, variables) ? 1 : 0;
++ return packer.CheckVariablesWithinPackingLimits(maxVectors, variables);
+ }
+
+ bool ShGetInterfaceBlockRegister(const ShHandle handle,
+- const char *interfaceBlockName,
++ const std::string &interfaceBlockName,
+ unsigned int *indexOut)
+ {
+- if (!handle || !interfaceBlockName || !indexOut)
+- {
+- return false;
+- }
++ ASSERT(indexOut);
+
+- TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+- TranslatorHLSL* translator = base->getAsTranslatorHLSL();
+- if (!translator)
+- {
+- return false;
+- }
++ TranslatorHLSL *translator = GetTranslatorHLSLFromHandle(handle);
++ ASSERT(translator);
+
+ if (!translator->hasInterfaceBlock(interfaceBlockName))
+ {
+@@ -426,20 +338,12 @@ bool ShGetInterfaceBlockRegister(const ShHandle handle,
+ }
+
+ bool ShGetUniformRegister(const ShHandle handle,
+- const char *uniformName,
++ const std::string &uniformName,
+ unsigned int *indexOut)
+ {
+- if (!handle || !uniformName || !indexOut)
+- {
+- return false;
+- }
+-
+- TShHandleBase* base = static_cast<TShHandleBase*>(handle);
+- TranslatorHLSL* translator = base->getAsTranslatorHLSL();
+- if (!translator)
+- {
+- return false;
+- }
++ ASSERT(indexOut);
++ TranslatorHLSL *translator = GetTranslatorHLSLFromHandle(handle);
++ ASSERT(translator);
+
+ if (!translator->hasUniform(uniformName))
+ {
+diff --git a/src/libGLESv2/renderer/d3d/ShaderD3D.cpp b/src/libGLESv2/renderer/d3d/ShaderD3D.cpp
+index d08a81d..44e73e5 100644
+--- a/src/libGLESv2/renderer/d3d/ShaderD3D.cpp
++++ b/src/libGLESv2/renderer/d3d/ShaderD3D.cpp
+@@ -102,7 +102,7 @@ void ShaderD3D::initializeCompiler()
+ {
+ if (!mFragmentCompiler)
+ {
+- int result = ShInitialize();
++ bool result = ShInitialize();
+
+ if (result)
+ {
+@@ -252,23 +252,16 @@
+ result = ShCompile(compiler, sourceStrings, ArraySize(sourceStrings), compileOptions | SH_SOURCE_PATH);
+ }
+
+- size_t shaderVersion = 100;
+- ShGetInfo(compiler, SH_SHADER_VERSION, &shaderVersion);
++ mShaderVersion = ShGetShaderVersion(compiler);
+
+- mShaderVersion = static_cast<int>(shaderVersion);
+-
+- if (shaderVersion == 300 && data.clientVersion < 3)
++ if (mShaderVersion == 300 && data.clientVersion < 3)
+ {
+ mInfoLog = "GLSL ES 3.00 is not supported by OpenGL ES 2.0 contexts";
+ TRACE("\n%s", mInfoLog.c_str());
+ }
+ else if (result)
+ {
+- size_t objCodeLen = 0;
+- ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &objCodeLen);
+-
+- std::vector<char> outputHLSL(objCodeLen);
+- ShGetObjectCode(compiler, outputHLSL.data());
++ mHlsl = ShGetObjectCode(compiler);
+
+ #ifdef _DEBUG
+ // Prefix hlsl shader with commented out glsl shader
+@@ -288,10 +281,8 @@ void ShaderD3D::compileToHLSL(void *compiler, const std::string &source)
+ curPos = (nextLine == std::string::npos) ? std::string::npos : (nextLine + 1);
+ }
+ hlslStream << "\n\n";
+- hlslStream << outputHLSL.data();
++ hlslStream << mHlsl;
+ mHlsl = hlslStream.str();
+-#else
+- mHlsl = outputHLSL.data();
+ #endif
+
+ mUniforms = *GetShaderVariables(ShGetUniforms(compiler));
+@@ -303,7 +294,7 @@ void ShaderD3D::compileToHLSL(void *compiler, const std::string &source)
+ if (uniform.staticUse)
+ {
+ unsigned int index = -1;
+- bool result = ShGetUniformRegister(compiler, uniform.name.c_str(), &index);
++ bool result = ShGetUniformRegister(compiler, uniform.name, &index);
+ UNUSED_ASSERTION_VARIABLE(result);
+ ASSERT(result);
+
+@@ -320,7 +311,7 @@ void ShaderD3D::compileToHLSL(void *compiler, const std::string &source)
+ if (interfaceBlock.staticUse)
+ {
+ unsigned int index = -1;
+- bool result = ShGetInterfaceBlockRegister(compiler, interfaceBlock.name.c_str(), &index);
++ bool result = ShGetInterfaceBlockRegister(compiler, interfaceBlock.name, &index);
+ UNUSED_ASSERTION_VARIABLE(result);
+ ASSERT(result);
+
+@@ -330,14 +321,9 @@ void ShaderD3D::compileToHLSL(void *compiler, const std::string &source)
+ }
+ else
+ {
+- size_t infoLogLen = 0;
+- ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &infoLogLen);
++ mInfoLog = ShGetInfoLog(compiler);
+
+- std::vector<char> infoLog(infoLogLen);
+- ShGetInfoLog(compiler, infoLog.data());
+- mInfoLog = infoLog.data();
+-
+- TRACE("\n%s", infoLog.data());
++ TRACE("\n%s", mInfoLog.c_str());
+ }
+ }
+
+@@ -419,10 +405,7 @@
+ default: UNREACHABLE(); return SH_HLSL9_OUTPUT;
+ }
+
+- size_t outputType = 0;
+- ShGetInfo(compiler, SH_OUTPUT_TYPE, &outputType);
+-
+- return static_cast<ShShaderOutput>(outputType);
++ return ShGetShaderOutputType(compiler);
+ }
+
+ bool ShaderD3D::compile(const gl::Data &data, const std::string &source)
+diff --git a/tests/compiler_tests/ExpressionLimit_test.cpp b/tests/compiler_tests/ExpressionLimit_test.cpp
+index 0236064..1dc2be6 100644
+--- a/tests/compiler_tests/ExpressionLimit_test.cpp
++++ b/tests/compiler_tests/ExpressionLimit_test.cpp
+@@ -144,19 +144,18 @@ protected:
+ // substring in the error log. This way we know the error is specific
+ // to the issue we are testing.
+ bool CheckShaderCompilation(ShHandle compiler,
+- const char* source,
++ const char *source,
+ int compileOptions,
+- const char* expected_error) {
++ const char *expected_error)
++ {
+ bool success = ShCompile(compiler, &source, 1, compileOptions) != 0;
+- if (success) {
++ if (success)
++ {
+ success = !expected_error;
+- } else {
+- size_t bufferLen = 0;
+- ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &bufferLen);
+- char* buffer(new char [bufferLen]);
+- ShGetInfoLog(compiler, buffer);
+- std::string log(buffer, buffer + bufferLen);
+- delete [] buffer;
++ }
++ else
++ {
++ std::string log = ShGetInfoLog(compiler);
+ if (expected_error)
+ success = log.find(expected_error) != std::string::npos;
+
diff --git a/libEGL_mingw32.def b/libEGL_mingw32.def
new file mode 100644
index 0000000..492ad4d
--- /dev/null
+++ b/libEGL_mingw32.def
@@ -0,0 +1,41 @@
+LIBRARY libEGL
+EXPORTS
+ eglBindAPI at 4 @14
+ eglBindTexImage at 12 @20
+ eglChooseConfig at 20 @7
+ eglCopyBuffers at 12 @33
+ eglCreateContext at 16 @23
+ eglCreatePbufferFromClientBuffer at 20 @18
+ eglCreatePbufferSurface at 12 @10
+ eglCreatePixmapSurface at 16 @11
+ eglCreateWindowSurface at 16 @9
+ eglDestroyContext at 8 @24
+ eglDestroySurface at 8 @12
+ eglGetConfigAttrib at 16 @8
+ eglGetConfigs at 16 @6
+ eglGetCurrentContext at 0 @26
+ eglGetCurrentDisplay at 0 @28
+ eglGetCurrentSurface at 4 @27
+ eglGetDisplay at 4 @2
+ eglGetError at 0 @1
+ eglGetProcAddress at 4 @34
+ eglInitialize at 12 @3
+ eglMakeCurrent at 16 @25
+ eglQueryAPI at 0 @15
+ eglQueryContext at 16 @29
+ eglQueryString at 8 @5
+ eglQuerySurface at 16 @13
+ eglReleaseTexImage at 12 @21
+ eglReleaseThread at 0 @17
+ eglSurfaceAttrib at 16 @19
+ eglSwapBuffers at 8 @32
+ eglSwapInterval at 8 @22
+ eglTerminate at 4 @4
+ eglWaitClient at 0 @16
+ eglWaitGL at 0 @30
+ eglWaitNative at 4 @31
+
+ ; Extensions
+ eglGetPlatformDisplayEXT at 12 @35
+ eglQuerySurfacePointerANGLE at 16 @36
+ eglPostSubBufferNV at 24 @37
diff --git a/libGLESv2_mingw32.def b/libGLESv2_mingw32.def
new file mode 100644
index 0000000..18ffcf6
--- /dev/null
+++ b/libGLESv2_mingw32.def
@@ -0,0 +1,296 @@
+LIBRARY libGLESv2
+EXPORTS
+ glActiveTexture at 4 @1
+ glAttachShader at 8 @2
+ glBindAttribLocation at 12 @3
+ glBindBuffer at 8 @4
+ glBindFramebuffer at 8 @5
+ glBindRenderbuffer at 8 @6
+ glBindTexture at 8 @7
+ glBlendColor at 16 @8
+ glBlendEquation at 4 @9
+ glBlendEquationSeparate at 8 @10
+ glBlendFunc at 8 @11
+ glBlendFuncSeparate at 16 @12
+ glBufferData at 16 @13
+ glBufferSubData at 16 @14
+ glCheckFramebufferStatus at 4 @15
+ glClear at 4 @16
+ glClearColor at 16 @17
+ glClearDepthf at 4 @18
+ glClearStencil at 4 @19
+ glColorMask at 16 @20
+ glCompileShader at 4 @21
+ glCompressedTexImage2D at 32 @22
+ glCompressedTexSubImage2D at 36 @23
+ glCopyTexImage2D at 32 @24
+ glCopyTexSubImage2D at 32 @25
+ glCreateProgram at 0 @26
+ glCreateShader at 4 @27
+ glCullFace at 4 @28
+ glDeleteBuffers at 8 @29
+ glDeleteFramebuffers at 8 @30
+ glDeleteProgram at 4 @32
+ glDeleteRenderbuffers at 8 @33
+ glDeleteShader at 4 @34
+ glDeleteTextures at 8 @31
+ glDepthFunc at 4 @36
+ glDepthMask at 4 @37
+ glDepthRangef at 8 @38
+ glDetachShader at 8 @35
+ glDisable at 4 @39
+ glDisableVertexAttribArray at 4 @40
+ glDrawArrays at 12 @41
+ glDrawElements at 16 @42
+ glEnable at 4 @43
+ glEnableVertexAttribArray at 4 @44
+ glFinish at 0 @45
+ glFlush at 0 @46
+ glFramebufferRenderbuffer at 16 @47
+ glFramebufferTexture2D at 20 @48
+ glFrontFace at 4 @49
+ glGenBuffers at 8 @50
+ glGenFramebuffers at 8 @52
+ glGenRenderbuffers at 8 @53
+ glGenTextures at 8 @54
+ glGenerateMipmap at 4 @51
+ glGetActiveAttrib at 28 @55
+ glGetActiveUniform at 28 @56
+ glGetAttachedShaders at 16 @57
+ glGetAttribLocation at 8 @58
+ glGetBooleanv at 8 @59
+ glGetBufferParameteriv at 12 @60
+ glGetError at 0 @61
+ glGetFloatv at 8 @62
+ glGetFramebufferAttachmentParameteriv at 16 @63
+ glGetIntegerv at 8 @64
+ glGetProgramInfoLog at 16 @66
+ glGetProgramiv at 12 @65
+ glGetRenderbufferParameteriv at 12 @67
+ glGetShaderInfoLog at 16 @69
+ glGetShaderPrecisionFormat at 16 @70
+ glGetShaderSource at 16 @71
+ glGetShaderiv at 12 @68
+ glGetString at 4 @72
+ glGetTexParameterfv at 12 @73
+ glGetTexParameteriv at 12 @74
+ glGetUniformLocation at 8 @77
+ glGetUniformfv at 12 @75
+ glGetUniformiv at 12 @76
+ glGetVertexAttribPointerv at 12 @80
+ glGetVertexAttribfv at 12 @78
+ glGetVertexAttribiv at 12 @79
+ glHint at 8 @81
+ glIsBuffer at 4 @82
+ glIsEnabled at 4 @83
+ glIsFramebuffer at 4 @84
+ glIsProgram at 4 @85
+ glIsRenderbuffer at 4 @86
+ glIsShader at 4 @87
+ glIsTexture at 4 @88
+ glLineWidth at 4 @89
+ glLinkProgram at 4 @90
+ glPixelStorei at 8 @91
+ glPolygonOffset at 8 @92
+ glReadPixels at 28 @93
+ glReleaseShaderCompiler at 0 @94
+ glRenderbufferStorage at 16 @95
+ glSampleCoverage at 8 @96
+ glScissor at 16 @97
+ glShaderBinary at 20 @98
+ glShaderSource at 16 @99
+ glStencilFunc at 12 @100
+ glStencilFuncSeparate at 16 @101
+ glStencilMask at 4 @102
+ glStencilMaskSeparate at 8 @103
+ glStencilOp at 12 @104
+ glStencilOpSeparate at 16 @105
+ glTexImage2D at 36 @106
+ glTexParameterf at 12 @107
+ glTexParameterfv at 12 @108
+ glTexParameteri at 12 @109
+ glTexParameteriv at 12 @110
+ glTexSubImage2D at 36 @111
+ glUniform1f at 8 @112
+ glUniform1fv at 12 @113
+ glUniform1i at 8 @114
+ glUniform1iv at 12 @115
+ glUniform2f at 12 @116
+ glUniform2fv at 12 @117
+ glUniform2i at 12 @118
+ glUniform2iv at 12 @119
+ glUniform3f at 16 @120
+ glUniform3fv at 12 @121
+ glUniform3i at 16 @122
+ glUniform3iv at 12 @123
+ glUniform4f at 20 @124
+ glUniform4fv at 12 @125
+ glUniform4i at 20 @126
+ glUniform4iv at 12 @127
+ glUniformMatrix2fv at 16 @128
+ glUniformMatrix3fv at 16 @129
+ glUniformMatrix4fv at 16 @130
+ glUseProgram at 4 @131
+ glValidateProgram at 4 @132
+ glVertexAttrib1f at 8 @133
+ glVertexAttrib1fv at 8 @134
+ glVertexAttrib2f at 12 @135
+ glVertexAttrib2fv at 8 @136
+ glVertexAttrib3f at 16 @137
+ glVertexAttrib3fv at 8 @138
+ glVertexAttrib4f at 20 @139
+ glVertexAttrib4fv at 8 @140
+ glVertexAttribPointer at 24 @141
+ glViewport at 16 @142
+
+ ; Extensions
+ glTexImage3DOES at 40 @143
+ glBlitFramebufferANGLE at 40 @149
+ glRenderbufferStorageMultisampleANGLE at 20 @150
+ glDeleteFencesNV at 8 @151
+ glFinishFenceNV at 4 @152
+ glGenFencesNV at 8 @153
+ glGetFenceivNV at 12 @154
+ glIsFenceNV at 4 @155
+ glSetFenceNV at 8 @156
+ glTestFenceNV at 4 @157
+ glGetTranslatedShaderSourceANGLE at 16 @159
+ glTexStorage2DEXT at 20 @160
+ glGetGraphicsResetStatusEXT at 0 @161
+ glReadnPixelsEXT at 32 @162
+ glGetnUniformfvEXT at 16 @163
+ glGetnUniformivEXT at 16 @164
+ glGenQueriesEXT at 8 @165
+ glDeleteQueriesEXT at 8 @166
+ glIsQueryEXT at 4 @167
+ glBeginQueryEXT at 8 @168
+ glEndQueryEXT at 4 @169
+ glGetQueryivEXT at 12 @170
+ glGetQueryObjectuivEXT at 12 @171
+ glVertexAttribDivisorANGLE at 8 @172
+ glDrawArraysInstancedANGLE at 16 @173
+ glDrawElementsInstancedANGLE at 20 @174
+ glProgramBinaryOES at 16 @175
+ glGetProgramBinaryOES at 20 @176
+ glDrawBuffersEXT at 8 @179
+ glMapBufferOES at 8 @285
+ glUnmapBufferOES at 4 @286
+ glGetBufferPointervOES at 12 @287
+ glMapBufferRangeEXT at 16 @288
+ glFlushMappedBufferRangeEXT at 12 @289
+
+ ; GLES 3.0 Functions
+ glReadBuffer at 4 @180
+ glDrawRangeElements at 24 @181
+ glTexImage3D at 40 @182
+ glTexSubImage3D at 44 @183
+ glCopyTexSubImage3D at 36 @184
+ glCompressedTexImage3D at 36 @185
+ glCompressedTexSubImage3D at 44 @186
+ glGenQueries at 8 @187
+ glDeleteQueries at 8 @188
+ glIsQuery at 4 @189
+ glBeginQuery at 8 @190
+ glEndQuery at 4 @191
+ glGetQueryiv at 12 @192
+ glGetQueryObjectuiv at 12 @193
+ glUnmapBuffer at 4 @194
+ glGetBufferPointerv at 12 @195
+ glDrawBuffers at 8 @196
+ glUniformMatrix2x3fv at 16 @197
+ glUniformMatrix3x2fv at 16 @198
+ glUniformMatrix2x4fv at 16 @199
+ glUniformMatrix4x2fv at 16 @200
+ glUniformMatrix3x4fv at 16 @201
+ glUniformMatrix4x3fv at 16 @202
+ glBlitFramebuffer at 40 @203
+ glRenderbufferStorageMultisample at 20 @204
+ glFramebufferTextureLayer at 20 @205
+ glMapBufferRange at 16 @206
+ glFlushMappedBufferRange at 12 @207
+ glBindVertexArray at 4 @208
+ glDeleteVertexArrays at 8 @209
+ glGenVertexArrays at 8 @210
+ glIsVertexArray at 4 @211
+ glGetIntegeri_v at 12 @212
+ glBeginTransformFeedback at 4 @213
+ glEndTransformFeedback at 0 @214
+ glBindBufferRange at 20 @215
+ glBindBufferBase at 12 @216
+ glTransformFeedbackVaryings at 16 @217
+ glGetTransformFeedbackVarying at 28 @218
+ glVertexAttribIPointer at 20 @219
+ glGetVertexAttribIiv at 12 @220
+ glGetVertexAttribIuiv at 12 @221
+ glVertexAttribI4i at 20 @222
+ glVertexAttribI4ui at 20 @223
+ glVertexAttribI4iv at 8 @224
+ glVertexAttribI4uiv at 8 @225
+ glGetUniformuiv at 12 @226
+ glGetFragDataLocation at 8 @227
+ glUniform1ui at 8 @228
+ glUniform2ui at 12 @229
+ glUniform3ui at 16 @230
+ glUniform4ui at 20 @231
+ glUniform1uiv at 12 @232
+ glUniform2uiv at 12 @233
+ glUniform3uiv at 12 @234
+ glUniform4uiv at 12 @235
+ glClearBufferiv at 12 @236
+ glClearBufferuiv at 12 @237
+ glClearBufferfv at 12 @238
+ glClearBufferfi at 16 @239
+ glGetStringi at 8 @240
+ glCopyBufferSubData at 20 @241
+ glGetUniformIndices at 16 @242
+ glGetActiveUniformsiv at 20 @243
+ glGetUniformBlockIndex at 8 @244
+ glGetActiveUniformBlockiv at 16 @245
+ glGetActiveUniformBlockName at 20 @246
+ glUniformBlockBinding at 12 @247
+ glDrawArraysInstanced at 16 @248
+ glDrawElementsInstanced at 20 @249
+ glFenceSync at 8 @250
+ glIsSync at 4 @251
+ glDeleteSync at 4 @252
+ glClientWaitSync at 16 @253
+ glWaitSync at 16 @254
+ glGetInteger64v at 8 @255
+ glGetSynciv at 20 @256
+ glGetInteger64i_v at 12 @257
+ glGetBufferParameteri64v at 12 @258
+ glGenSamplers at 8 @259
+ glDeleteSamplers at 8 @260
+ glIsSampler at 4 @261
+ glBindSampler at 8 @262
+ glSamplerParameteri at 12 @263
+ glSamplerParameteriv at 12 @264
+ glSamplerParameterf at 12 @265
+ glSamplerParameterfv at 12 @266
+ glGetSamplerParameteriv at 12 @267
+ glGetSamplerParameterfv at 12 @268
+ glVertexAttribDivisor at 8 @269
+ glBindTransformFeedback at 8 @270
+ glDeleteTransformFeedbacks at 8 @271
+ glGenTransformFeedbacks at 8 @272
+ glIsTransformFeedback at 4 @273
+ glPauseTransformFeedback at 0 @274
+ glResumeTransformFeedback at 0 @275
+ glGetProgramBinary at 20 @276
+ glProgramBinary at 16 @277
+ glProgramParameteri at 12 @278
+ glInvalidateFramebuffer at 12 @279
+ glInvalidateSubFramebuffer at 28 @280
+ glTexStorage2D at 20 @281
+ glTexStorage3D at 24 @282
+ glGetInternalformativ at 20 @283
+
+ ; EGL dependencies
+ glCreateContext @144 NONAME
+ glDestroyContext @145 NONAME
+ glMakeCurrent @146 NONAME
+ glGetCurrentContext @147 NONAME
+ glGetProcAddress at 4 @148 NONAME
+ glBindTexImage at 4 @158 NONAME
+ glCreateRenderer @177 NONAME
+ glDestroyRenderer @178 NONAME
diff --git a/mingw-angleproject.spec b/mingw-angleproject.spec
index 4d26bc9..ca503ef 100644
--- a/mingw-angleproject.spec
+++ b/mingw-angleproject.spec
@@ -1,21 +1,29 @@
%?mingw_package_header
-%global svn_revision 2215
-%global svn_stamp 20130517
+%global snapshot_stamp 20141113
+%global snapshot_rev 30d6c255d238c3064980a22f66fecf0ef9bb58d0
+%global snapshot_rev_short %(echo %snapshot_rev | cut -c1-6)
Summary: Almost Native Graphics Layer Engine
Name: mingw-angleproject
Version: 0
-Release: 0.10.svn%{svn_revision}.%{svn_stamp}%{?dist}
+Release: 0.11.git.%{snapshot_rev_short}.%{snapshot_stamp}%{?dist}
License: BSD
Group: System Environment/Libraries
URL: http://code.google.com/p/angleproject/
# Upstream hasn't done any official releases yet
# To generate snapshot:
-# svn checkout http://angleproject.googlecode.com/svn/trunk/ angleproject
-# tar --exclude-vcs -cjvpf angleproject-r$(svnversion angleproject).tar.bz2 angleproject
-Source: angleproject-r%{svn_revision}.tar.bz2
+# git clone https://chromium.googlesource.com/angle/angle
+# tar --exclude-vcs -cjvpf angle-git-$(cd angle; git rev-parse HEAD | cut -c1-6).tar.bz2 angle
+Source0: angle-git-%{snapshot_rev_short}.tar.bz2
+
+# Additional source files taken from Qt5
+# https://qt.gitorious.org/qt/qtbase/raw/2302d386c7a1aa1a96658f79c236d6b8a59db7ac:src/3rdparty/angle/src/libGLESv2/libGLESv2_mingw32.def
+Source1: libGLESv2_mingw32.def
+
+# https://qt.gitorious.org/qt/qtbase/raw/2302d386c7a1aa1a96658f79c236d6b8a59db7ac:src/3rdparty/angle/src/libEGL/libEGL_mingw32.def
+Source2: libEGL_mingw32.def
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw64-filesystem >= 95
@@ -26,27 +34,52 @@ BuildRequires: gyp
BuildArch: noarch
-# File names are case-sensitive on Linux
-Patch0: angleproject-fix-case-sensitive-include.patch
+# Patches taken from Qt5
+# https://qt.gitorious.org/qt/qtbase/source/2302d386c7a1aa1a96658f79c236d6b8a59db7ac:src/angle/patches
+Patch0: 0000-General-fixes-for-ANGLE-2.1.patch
+Patch1: 0004-Make-it-possible-to-link-ANGLE-statically-for-single.patch
+Patch2: 0008-ANGLE-Dynamically-load-D3D-compiler-from-a-list-or-t.patch
+Patch3: 0009-ANGLE-Support-WinRT.patch
+Patch4: 0010-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch
+Patch5: 0012-ANGLE-fix-semantic-index-lookup.patch
+Patch6: 0013-ANGLE-Add-support-for-querying-platform-device.patch
+Patch7: 0014-Let-ANGLE-use-multithreaded-devices-if-necessary.patch
+Patch8: 0015-ANGLE-Fix-angle-d3d11-on-MSVC2010.patch
+Patch9: 0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch
+Patch10: 0017-ANGLE-Fix-compilation-with-D3D9.patch
+Patch11: 0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch
+
+# Undo a change from 0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch which
+# implements some missing stuff from the mingw.org toolchain, but which already
+# exists in the mingw-w64 toolchain (and causes breakage)
+Patch100: angleproject-undo-mingw-org-compatibility.patch
+
+# Same as above but introduced by a change from 0015-ANGLE-Fix-angle-d3d11-on-MSVC2010.patch
+Patch101: angleproject-undo-mingw-org-compatibility2.patch
+
+# Disable some debug code as it depends on the ID3DUserDefinedAnnotation
+# interface which isn't available in mingw-w64 yet
+# Patch for this is currently pending at http://source.winehq.org/patches/data/108405
+Patch102: angleproject-disable-debug-annotations.patch
+
+# Undo a change from 0000-General-fixes-for-ANGLE-2.1.patch which renames
+# some shader references, but which doesn't rename the precompiled shaders
+Patch103: angleproject-undo-shader-renames.patch
+
+# Prevent multiple definition errors during the final link of libGLESv2
+Patch104: angleproject-prevent-multiple-definition-errors.patch
+
+# Revert commit 4de44cb and commit 409078f as qt5-qtwebkit still depends on it
+Patch105: commit-4de44cb
+Patch106: commit-409078f
# Make sure an import library is created and the correct .def file is used during the build
-Patch2: angleproject-include-import-library-and-use-def-file.patch
-
-# .def pieces taken from http://qt.gitorious.org/qt/qtbase/commit/b2c44985e740d0a0ea86b7b9f4cc849258ac2340
-Patch3: angleproject-fix-mingw-compatibility.patch
-
-# http://qt.gitorious.org/qt/qtbase/commit/dc2bfb6f8977732e1cd5ed9faac5a32870e2967a
-# Fix typedefs for Win64
-# The long int type is incorrect for Windows 64-bit as LLP64 is used there.
-Patch4: angleproject-fix-typedefs-for-win64.patch
+Patch107: angleproject-include-import-library-and-use-def-file.patch
# WebKit depends on symbols which are used in the static library called translator_hlsl
# This static library is linked into the libGLESv2 shared library
# To allow building WebKit export the required symbols in the libGLESv2 shared library
-Patch5: angleproject-export-shader-symbols.patch
-
-# Automatically LoadLibrary("d3dcompiler_43.dll") when no other D3D compiler is already loaded yet
-Patch6: angleproject-auto-load-d3dcompiler-library.patch
+Patch108: angleproject-export-shader-symbols.patch
%description
@@ -144,13 +177,38 @@ Static version of the mingw64-angleproject library.
%prep
-%setup -q -n angleproject
-%patch0 -p0
-%patch2 -p0
-%patch3 -p0
+%setup -q -n angle
+
+# Install additional .def files
+cp %{SOURCE1} src/libGLESv2/
+cp %{SOURCE2} src/libEGL/
+
+%patch0 -p4
+%patch1 -p4
+%patch2 -p4
+%patch3 -p4
%patch4 -p4
-%patch5 -p0
-%patch6 -p1
+%patch5 -p4
+%patch6 -p4
+%patch7 -p4
+%patch8 -p4
+%patch9 -p4
+%patch10 -p4
+%patch11 -p4
+
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1 -R
+%patch106 -p1 -R
+%patch107 -p1
+%patch108 -p1
+
+# Executing .bat scripts on Linux is a no-go so make this a no-op
+echo "" > src/copy_compiler_dll.bat
+chmod +x src/copy_compiler_dll.bat
%build
@@ -174,32 +232,47 @@ for target in win32 win64 ; do
export AR=%{mingw64_ar}
fi
- gyp -D OS=win -D TARGET=$target --depth . -I ../build/common.gypi ../src/build_angle.gyp
+ gyp -D OS=win -D TARGET=$target -D MSVS_VERSION="" --depth . -I ../build/common.gypi ../src/angle.gyp
# Make sure the correct libraries are linked in
- sed -i s@'^LIBS :='@'LIBS := -ld3d9'@ ../src/libGLESv2.target.mk
+ sed -i s@'^LIBS :='@'LIBS := -ld3d9 -ldxguid'@ ../src/libGLESv2.target.mk
sed -i s@'^LIBS :='@'LIBS := -ld3d9 -ldxguid -L. -lGLESv2'@ ../src/libEGL.target.mk
make %{?_smp_mflags} V=1 CXXFLAGS="-std=c++11 -msse2 -DUNICODE -D_UNICODE -g"
# Also build static libraries (which are needed by the static Qt build)
- ${AR} rcs libGLESv2.a out/Debug/obj.target/libGLESv2/../src/common/debug.o out/Debug/obj.target/libGLESv2/../src/common/RefCountObject.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/IndexDataManager.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/VertexDataManager.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Blit.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/Buffer.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Context.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/D3DConstantTable.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Fence.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/Float16ToFloat32.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Framebuffer.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/HandleAllocator.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/libGLESv2.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/main.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Program.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/ProgramBinary.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Query.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/Renderbuffer.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/ResourceManager.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/Shader.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/Texture.o out/Debug/obj.target/libGLESv2/../src/libGLESv2/TextureSSE2.o \
- out/Debug/obj.target/libGLESv2/../src/libGLESv2/utilities.o out/Debug/obj.target/../src/libtranslator_hlsl.a \
- out/Debug/obj.target/../src/libtranslator_common.a out/Debug/obj.target/../src/libpreprocessor.a
- ${AR} rcs libEGL.a out/Debug/obj.target/libEGL/../src/common/debug.o out/Debug/obj.target/libEGL/../src/common/RefCountObject.o \
- out/Debug/obj.target/libEGL/../src/libEGL/Config.o out/Debug/obj.target/libEGL/../src/libEGL/Display.o \
- out/Debug/obj.target/libEGL/../src/libEGL/libEGL.o out/Debug/obj.target/libEGL/../src/libEGL/main.o \
- out/Debug/obj.target/libEGL/../src/libEGL/Surface.o
+ ${AR} rcs libGLESv2.a \
+ out/Debug/obj.target/src/common/*.o \
+ out/Debug/obj.target/src/common/win32/*.o \
+ out/Debug/obj.target/src/compiler/translator/*.o \
+ out/Debug/obj.target/src/compiler/translator/depgraph/*.o \
+ out/Debug/obj.target/src/compiler/translator/timing/*.o \
+ out/Debug/obj.target/src/compiler/preprocessor/*.o \
+ out/Debug/obj.target/src/third_party/compiler/*.o \
+ out/Debug/obj.target/src/third_party/murmurhash/*.o \
+ out/Debug/obj.target/src/third_party/systeminfo/*.o \
+ out/Debug/obj.target/src/libGLESv2/*.o \
+ out/Debug/obj.target/src/libGLESv2/renderer/*.o \
+ out/Debug/obj.target/src/libGLESv2/renderer/d3d/*.o \
+ out/Debug/obj.target/src/libGLESv2/renderer/d3d/d3d9/*.o \
+ out/Debug/obj.target/src/libGLESv2/renderer/d3d/d3d11/*.o
+
+ ${AR} rcs libEGL.a \
+ out/Debug/obj.target/libEGL/../src/common/RefCountObject.o \
+ out/Debug/obj.target/libEGL/../src/common/angleutils.o \
+ out/Debug/obj.target/libEGL/../src/common/debug.o \
+ out/Debug/obj.target/libEGL/../src/common/event_tracer.o \
+ out/Debug/obj.target/libEGL/../src/common/mathutil.o \
+ out/Debug/obj.target/libEGL/../src/common/tls.o \
+ out/Debug/obj.target/libEGL/../src/common/utilities.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/AttributeMap.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/Config.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/Display.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/Error.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/Surface.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/libEGL.o \
+ out/Debug/obj.target/libEGL/../src/libEGL/main.o \
+ out/Debug/obj.target/libEGL/../src/common/win32/NativeWindow.o
popd
done
@@ -232,8 +305,11 @@ cp -Rv include/* $RPM_BUILD_ROOT%{mingw64_includedir}
%{mingw32_bindir}/libGLESv2.dll
%{mingw32_includedir}/EGL
%{mingw32_includedir}/GLES2
+%{mingw32_includedir}/GLES3
%{mingw32_includedir}/GLSLANG
%{mingw32_includedir}/KHR
+%{mingw32_includedir}/angle_gl.h
+%{mingw32_includedir}/angle_windowsstore.h
%{mingw32_libdir}/libEGL.dll.a
%{mingw32_libdir}/libGLESv2.dll.a
@@ -245,10 +321,13 @@ cp -Rv include/* $RPM_BUILD_ROOT%{mingw64_includedir}
%doc LICENSE
%{mingw64_bindir}/libEGL.dll
%{mingw64_bindir}/libGLESv2.dll
-%{mingw64_includedir}/EGL
-%{mingw64_includedir}/GLES2
-%{mingw64_includedir}/GLSLANG
+%{mingw64_includedir}/EGL
+%{mingw64_includedir}/GLES2
+%{mingw64_includedir}/GLES3
+%{mingw64_includedir}/GLSLANG
%{mingw64_includedir}/KHR
+%{mingw64_includedir}/angle_gl.h
+%{mingw64_includedir}/angle_windowsstore.h
%{mingw64_libdir}/libEGL.dll.a
%{mingw64_libdir}/libGLESv2.dll.a
@@ -258,6 +337,11 @@ cp -Rv include/* $RPM_BUILD_ROOT%{mingw64_includedir}
%changelog
+* Mon Dec 29 2014 Erik van Pienbroek <epienbro at fedoraproject.org> - 0-0.11.git.30d6c2.20141113
+- Update to 20141113 snapshot (git revision 30d6c2)
+- Include all patches which were used by the Qt5 fork
+- Reverted some recent commits as they break mingw-qt5-qtwebkit 5.4
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0-0.10.svn2215.20130517
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources
index 87ed0de..5362a75 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ed7c61ccf10d14b2dad3d466b799f991 angleproject-r2215.tar.bz2
+27ccb04013f8c172293f8747eaf5a34f angle-git-30d6c2.tar.bz2
More information about the scm-commits
mailing list