summaryrefslogtreecommitdiffstats
path: root/src/angle/patches/0001-ANGLE-Improve-Windows-Phone-Support.patch
blob: e8f11b5172f6ab9a2664c7f897e35744b3026729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
From bbc3a5f89821030dd2772cd8015070a3da9ad57e Mon Sep 17 00:00:00 2001
From: Oliver Wolff <oliver.wolff@theqtcompany.com>
Date: Mon, 29 Feb 2016 11:09:24 +0100
Subject: [PATCH 1/7] ANGLE: Improve Windows Phone Support

This contains compile fixes for Windows Phone as well as improved
orientation handling.

Change-Id: I5011e9980957ff0797db179b36c3be9cac6df497
---
 src/3rdparty/angle/src/common/platform.h           |  2 ++
 .../renderer/d3d/d3d11/DebugAnnotator11.cpp        |  2 +-
 .../src/libANGLE/renderer/d3d/d3d11/NativeWindow.h |  4 +++
 .../src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp |  8 ++++-
 .../libANGLE/renderer/d3d/d3d11/SwapChain11.cpp    | 40 ++++++++++++++++++++++
 .../d3d/d3d11/winrt/CoreWindowNativeWindow.cpp     | 33 ++++++++++++++++--
 .../d3d/d3d11/winrt/CoreWindowNativeWindow.h       | 35 ++++++++++++++++++-
 .../d3d/d3d11/winrt/InspectableNativeWindow.cpp    | 12 +++++++
 .../d3d/d3d11/winrt/InspectableNativeWindow.h      | 14 +++++++-
 src/3rdparty/angle/src/libANGLE/validationEGL.cpp  |  4 ++-
 .../src/third_party/systeminfo/SystemInfo.cpp      |  4 +--
 11 files changed, 148 insertions(+), 10 deletions(-)

diff --git a/src/3rdparty/angle/src/common/platform.h b/src/3rdparty/angle/src/common/platform.h
index 56db297..4e3851c 100644
--- a/src/3rdparty/angle/src/common/platform.h
+++ b/src/3rdparty/angle/src/common/platform.h
@@ -68,7 +68,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/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp
index f9d28e8..2e42859 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/DebugAnnotator11.cpp
@@ -77,7 +77,7 @@ bool DebugAnnotator11::getStatus()
     }
 
     return true;  // Default if initializeDevice() failed
-#elif defined(_DEBUG)
+#elif defined(_DEBUG) && (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
     static bool underCapture = true;
 
     // ID3DUserDefinedAnnotation::GetStatus doesn't work with the Graphics Diagnostics tools in
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
index f28ce4f..1c94538 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
@@ -54,6 +54,7 @@ namespace rx
 class NativeWindow
 {
   public:
+    enum RotationFlags { RotateNone = 0, RotateLeft = 1, RotateRight = 2 };
     explicit NativeWindow(EGLNativeWindowType window,
                           const egl::Config *config,
                           bool directComposition);
@@ -62,6 +63,9 @@ class NativeWindow
     bool initialize();
     bool getClientRect(LPRECT rect);
     bool isIconic();
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+    RotationFlags rotationFlags() const;
+#endif
     static bool isValidNativeWindow(EGLNativeWindowType window);
 
     HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
index f7757df..03159bb 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -10,7 +10,9 @@
 
 #include <EGL/eglext.h>
 #include <sstream>
+#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
 #include <VersionHelpers.h>
+#endif
 
 #include "common/tls.h"
 #include "common/utilities.h"
@@ -445,7 +447,11 @@ Renderer11::Renderer11(egl::Display *display)
             }
         }
 
+#if defined(ANGLE_ENABLE_WINDOWS_STORE)
+        if (requestedMajorVersion == EGL_DONT_CARE || requestedMajorVersion >= 9)
+#else
         if (requestedMajorVersion == 9 && requestedMinorVersion == 3)
+#endif
         {
             mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_3);
         }
@@ -946,12 +952,12 @@ egl::ConfigSet Renderer11::generateConfigs() const
             config.bindToTextureRGBA = (colorBufferFormatInfo.format == GL_RGBA ||
                                         colorBufferFormatInfo.format == GL_BGRA_EXT);
             config.colorBufferType = EGL_RGB_BUFFER;
-            config.configCaveat    = EGL_NONE;
             config.configID        = static_cast<EGLint>(configs.size() + 1);
             // Can only support a conformant ES2 with feature level greater than 10.0.
             config.conformant = (mRenderer11DeviceCaps.featureLevel >= D3D_FEATURE_LEVEL_10_0)
                                     ? (EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR)
                                     : 0;
