vcpkg/ports/angle/001-fix-uwp.patch

114 lines
6.6 KiB
Diff
Raw Normal View History

2017-06-23 21:40:16 +08:00
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: