diff options
Diffstat (limited to 'src/angle/patches/0014-ANGLE-D3D11-Always-execute-QueryInterface.patch')
-rw-r--r-- | src/angle/patches/0014-ANGLE-D3D11-Always-execute-QueryInterface.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/angle/patches/0014-ANGLE-D3D11-Always-execute-QueryInterface.patch b/src/angle/patches/0014-ANGLE-D3D11-Always-execute-QueryInterface.patch new file mode 100644 index 0000000000..dbe618102e --- /dev/null +++ b/src/angle/patches/0014-ANGLE-D3D11-Always-execute-QueryInterface.patch @@ -0,0 +1,51 @@ +From 4d1906f0b81f2b61adf9640ae6cef9d503c33209 Mon Sep 17 00:00:00 2001 +From: Maurice Kalinowski <maurice.kalinowski@digia.com> +Date: Tue, 3 Dec 2013 14:52:18 +0100 +Subject: [PATCH] ANGLE D3D11: Always execute QueryInterface + +ASSERT removes the condition when building for release mode. However, +QueryInterface must be called in any case. Adopt to using ASSERT(false) +like in other occurrences in angle. + +This is a follow-up patch to 331bc16afd23414493b842819e0b747e8f364243 + +Change-Id: I4413bab06b5a529fcbd09bbc20828fcdcf4e4fc6 +--- + src/3rdparty/angle/src/libEGL/Surface.cpp | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp +index ee8d480..99d0c1d 100644 +--- a/src/3rdparty/angle/src/libEGL/Surface.cpp ++++ b/src/3rdparty/angle/src/libEGL/Surface.cpp +@@ -118,7 +118,12 @@ bool Surface::resetSwapChain() + #else + ABI::Windows::Foundation::Rect windowRect; + ABI::Windows::UI::Core::ICoreWindow *window; +- ASSERT(SUCCEEDED(mWindow->QueryInterface(IID_PPV_ARGS(&window)))); ++ HRESULT result = mWindow->QueryInterface(IID_PPV_ARGS(&window)); ++ if (FAILED(result)) ++ { ++ ASSERT(false); ++ return false; ++ } + window->get_Bounds(&windowRect); + width = windowRect.Width; + height = windowRect.Height; +@@ -342,7 +347,12 @@ bool Surface::checkForOutOfDateSwapChain() + #else + ABI::Windows::Foundation::Rect windowRect; + ABI::Windows::UI::Core::ICoreWindow *window; +- ASSERT(SUCCEEDED(mWindow->QueryInterface(IID_PPV_ARGS(&window)))); ++ HRESULT result = mWindow->QueryInterface(IID_PPV_ARGS(&window)); ++ if (FAILED(result)) ++ { ++ ASSERT(false); ++ return false; ++ } + window->get_Bounds(&windowRect); + int clientWidth = windowRect.Width; + int clientHeight = windowRect.Height; +-- +1.7.11.msysgit.0 + |