+            config.configCaveat = config.conformant == EGL_NONE ? EGL_NON_CONFORMANT_CONFIG : EGL_NONE;
 
             // PresentPathFast may not be conformant
             if (mPresentPathFastEnabled)
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
index a56d3fa..9432a7f 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
@@ -222,8 +222,14 @@ EGLint SwapChain11::resetOffscreenColorBuffer(int backbufferWidth, int backbuffe
         const bool useSharedResource = !mNativeWindow.getNativeWindow() && mRenderer->getShareHandleSupport();
 
         D3D11_TEXTURE2D_DESC offscreenTextureDesc = {0};
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+        const int textureLength = std::max(backbufferWidth, backbufferHeight);
+        offscreenTextureDesc.Width = textureLength;
+        offscreenTextureDesc.Height = textureLength;
+#else
         offscreenTextureDesc.Width = backbufferWidth;
         offscreenTextureDesc.Height = backbufferHeight;
+#endif
         offscreenTextureDesc.Format = backbufferFormatInfo.texFormat;
         offscreenTextureDesc.MipLevels = 1;
         offscreenTextureDesc.ArraySize = 1;
@@ -336,8 +342,14 @@ EGLint SwapChain11::resetOffscreenDepthBuffer(int backbufferWidth, int backbuffe
             d3d11::GetTextureFormatInfo(mDepthBufferFormat, mRenderer->getRenderer11DeviceCaps());
 
         D3D11_TEXTURE2D_DESC depthStencilTextureDesc;
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+        const int textureLength = std::max(backbufferWidth, backbufferHeight);
+        depthStencilTextureDesc.Width = textureLength;
+        depthStencilTextureDesc.Height = textureLength;
+#else
         depthStencilTextureDesc.Width = backbufferWidth;
         depthStencilTextureDesc.Height = backbufferHeight;
+#endif
         depthStencilTextureDesc.Format = depthBufferFormatInfo.texFormat;
         depthStencilTextureDesc.MipLevels = 1;
         depthStencilTextureDesc.ArraySize = 1;
@@ -422,6 +434,7 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
         return EGL_SUCCESS;
     }
 
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP)
     // Can only call resize if we have already created our swap buffer and resources
     ASSERT(mSwapChain && mBackBufferTexture && mBackBufferRTView && mBackBufferSRView);
 
@@ -479,6 +492,12 @@ EGLint SwapChain11::resize(EGLint backbufferWidth, EGLint backbufferHeight)
     mFirstSwap = true;
 
     return resetOffscreenBuffers(backbufferWidth, backbufferHeight);
+#else
+    // Do nothing on Windows Phone apart from updating the internal buffer/width height
+    mWidth = backbufferWidth;
+    mHeight = backbufferHeight;
+    return EGL_SUCCESS;
+#endif
 }
 
 DXGI_FORMAT SwapChain11::getSwapChainNativeFormat() const
@@ -704,6 +723,21 @@ EGLint SwapChain11::copyOffscreenToBackbuffer(EGLint x, EGLint y, EGLint width,
     float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
     float y2 = ((y + height) / float(mHeight)) * 2.0f - 1.0f;
 
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+    const float dim = std::max(mWidth, mHeight);
+    float u1 = x / dim;
+    float v1 = y / dim;
+    float u2 = (x + width) / dim;
+    float v2 = (y + height) / dim;
+
+    const NativeWindow::RotationFlags flags = mNativeWindow.rotationFlags();
+    const bool rotateL = flags == NativeWindow::RotateLeft;
+    const bool rotateR = flags == NativeWindow::RotateRight;
+    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);
+#else
     float u1 = x / float(mWidth);
     float v1 = y / float(mHeight);
     float u2 = (x + width) / float(mWidth);
