aboutsummaryrefslogtreecommitdiff
path: root/ports/angle/001-fix-uwp.patch
blob: bae1c87244eca598e611d0edb53b17181fc25a59 (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
diff --git "a//src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp"
index dd37ace8..9116b9e6 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp"
@@ -141,6 +141,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
                                                 unsigned int width,
                                                 unsigned int height,
                                                 bool containsAlpha,
+												unsigned int samples,
                                                 IDXGISwapChain1 **swapChain)
 {
     if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 ||
@@ -154,7 +155,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device,
     swapChainDesc.Height = height;
     swapChainDesc.Format = format;
     swapChainDesc.Stereo = FALSE;
-    swapChainDesc.SampleDesc.Count = 1;
+    swapChainDesc.SampleDesc.Count = samples;
     swapChainDesc.SampleDesc.Quality = 0;
     swapChainDesc.BufferUsage =
         DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER;
diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h"
index d43bf0ba..77b4ae95 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h"
@@ -32,7 +32,8 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, public std::enabl
                             DXGI_FORMAT format,
                             unsigned int width,
                             unsigned int height,
-                            bool containsAlpha,
+                            bool containsAlpha, 
+						    unsigned int samples,
                             IDXGISwapChain1 **swapChain) override;
 
   protected:
diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h"
index 3e67269f..a66935ce 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h"
@@ -53,6 +53,7 @@ class InspectableNativeWindow
                                     unsigned int width,
                                     unsigned int height,
                                     bool containsAlpha,
+		                            unsigned int samples,
                                     IDXGISwapChain1 **swapChain) = 0;
 
     bool getClientRect(RECT *rect)
diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp"
index 2ef2235c..284fccbb 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp"
@@ -89,6 +89,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device,
                                              DXGI_FORMAT format,
                                              UINT width,
                                              UINT height,
+										     UINT samples,
                                              IDXGISwapChain **swapChain)
 {
     if (mImpl)
@@ -96,7 +97,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device,
         IDXGIFactory2 *factory2     = d3d11::DynamicCastComObject<IDXGIFactory2>(factory);
         IDXGISwapChain1 *swapChain1 = nullptr;
         HRESULT result =
-            mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, &swapChain1);
+            mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, samples, &swapChain1);
         SafeRelease(factory2);
         *swapChain = static_cast<IDXGISwapChain *>(swapChain1);
         return result;
diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h"
index 996fd3a1..97a2c2c4 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h"
@@ -34,6 +34,7 @@ class NativeWindow11WinRT : public NativeWindow11
                             DXGI_FORMAT format,
                             UINT width,
                             UINT height,
+						    UINT samples,
                             IDXGISwapChain **swapChain) override;
 
     void commitChange() override;
diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp"
index c6d07fc8..89d9f870 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp"
@@ -246,6 +246,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device,
                                                     unsigned int width,
                                                     unsigned int height,
                                                     bool containsAlpha,
+													unsigned int samples,
                                                     IDXGISwapChain1 **swapChain)
 {
     if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 ||
@@ -259,7 +260,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device,
     swapChainDesc.Height = height;
     swapChainDesc.Format = format;
     swapChainDesc.Stereo = FALSE;
-    swapChainDesc.SampleDesc.Count = 1;
+    swapChainDesc.SampleDesc.Count = samples;
     swapChainDesc.SampleDesc.Quality = 0;
     swapChainDesc.BufferUsage =
         DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER;
diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h"
index f9a2fc0e..dc5c804e 100644
--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h"
+++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h"
@@ -27,6 +27,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, public std::e
                             unsigned int width,
                             unsigned int height,
                             bool containsAlpha,
+						    unsigned int samples,
                             IDXGISwapChain1 **swapChain) override;
 
   protected: