summaryrefslogtreecommitdiffstats
path: root/src/angle/patches
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-09-18 11:51:20 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 08:53:35 +0200
commit1a334f8135d4be7b73b39ac736af0e722c864e83 (patch)
treecc0b7703b815e9fca858e8eecd7eb556e186998c /src/angle/patches
parentd84ed9a92ae0ce96b843c9dd5c263c6a0925405b (diff)
ANGLE: Update to version 2446
Update ANGLE and reapply patches. Patch changes: "Dynamically resolve functions of dwmapi.dll" Removed; ANGLE no longer uses DWM API "Make it possible to link ANGLE statically for single-thread use" Avoid name collision by using ANGLE-style getCurrent() "Fix build when SSE2 is not available." Added guard for __cpuid(), which is not available on ARM "Make DX9/DX11 mutually exclusive" Adjustments due to underlying code changes "ANGLE: Avoid memory copies on buffers when data is null" Removed; fixed upstream "Add missing intrin.h include for __cpuid" Removed; fixed upstream Change-Id: I4f3d850fc555d3194ddc05e0b51c4966d33f7eaf Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/angle/patches')
-rw-r--r--src/angle/patches/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch75
-rw-r--r--src/angle/patches/0001-Make-it-possible-to-link-ANGLE-statically-for-single.patch168
-rw-r--r--src/angle/patches/0004-Fix-black-screen-after-minimizing-OpenGL-window-with.patch6
-rw-r--r--src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch29
-rw-r--r--src/angle/patches/0006-Make-DX9-DX11-mutually-exclusive.patch105
-rw-r--r--src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch12
-rw-r--r--src/angle/patches/0008-ANGLE-DX11-Prevent-assert-when-view-is-minimized-or-.patch12
-rw-r--r--src/angle/patches/0009-ANGLE-Avoid-memory-copies-on-buffers-when-data-is-nu.patch72
-rw-r--r--src/angle/patches/0010-Add-missing-intrin.h-include-for-__cpuid.patch30
-rw-r--r--src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch12
10 files changed, 179 insertions, 342 deletions
diff --git a/src/angle/patches/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch b/src/angle/patches/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch
deleted file mode 100644
index b259aa3f80..0000000000
--- a/src/angle/patches/0001-Dynamically-resolve-functions-of-dwmapi.dll.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 211954dffc6a0ee52db130017ae4bea00e80748f Mon Sep 17 00:00:00 2001
-From: Friedemann Kleint <Friedemann.Klient@digia.com>
-Date: Mon, 18 Mar 2013 15:35:13 +0200
-Subject: [PATCH 1/6] Dynamically resolve functions of dwmapi.dll.
-
-The library is not present on Windows XP, for which /DELAYLOAD
-is used in ANGLE. However, as this causes problems with MinGW,
-use dynamic resolution.
-
-Task-number: QTBUG-27741
-Change-Id: I16214d6f98a184d89858c50ee5306371ea25469e
----
- src/3rdparty/angle/src/libEGL/Surface.cpp | 39 ++++++++++++++++++++++++++++-----------
- 1 file changed, 28 insertions(+), 11 deletions(-)
-
-diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp
-index 78203b0..5ece724 100644
---- a/src/3rdparty/angle/src/libEGL/Surface.cpp
-+++ b/src/3rdparty/angle/src/libEGL/Surface.cpp
-@@ -71,6 +71,9 @@ Surface::~Surface()
-
- bool Surface::initialize()
- {
-+ typedef HRESULT (STDAPICALLTYPE *PtrDwmIsCompositionEnabled)(BOOL*);
-+ typedef HRESULT (STDAPICALLTYPE *PtrDwmSetPresentParameters)(HWND, DWM_PRESENT_PARAMETERS *);
-+
- if (!resetSwapChain())
- return false;
-
-@@ -78,17 +81,31 @@ bool Surface::initialize()
- // to minimize the amount of queuing done by DWM between our calls to
- // present and the actual screen.
- if (mWindow && (getComparableOSVersion() >= versionWindowsVista)) {
-- BOOL isComposited;
-- HRESULT result = DwmIsCompositionEnabled(&isComposited);
-- if (SUCCEEDED(result) && isComposited) {
-- DWM_PRESENT_PARAMETERS presentParams;
-- memset(&presentParams, 0, sizeof(presentParams));
-- presentParams.cbSize = sizeof(DWM_PRESENT_PARAMETERS);
-- presentParams.cBuffer = 2;
--
-- result = DwmSetPresentParameters(mWindow, &presentParams);
-- if (FAILED(result))
-- ERR("Unable to set present parameters: 0x%08X", result);
-+ // Resolve dwmapi.dll functions dynamically as the Library is
-+ // not present on Windows XP. Alternatively, /DELAYLOAD could be used.
-+ static PtrDwmIsCompositionEnabled dwmIsCompositionEnabled = 0;
-+ static PtrDwmSetPresentParameters dwmSetPresentParameters = 0;
-+ if (!dwmIsCompositionEnabled) {
-+ if (const HMODULE dwmLibrary = LoadLibraryW(L"dwmapi.dll")) {
-+ dwmIsCompositionEnabled =
-+ (PtrDwmIsCompositionEnabled)GetProcAddress(dwmLibrary, "DwmIsCompositionEnabled");
-+ dwmSetPresentParameters =
-+ (PtrDwmSetPresentParameters)GetProcAddress(dwmLibrary, "DwmSetPresentParameters");
-+ }
-+ }
-+ if (dwmIsCompositionEnabled && dwmSetPresentParameters) {
-+ BOOL isComposited;
-+ HRESULT result = dwmIsCompositionEnabled(&isComposited);
-+ if (SUCCEEDED(result) && isComposited) {
-+ DWM_PRESENT_PARAMETERS presentParams;
-+ memset(&presentParams, 0, sizeof(presentParams));
-+ presentParams.cbSize = sizeof(DWM_PRESENT_PARAMETERS);
-+ presentParams.cBuffer = 2;
-+
-+ result = dwmSetPresentParameters(mWindow, &presentParams);
-+ if (FAILED(result))
-+ ERR("Unable to set present parameters: 0x%08X", result);
-+ }
- }
- }
-
---
-1.8.1.msysgit.1
-
diff --git a/src/angle/patches/0001-Make-it-possible-to-link-ANGLE-statically-for-single.patch b/src/angle/patches/0001-Make-it-possible-to-link-ANGLE-statically-for-single.patch
index 9133ac73ae..9de8c54fb6 100644
--- a/src/angle/patches/0001-Make-it-possible-to-link-ANGLE-statically-for-single.patch
+++ b/src/angle/patches/0001-Make-it-possible-to-link-ANGLE-statically-for-single.patch
@@ -1,35 +1,34 @@
-From cbe9afef7cd467c41353e8a41544d86807be7dd2 Mon Sep 17 00:00:00 2001
+From f1eeb288ae18f3015f435fc2df25ec1eb0f15e1a Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@digia.com>
-Date: Thu, 14 Feb 2013 09:40:30 +0100
-Subject: [PATCH] Make it possible to link ANGLE statically for single-thread
- use.
+Date: Sat, 14 Sep 2013 11:07:17 +0300
+Subject: [PATCH] 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 | 3 +-
- src/3rdparty/angle/src/libEGL/main.cpp | 58 ++++++++++++++--------------
- src/3rdparty/angle/src/libGLESv2/main.cpp | 32 ++++++++++-----
- 3 files changed, 53 insertions(+), 40 deletions(-)
+ src/3rdparty/angle/include/KHR/khrplatform.h | 2 +-
+ src/3rdparty/angle/src/libEGL/main.cpp | 35 ++++++++++++++++++++--------
+ src/3rdparty/angle/src/libGLESv2/main.cpp | 21 ++++++++++++++---
+ 3 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h
-index 56c676c..18a104e 100644
+index 8ec0d19..541bfa9 100644
--- a/src/3rdparty/angle/include/KHR/khrplatform.h
+++ b/src/3rdparty/angle/include/KHR/khrplatform.h
-@@ -97,7 +97,8 @@
+@@ -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 dc24c4f..614bcf6 100644
+index 424ec3f..7dea5fc 100644
--- a/src/3rdparty/angle/src/libEGL/main.cpp
+++ b/src/3rdparty/angle/src/libEGL/main.cpp
@@ -10,6 +10,8 @@
@@ -41,178 +40,161 @@ index dc24c4f..614bcf6 100644
static DWORD currentTLS = TLS_OUT_OF_INDEXES;
extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
-@@ -86,76 +88,72 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
+@@ -86,74 +88,87 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
return TRUE;
}
-+static inline egl::Current *current()
-+{
-+ return (egl::Current*)TlsGetValue(currentTLS);
-+}
++#endif // !QT_OPENGL_ES_2_ANGLE_STATIC
+
-+#else // !QT_OPENGL_ES_2_ANGLE_STATIC
-+
-+static egl::Current *current()
+ namespace egl
+ {
++Current *getCurrent()
+{
++#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
++ return (Current*)TlsGetValue(currentTLS);
++#else
+ // No precautions for thread safety taken as ANGLE is used single-threaded in Qt.
-+ static egl::Current curr = { EGL_SUCCESS, EGL_OPENGL_ES_API, EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE };
++ static Current curr = { EGL_SUCCESS, EGL_OPENGL_ES_API, EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE };
+ return &curr;
++#endif
+}
+
-+#endif // QT_OPENGL_ES_2_ANGLE_STATIC
-+
- namespace egl
- {
void setCurrentError(EGLint error)
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- current->error = error;
-+ current()->error = error;
++ Current *current = getCurrent();
+
+ current->error = error;
}
EGLint getCurrentError()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->error;
-+ return current()->error;
++ Current *current = getCurrent();
+
+ return current->error;
}
void setCurrentAPI(EGLenum API)
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- current->API = API;
-+ current()->API = API;
++ Current *current = getCurrent();
+
+ current->API = API;
}
EGLenum getCurrentAPI()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->API;
-+ return current()->API;
++ Current *current = getCurrent();
+
+ return current->API;
}
void setCurrentDisplay(EGLDisplay dpy)
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- current->display = dpy;
-+ current()->display = dpy;
++ Current *current = getCurrent();
+
+ current->display = dpy;
}
EGLDisplay getCurrentDisplay()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->display;
-+ return current()->display;
++ Current *current = getCurrent();
+
+ return current->display;
}
void setCurrentDrawSurface(EGLSurface surface)
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- current->drawSurface = surface;
-+ current()->drawSurface = surface;
++ Current *current = getCurrent();
+
+ current->drawSurface = surface;
}
EGLSurface getCurrentDrawSurface()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->drawSurface;
-+ return current()->drawSurface;
++ Current *current = getCurrent();
+
+ return current->drawSurface;
}
void setCurrentReadSurface(EGLSurface surface)
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- current->readSurface = surface;
-+ current()->readSurface = surface;
++ Current *current = getCurrent();
+
+ current->readSurface = surface;
}
EGLSurface getCurrentReadSurface()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->readSurface;
-+ return current()->readSurface;
- }
- }
++ Current *current = getCurrent();
+ return current->readSurface;
+ }
diff --git a/src/3rdparty/angle/src/libGLESv2/main.cpp b/src/3rdparty/angle/src/libGLESv2/main.cpp
-index 6e678c2..3853e41 100644
+index 6d7a241..730a6ac 100644
--- a/src/3rdparty/angle/src/libGLESv2/main.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/main.cpp
-@@ -14,6 +14,8 @@
+@@ -11,6 +11,8 @@
- #include "libGLESv2/Framebuffer.h"
+ #include "libGLESv2/Context.h"
+#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
+
static DWORD currentTLS = TLS_OUT_OF_INDEXES;
extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
-@@ -72,14 +74,30 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
+@@ -69,11 +71,24 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
return TRUE;
}
-+static gl::Current *current()
-+{
-+ return (gl::Current*)TlsGetValue(currentTLS);
-+}
-+
-+#else // !QT_OPENGL_ES_2_ANGLE_STATIC
++#endif // !QT_OPENGL_ES_2_ANGLE_STATIC
+
-+static inline gl::Current *current()
+ namespace gl
+ {
++Current *getCurrent()
+{
++#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
++ return (Current*)TlsGetValue(currentTLS);
++#else
+ // No precautions for thread safety taken as ANGLE is used single-threaded in Qt.
+ static gl::Current curr = { 0, 0 };
+ return &curr;
++#endif
+}
+
-+#endif // QT_OPENGL_ES_2_ANGLE_STATIC
-+
- namespace gl
- {
void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface)
{
- Current *current = (Current*)TlsGetValue(currentTLS);
-+ Current *curr = current();
-
-- current->context = context;
-- current->display = display;
-+ curr->context = context;
-+ curr->display = display;
++ Current *current = getCurrent();
- if (context && display && surface)
- {
-@@ -89,9 +107,7 @@ void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface)
+ current->context = context;
+ current->display = display;
+@@ -86,7 +101,7 @@ void makeCurrent(Context *context, egl::Display *display, egl::Surface *surface)
Context *getContext()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->context;
-+ return current()->context;
- }
++ Current *current = getCurrent();
- Context *getNonLostContext()
-@@ -115,9 +131,7 @@ Context *getNonLostContext()
+ return current->context;
+ }
+@@ -112,7 +127,7 @@ Context *getNonLostContext()
egl::Display *getDisplay()
{
- Current *current = (Current*)TlsGetValue(currentTLS);
--
-- return current->display;
-+ return current()->display;
- }
++ Current *current = getCurrent();
- IDirect3DDevice9 *getDevice()
+ return current->display;
+ }
--
-1.8.0.msysgit.0
+1.8.1.msysgit.1
diff --git a/src/angle/patches/0004-Fix-black-screen-after-minimizing-OpenGL-window-with.patch b/src/angle/patches/0004-Fix-black-screen-after-minimizing-OpenGL-window-with.patch
index 29852c57fa..6eb84fd02e 100644
--- a/src/angle/patches/0004-Fix-black-screen-after-minimizing-OpenGL-window-with.patch
+++ b/src/angle/patches/0004-Fix-black-screen-after-minimizing-OpenGL-window-with.patch
@@ -1,7 +1,7 @@
-From 0b8f4889511d7aa8f9f07b16dbf204f378e127a6 Mon Sep 17 00:00:00 2001
+From 991dfbdfc018cb30bc1ac4df429411680b47d674 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen <miikka.heikkinen@digia.com>
-Date: Mon, 18 Mar 2013 16:27:07 +0200
-Subject: [PATCH 3/6] Fix black screen after minimizing OpenGL window with
+Date: Sat, 14 Sep 2013 11:07:45 +0300
+Subject: [PATCH] Fix black screen after minimizing OpenGL window with
ANGLE
CreateTexture will fail on zero dimensions, so just release old target
diff --git a/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch b/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch
index 72211aeee0..840f6dc36e 100644
--- a/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch
+++ b/src/angle/patches/0005-Fix-build-when-SSE2-is-not-available.patch
@@ -1,7 +1,7 @@
-From 61abac6f8da2ed1ca3ab74c8c65e5fd1be3d85ad Mon Sep 17 00:00:00 2001
+From af7cb8e35774f5cba15256cb463da8c1c4d533f3 Mon Sep 17 00:00:00 2001
From: Andy Shaw <andy.shaw@digia.com>
-Date: Mon, 18 Mar 2013 16:36:40 +0200
-Subject: [PATCH 4/6] Fix build when SSE2 is not available.
+Date: Sat, 14 Sep 2013 11:25:53 +0300
+Subject: [PATCH] Fix build when SSE2 is not available.
Although SSE2 support is detected at runtime it still may not be
available at build time, so we have to ensure it only uses SSE2
@@ -9,9 +9,30 @@ when it is available at build time too.
Change-Id: I86c45a6466ab4cec79aa0f62b0d5230a78ad825a
---
+ src/3rdparty/angle/src/libGLESv2/mathutil.h | 2 ++
src/3rdparty/angle/src/libGLESv2/renderer/Image9.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
+ 2 files changed, 6 insertions(+)
+diff --git a/src/3rdparty/angle/src/libGLESv2/mathutil.h b/src/3rdparty/angle/src/libGLESv2/mathutil.h
+index bb48b94..0835486 100644
+--- a/src/3rdparty/angle/src/libGLESv2/mathutil.h
++++ b/src/3rdparty/angle/src/libGLESv2/mathutil.h
+@@ -93,6 +93,7 @@ inline bool supportsSSE2()
+ return supports;
+ }
+
++#if defined(_M_IX86) || defined(_M_AMD64) // ARM doesn't provide __cpuid()
+ int info[4];
+ __cpuid(info, 0);
+
+@@ -102,6 +103,7 @@ inline bool supportsSSE2()
+
+ supports = (info[3] >> 26) & 1;
+ }
++#endif
+
+ checked = true;
+
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Image9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Image9.cpp
index b3dcc59..53030b7 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Image9.cpp
diff --git a/src/angle/patches/0006-Make-DX9-DX11-mutually-exclusive.patch b/src/angle/patches/0006-Make-DX9-DX11-mutually-exclusive.patch
index 1e7ab82771..1e618d43c7 100644
--- a/src/angle/patches/0006-Make-DX9-DX11-mutually-exclusive.patch
+++ b/src/angle/patches/0006-Make-DX9-DX11-mutually-exclusive.patch
@@ -1,19 +1,22 @@
-From a5c113dda327ad3015312c2836b794929d4771ff Mon Sep 17 00:00:00 2001
+From c2eb5746cdf65091932558ac48ae1e6175d45a3c Mon Sep 17 00:00:00 2001
From: Andrew Knight <andrew.knight@digia.com>
-Date: Thu, 21 Mar 2013 17:12:02 +0200
-Subject: [PATCH 5/6] Make DX9/DX11 mutually exclusive
+Date: Sat, 14 Sep 2013 12:01:19 +0300
+Subject: [PATCH] Make DX9/DX11 mutually exclusive
-ANGLE dx11proto supports DX9 fallback when DX11 is unavailable. This
-patch removes the fallback mechanism and requires that the library be
-chosen at build time (by defining ANGLE_ENABLE_D3D11). This is required
-for WinRT, because d3d9 is not a support library on that platform.
+ANGLE supports selecting the renderer on creation, choosing between
+D3D11 and D3D9 backends. This patch removes that feature, and makes the
+D3D version a compile-time decision. This makes the binary size smaller
+(no extra render is built) and ensures compatibility with Windows Runtime,
+which supports only Direct3D 11.
+
+Change-Id: Id9473e0e631721083fe4026d475e37603a144c37
---
- src/3rdparty/angle/src/common/RefCountObject.cpp | 1 -
- src/3rdparty/angle/src/common/debug.cpp | 4 ++++
- src/3rdparty/angle/src/libGLESv2/Texture.cpp | 6 +++++-
- src/3rdparty/angle/src/libGLESv2/precompiled.h | 9 ++++++---
- src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp | 37 +++++++++++--------------------------
- 5 files changed, 26 insertions(+), 31 deletions(-)
+ src/3rdparty/angle/src/common/RefCountObject.cpp | 1 -
+ src/3rdparty/angle/src/common/debug.cpp | 4 +++
+ src/3rdparty/angle/src/libGLESv2/Texture.cpp | 6 +++-
+ src/3rdparty/angle/src/libGLESv2/precompiled.h | 3 ++
+ .../angle/src/libGLESv2/renderer/Renderer.cpp | 37 +++++++---------------
+ 5 files changed, 24 insertions(+), 27 deletions(-)
diff --git a/src/3rdparty/angle/src/common/RefCountObject.cpp b/src/3rdparty/angle/src/common/RefCountObject.cpp
index 0364adf..c1ef90c 100644
@@ -25,23 +28,23 @@ index 0364adf..c1ef90c 100644
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
diff --git a/src/3rdparty/angle/src/common/debug.cpp b/src/3rdparty/angle/src/common/debug.cpp
-index 2333740..438d397 100644
+index 2333740..9b93256 100644
--- a/src/3rdparty/angle/src/common/debug.cpp
+++ b/src/3rdparty/angle/src/common/debug.cpp
@@ -8,7 +8,11 @@
#include "common/debug.h"
#include "common/system.h"
-+#ifdef ANGLE_ENABLE_D3D11
-+typedef DWORD D3DCOLOR;
-+#else
++#ifndef ANGLE_ENABLE_D3D11
#include <d3d9.h>
++#else
++typedef DWORD D3DCOLOR;
+#endif
namespace gl
{
diff --git a/src/3rdparty/angle/src/libGLESv2/Texture.cpp b/src/3rdparty/angle/src/libGLESv2/Texture.cpp
-index ae83037..461357a 100644
+index ae83037..72c0a8a 100644
--- a/src/3rdparty/angle/src/libGLESv2/Texture.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/Texture.cpp
@@ -14,7 +14,11 @@
@@ -49,65 +52,66 @@ index ae83037..461357a 100644
#include "libGLESv2/mathutil.h"
#include "libGLESv2/utilities.h"
-#include "libGLESv2/renderer/Blit.h"
-+#if defined(ANGLE_ENABLE_D3D11)
-+# define D3DFMT_UNKNOWN DXGI_FORMAT_UNKNOWN
++#ifndef ANGLE_ENABLE_D3D11
++# include "libGLESv2/renderer/Blit.h"
+#else
-+# include "libGLESv2/renderer/Blit.h"
++# define D3DFMT_UNKNOWN DXGI_FORMAT_UNKNOWN
+#endif
#include "libGLESv2/Renderbuffer.h"
#include "libGLESv2/renderer/Image.h"
#include "libGLESv2/renderer/Renderer.h"
diff --git a/src/3rdparty/angle/src/libGLESv2/precompiled.h b/src/3rdparty/angle/src/libGLESv2/precompiled.h
-index a850d57..b8b043c 100644
+index a850d57..50dec6b 100644
--- a/src/3rdparty/angle/src/libGLESv2/precompiled.h
+++ b/src/3rdparty/angle/src/libGLESv2/precompiled.h
@@ -32,9 +32,12 @@
#include <unordered_map>
#include <vector>
--#include <d3d9.h>
--#include <D3D11.h>
--#include <dxgi.h>
-+#if defined(ANGLE_ENABLE_D3D11)
-+# include <D3D11.h>
-+# include <dxgi.h>
++#ifndef ANGLE_ENABLE_D3D11
+ #include <d3d9.h>
+#else
-+# include <d3d9.h>
+ #include <D3D11.h>
+ #include <dxgi.h>
+#endif
#include <D3Dcompiler.h>
#ifdef _MSC_VER
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
-index 8fd3425..64e52c1 100644
+index d1d234b..21ad223 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
-@@ -10,14 +10,13 @@
+@@ -11,8 +11,11 @@
#include "libGLESv2/main.h"
#include "libGLESv2/Program.h"
#include "libGLESv2/renderer/Renderer.h"
--#include "libGLESv2/renderer/Renderer9.h"
--#include "libGLESv2/renderer/Renderer11.h"
--#include "libGLESv2/utilities.h"
--
--#if !defined(ANGLE_ENABLE_D3D11)
--// Enables use of the Direct3D 11 API, when available
--#define ANGLE_ENABLE_D3D11 0
-+#if defined(ANGLE_ENABLE_D3D11)
-+# include "libGLESv2/renderer/Renderer11.h"
-+# define D3DERR_OUTOFVIDEOMEMORY MAKE_HRESULT( 1, 0x876, 380 )
++#ifndef ANGLE_ENABLE_D3D11
+ #include "libGLESv2/renderer/Renderer9.h"
+#else
-+# include "libGLESv2/renderer/Renderer9.h"
+ #include "libGLESv2/renderer/Renderer11.h"
++#endif
+ #include "libGLESv2/utilities.h"
+ #include "third_party/trace_event/trace_event.h"
+
+@@ -21,6 +24,10 @@
+ #define ANGLE_ENABLE_D3D11 0
#endif
-+#include "libGLESv2/utilities.h"
- #if !defined(ANGLE_COMPILE_OPTIMIZATION_LEVEL)
- #define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3
-@@ -174,27 +173,13 @@ rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, bool softwareDevi
++#ifndef D3DERR_OUTOFVIDEOMEMORY
++#define D3DERR_OUTOFVIDEOMEMORY MAKE_HRESULT(1, 0x876, 380)
++#endif
++
+ #ifdef __MINGW32__
+
+ #ifndef D3DCOMPILER_DLL
+@@ -192,34 +199,14 @@ rx::Renderer *glCreateRenderer(egl::Display *display, HDC hDc, EGLNativeDisplayT
{
rx::Renderer *renderer = NULL;
EGLint status = EGL_BAD_ALLOC;
-
-- if (ANGLE_ENABLE_D3D11)
+- if (ANGLE_ENABLE_D3D11 ||
+- displayId == EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ||
+- displayId == EGL_D3D11_ONLY_DISPLAY_ANGLE)
- {
- renderer = new rx::Renderer11(display, hDc);
-
@@ -120,14 +124,19 @@ index 8fd3425..64e52c1 100644
- {
- return renderer;
- }
+- else if (displayId == EGL_D3D11_ONLY_DISPLAY_ANGLE)
+- {
+- return NULL;
+- }
-
- // Failed to create a D3D11 renderer, try creating a D3D9 renderer
- delete renderer;
- }
-+#if defined(ANGLE_ENABLE_D3D11)
++#if ANGLE_ENABLE_D3D11
+ renderer = new rx::Renderer11(display, hDc);
+#else
+ bool softwareDevice = (displayId == EGL_SOFTWARE_DISPLAY_ANGLE);
renderer = new rx::Renderer9(display, hDc, softwareDevice);
-
+#endif
diff --git a/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch b/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch
index 63e5bd635b..5779d68e70 100644
--- a/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch
+++ b/src/angle/patches/0007-ANGLE-Fix-typedefs-for-Win64.patch
@@ -1,19 +1,21 @@
-From a8f8f0858f59e6b8e344dfb0bb87e264aac0a13f Mon Sep 17 00:00:00 2001
+From 2c7319083bc7bac6faafdf29b3a1d5440abf1313 Mon Sep 17 00:00:00 2001
From: Jonathan Liu <net147@gmail.com>
-Date: Thu, 21 Mar 2013 17:28:54 +0200
-Subject: [PATCH 6/6] ANGLE: Fix typedefs for Win64
+Date: Sat, 14 Sep 2013 11:32:01 +0300
+Subject: [PATCH] ANGLE: Fix typedefs for Win64
The long int type is incorrect for Windows 64-bit as LLP64 is used
there.
+
+Change-Id: Ibbe6f94bffd511ab1285020c89874021a762c2af
---
src/3rdparty/angle/include/KHR/khrplatform.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/3rdparty/angle/include/KHR/khrplatform.h b/src/3rdparty/angle/include/KHR/khrplatform.h
-index b169773..18a104e 100644
+index 541bfa9..001e925 100644
--- a/src/3rdparty/angle/include/KHR/khrplatform.h
+++ b/src/3rdparty/angle/include/KHR/khrplatform.h
-@@ -222,10 +222,17 @@ typedef signed char khronos_int8_t;
+@@ -221,10 +221,17 @@ typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
diff --git a/src/angle/patches/0008-ANGLE-DX11-Prevent-assert-when-view-is-minimized-or-.patch b/src/angle/patches/0008-ANGLE-DX11-Prevent-assert-when-view-is-minimized-or-.patch
index 47ecc25f0c..10b36c2096 100644
--- a/src/angle/patches/0008-ANGLE-DX11-Prevent-assert-when-view-is-minimized-or-.patch
+++ b/src/angle/patches/0008-ANGLE-DX11-Prevent-assert-when-view-is-minimized-or-.patch
@@ -1,6 +1,6 @@
-From 654677720bd856b59387cfd034f441eba8c0e97f Mon Sep 17 00:00:00 2001
+From 6f4600a842bbc7438c8d330305de82b960598ad3 Mon Sep 17 00:00:00 2001
From: Andrew Knight <andrew.knight@digia.com>
-Date: Thu, 4 Apr 2013 14:21:58 +0300
+Date: Sun, 15 Sep 2013 00:18:44 +0300
Subject: [PATCH] ANGLE DX11: Prevent assert when view is minimized or size
goes to 0x0
@@ -18,10 +18,10 @@ Change-Id: Ia60c4c694090d03c1da7f43c56e90b925c8eab6d
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp
-index 5ece724..8387443 100644
+index 311790c..b47a7bc 100644
--- a/src/3rdparty/angle/src/libEGL/Surface.cpp
+++ b/src/3rdparty/angle/src/libEGL/Surface.cpp
-@@ -172,9 +172,16 @@ bool Surface::resetSwapChain()
+@@ -135,9 +135,16 @@ bool Surface::resetSwapChain()
bool Surface::resizeSwapChain(int backbufferWidth, int backbufferHeight)
{
@@ -40,10 +40,10 @@ index 5ece724..8387443 100644
if (status == EGL_CONTEXT_LOST)
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain11.cpp
-index 87422be..98f8875 100644
+index a50db3b..0da58cb 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain11.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/SwapChain11.cpp
-@@ -368,6 +368,9 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
+@@ -369,6 +369,9 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
return EGL_BAD_ACCESS;
}
diff --git a/src/angle/patches/0009-ANGLE-Avoid-memory-copies-on-buffers-when-data-is-nu.patch b/src/angle/patches/0009-ANGLE-Avoid-memory-copies-on-buffers-when-data-is-nu.patch
deleted file mode 100644
index cecff5c0e8..0000000000
--- a/src/angle/patches/0009-ANGLE-Avoid-memory-copies-on-buffers-when-data-is-nu.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From cde4cd6155791355872f635491630c21c791e7f4 Mon Sep 17 00:00:00 2001
-From: Andrew Knight <andrew.knight@digia.com>
-Date: Fri, 5 Apr 2013 15:11:59 +0300
-Subject: [PATCH] ANGLE: Avoid memory copies on buffers when data is null
-
-With data=0, ANGLE can crash when setting the buffer data. As this
-should be a legal operation, don't perform a memcpy when data is null.
-
-Change-Id: I3fa1260482549b1da50d7a68001a65decb98f258
----
- src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp | 22 ++++++++++++++++------
- src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp | 3 ++-
- 2 files changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp
-index 4c37bdb..7fe9e6b 100644
---- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp
-+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp
-@@ -182,7 +182,8 @@ void BufferStorage11::setData(const void* data, unsigned int size, unsigned int
- return gl::error(GL_OUT_OF_MEMORY);
- }
-
-- memcpy(mappedResource.pData, data, size);
-+ if (data)
-+ memcpy(mappedResource.pData, data, size);
-
- context->Unmap(mStagingBuffer, 0);
- }
-@@ -211,12 +212,21 @@ void BufferStorage11::setData(const void* data, unsigned int size, unsigned int
- mBufferSize = 0;
- }
-
-- D3D11_SUBRESOURCE_DATA initialData;
-- initialData.pSysMem = data;
-- initialData.SysMemPitch = size;
-- initialData.SysMemSlicePitch = 0;
-
-- result = device->CreateBuffer(&bufferDesc, &initialData, &mBuffer);
-+ if (data)
-+ {
-+ D3D11_SUBRESOURCE_DATA initialData;
-+ initialData.pSysMem = data;
-+ initialData.SysMemPitch = size;
-+ initialData.SysMemSlicePitch = 0;
-+
-+ result = device->CreateBuffer(&bufferDesc, &initialData, &mBuffer);
-+ }
-+ else
-+ {
-+ result = device->CreateBuffer(&bufferDesc, NULL, &mBuffer);
-+ }
-+
- if (FAILED(result))
- {
- return gl::error(GL_OUT_OF_MEMORY);
-diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp
-index 7fc14fc..4468461 100644
---- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp
-+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp
-@@ -54,7 +54,8 @@ void BufferStorage9::setData(const void* data, unsigned int size, unsigned int o
- }
-
- mSize = std::max(mSize, offset + size);
-- memcpy(reinterpret_cast<char*>(mMemory) + offset, data, size);
-+ if (data)
-+ memcpy(reinterpret_cast<char*>(mMemory) + offset, data, size);
- }
-
- void BufferStorage9::clear()
---
-1.8.1.msysgit.1
-
diff --git a/src/angle/patches/0010-Add-missing-intrin.h-include-for-__cpuid.patch b/src/angle/patches/0010-Add-missing-intrin.h-include-for-__cpuid.patch
deleted file mode 100644
index ebe3de4dc9..0000000000
--- a/src/angle/patches/0010-Add-missing-intrin.h-include-for-__cpuid.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 142312b5cbea10257b6d3693b48817ae657018eb Mon Sep 17 00:00:00 2001
-From: Kai Koehne <kai.koehne@digia.com>
-Date: Mon, 22 Apr 2013 16:36:17 +0200
-Subject: [PATCH] Add missing intrin.h include for __cpuid
-
-This is already fixed upstream in
-
-https://codereview.appspot.com/8615046/patch/1/2
-
-Change-Id: I4b9e865f6b5622c484418a8381334381bc256887
----
- src/3rdparty/angle/src/libGLESv2/mathutil.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/3rdparty/angle/src/libGLESv2/mathutil.h b/src/3rdparty/angle/src/libGLESv2/mathutil.h
-index 672c443..bb48b94 100644
---- a/src/3rdparty/angle/src/libGLESv2/mathutil.h
-+++ b/src/3rdparty/angle/src/libGLESv2/mathutil.h
-@@ -9,6 +9,8 @@
- #ifndef LIBGLESV2_MATHUTIL_H_
- #define LIBGLESV2_MATHUTIL_H_
-
-+#include <intrin.h>
-+
- #include "common/system.h"
- #include "common/debug.h"
-
---
-1.8.1.msysgit.1
-
diff --git a/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch b/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch
index f104a273cc..9189501b59 100644
--- a/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch
+++ b/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch
@@ -1,6 +1,6 @@
-From 82fd5de3ae5e242730fdaf8044f17227337d881c Mon Sep 17 00:00:00 2001
+From 6d8be1da6a5a5177289200247f98e0200e0e3df3 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@digia.com>
-Date: Wed, 10 Jul 2013 14:00:13 +0200
+Date: Sat, 14 Sep 2013 11:38:47 +0300
Subject: [PATCH] Fix compilation of libGLESv2 with older MinGW-w64 headers
Fix compilation of libGLESv2 for mingw-headers predating MinGW-w64
@@ -18,11 +18,11 @@ Change-Id: I31272a1a991c4fc0f1611f8fb7510be51d6bb925
1 file changed, 19 insertions(+)
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
-index 41cdb8b..218356c 100644
+index 70b9326..d1d234b 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
-@@ -22,6 +22,25 @@
- #define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3
+@@ -21,6 +21,25 @@
+ #define ANGLE_ENABLE_D3D11 0
#endif
+#ifdef __MINGW32__
@@ -48,5 +48,5 @@ index 41cdb8b..218356c 100644
{
--
-1.8.3.msysgit.0
+1.8.1.msysgit.1