@@ -723,6 +757,7 @@ EGLint SwapChain11::copyOffscreenToBackbuffer(EGLint x, EGLint y, EGLint width,
     d3d11::SetPositionTexCoordVertex(&vertices[1], x1, y2, u1, v2);
     d3d11::SetPositionTexCoordVertex(&vertices[2], x2, y1, u2, v1);
     d3d11::SetPositionTexCoordVertex(&vertices[3], x2, y2, u2, v2);
+#endif
 
     deviceContext->Unmap(mQuadVB, 0);
 
@@ -752,8 +787,13 @@ EGLint SwapChain11::copyOffscreenToBackbuffer(EGLint x, EGLint y, EGLint width,
     D3D11_VIEWPORT viewport;
     viewport.TopLeftX = 0;
     viewport.TopLeftY = 0;
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+    viewport.Width = (rotateL || rotateR) ? mHeight : mWidth;
+    viewport.Height = (rotateL || rotateR) ? mWidth : mHeight;
+#else
     viewport.Width = static_cast<FLOAT>(mWidth);
     viewport.Height = static_cast<FLOAT>(mHeight);
+#endif
     viewport.MinDepth = 0.0f;
     viewport.MaxDepth = 1.0f;
     deviceContext->RSSetViewports(1, &viewport);
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
index 71f0e42..6a4795a 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
@@ -8,8 +8,6 @@
 
 #include "libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h"
 
-#include <windows.graphics.display.h>
-
 using namespace ABI::Windows::Foundation::Collections;
 
 namespace rx
@@ -21,6 +19,7 @@ CoreWindowNativeWindow::~CoreWindowNativeWindow()
 
 bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet *propertySet)
 {
+    mOrientationChangedEventToken.value = 0;
     ComPtr<IPropertySet> props = propertySet;
     ComPtr<IInspectable> win = window;
     SIZE swapChainSize = {};
@@ -100,6 +99,16 @@ bool CoreWindowNativeWindow::initialize(EGLNativeWindowType window, IPropertySet
 
     if (SUCCEEDED(result))
     {
+        ComPtr<ABI::Windows::Graphics::Display::IDisplayInformationStatics> displayInformation;
+        result = GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), &displayInformation);
+        if (SUCCEEDED(result))
+        {
+            result = displayInformation->GetForCurrentView(&mDisplayInformation);
+        }
+    }
+
+    if (SUCCEEDED(result))
+    {
         mNewClientRect = mClientRect;
         mClientRectChanged = false;
         return registerForSizeChangeEvents();
@@ -117,6 +126,15 @@ bool CoreWindowNativeWindow::registerForSizeChangeEvents()
         result = mCoreWindow->add_SizeChanged(sizeChangedHandler.Get(), &mSizeChangedEventToken);
     }
 
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+    ComPtr<IDisplayOrientationEventHandler> orientationChangedHandler;
+    result = sizeChangedHandler.As(&orientationChangedHandler);
+    if (SUCCEEDED(result))
+    {
+        result = mDisplayInformation->add_OrientationChanged(orientationChangedHandler.Get(), &mOrientationChangedEventToken);
+    }
+#endif
+
     if (SUCCEEDED(result))
     {
         return true;
@@ -131,7 +149,16 @@ void CoreWindowNativeWindow::unregisterForSizeChangeEvents()
     {
         (void)mCoreWindow->remove_SizeChanged(mSizeChangedEventToken);
     }
+
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+    if (mDisplayInformation)
+    {
+        (void)mDisplayInformation->remove_OrientationChanged(mOrientationChangedEventToken);
+    }
+#endif
+
     mSizeChangedEventToken.value = 0;
+    mOrientationChangedEventToken.value = 0;
 }
 
 HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
@@ -168,7 +195,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
     if (SUCCEEDED(result))
     {
 
-#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+#if 0 //(WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) // Qt: allow Windows Phone to resize, but don't modify the backing texture in the swap chain.
         // 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.
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
index 7747005..4de235a 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
@@ -12,8 +12,10 @@
 #include "libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h"
 
 #include <memory>
+#include <windows.graphics.display.h>
 
 typedef ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CUI__CCore__CCoreWindow_Windows__CUI__CCore__CWindowSizeChangedEventArgs_t IWindowSizeChangedEventHandler;
+typedef ABI::Windows::Foundation::__FITypedEventHandler_2_Windows__CGraphics__CDisplay__CDisplayInformation_IInspectable_t IDisplayOrientationEventHandler;
 
 namespace rx
 {
@@ -42,11 +44,13 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, public std::enabl
   private:
     ComPtr<ABI::Windows::UI::Core::ICoreWindow> mCoreWindow;
     ComPtr<IMap<HSTRING, IInspectable*>> mPropertyMap;
+    ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> mDisplayInformation;
+    EventRegistrationToken mOrientationChangedEventToken;
 };
 
 [uuid(7F924F66-EBAE-40E5-A10B-B8F35E245190)]
 class CoreWindowSizeChangedHandler :
-    public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IWindowSizeChangedEventHandler>
+    public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IWindowSizeChangedEventHandler, IDisplayOrientationEventHandler>
 {
   public:
     CoreWindowSizeChangedHandler() { }
@@ -78,6 +82,35 @@ class CoreWindowSizeChangedHandler :
         return S_OK;
     }
 
+        IFACEMETHOD(Invoke)(ABI::Windows::Graphics::Display::IDisplayInformation *displayInformation, IInspectable *)
+        {
+    #if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+            NativeWindow::RotationFlags flags = NativeWindow::RotateNone;
+            ABI::Windows::Graphics::Display::DisplayOrientations orientation;
+            if (SUCCEEDED(displayInformation->get_CurrentOrientation(&orientation)))
+            {
+                switch (orientation)
+                {
+                  case ABI::Windows::Graphics::Display::DisplayOrientations_Landscape:
+                    flags = NativeWindow::RotateLeft;
+                    break;
+                  case ABI::Windows::Graphics::Display::DisplayOrientations_LandscapeFlipped:
+                    flags = NativeWindow::RotateRight;
+                    break;
+                  default:
+                    break;
+                }
+            }
+            std::shared_ptr<InspectableNativeWindow> host = mHost.lock();
+            if (host)
+            {
+                host->setRotationFlags(flags);
+            }
+    #endif
+            return S_OK;
+        }
+
+
   private:
     std::weak_ptr<InspectableNativeWindow> mHost;
 };
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp
index 47a6dae..c9b203e 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp
@@ -80,6 +80,18 @@ bool NativeWindow::getClientRect(RECT *rect)
     return false;
 }
 
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+NativeWindow::RotationFlags NativeWindow::rotationFlags() const
+{
+    if (mImpl)
+    {
+        return mImpl->rotationFlags();
+    }
+
+    return NativeWindow::RotateNone;
+}
+#endif
+
 bool NativeWindow::isIconic()
 {
     return false;
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
index 4b9cf80..70e5fe7 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
@@ -36,7 +36,8 @@ class InspectableNativeWindow
         mSwapChainScale(1.0f),
         mClientRectChanged(false),
         mClientRect({0,0,0,0}),
-        mNewClientRect({0,0,0,0})
+        mNewClientRect({0,0,0,0}),
+        mRotationFlags(NativeWindow::RotateNone)
     {
         mSizeChangedEventToken.value = 0;
     }
@@ -94,6 +95,16 @@ class InspectableNativeWindow
         }
     }
 
+    NativeWindow::RotationFlags rotationFlags() const
+    {
+        return mRotationFlags;
+    }
+
+    void setRotationFlags(NativeWindow::RotationFlags flags)
+    {
+        mRotationFlags = flags;
+    }
+
   protected:
     virtual HRESULT scaleSwapChain(const SIZE &windowSize, const RECT &clientRect) = 0;
 
@@ -104,6 +115,7 @@ class InspectableNativeWindow
     RECT mClientRect;
     RECT mNewClientRect;
     bool mClientRectChanged;
+    NativeWindow::RotationFlags mRotationFlags;
 
     EventRegistrationToken mSizeChangedEventToken;
 };
diff --git a/src/3rdparty/angle/src/libANGLE/validationEGL.cpp b/src/3rdparty/angle/src/libANGLE/validationEGL.cpp
index bff3c94..972f6a7 100644
--- a/src/3rdparty/angle/src/libANGLE/validationEGL.cpp
+++ b/src/3rdparty/angle/src/libANGLE/validationEGL.cpp
@@ -269,7 +269,7 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context
         return Error(EGL_BAD_CONFIG);
     }
 
-    if (clientMajorVersion == 3 && !(configuration->conformant & EGL_OPENGL_ES3_BIT_KHR))
+    if (clientMajorVersion == 3 && !(configuration->conformant & EGL_OPENGL_ES3_BIT_KHR) && !(configuration->configCaveat & EGL_NON_CONFORMANT_CONFIG))
     {
         return Error(EGL_BAD_CONFIG);
     }
@@ -496,6 +496,7 @@ Error ValidateCreatePbufferSurface(Display *display, Config *config, const Attri
         return Error(EGL_BAD_MATCH);
     }
 
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) // On Windows Store, we know the originating texture came from D3D11, so bypass this check
     const Caps &caps = display->getCaps();
 
     EGLenum textureFormat = attributes.get(EGL_TEXTURE_FORMAT, EGL_NO_TEXTURE);
@@ -519,6 +520,7 @@ Error ValidateCreatePbufferSurface(Display *display, Config *config, const Attri
     {
         return Error(EGL_BAD_MATCH);
     }
+#endif
 
     return Error(EGL_SUCCESS);
 }
diff --git a/src/3rdparty/angle/src/third_party/systeminfo/SystemInfo.cpp b/src/3rdparty/angle/src/third_party/systeminfo/SystemInfo.cpp
index 97dfcaa..e082895 100644
--- a/src/3rdparty/angle/src/third_party/systeminfo/SystemInfo.cpp
+++ b/src/3rdparty/angle/src/third_party/systeminfo/SystemInfo.cpp
@@ -26,7 +26,7 @@
 #include <windows.h>
 #include "common/platform.h"
 
-#if _WIN32_WINNT_WINBLUE
+#if _WIN32_WINNT_WINBLUE && WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
 #include <versionhelpers.h>
 #endif
 
-- 
2.7.0.windows.1