diff options
Diffstat (limited to 'src/angle')
-rw-r--r-- | src/angle/patches/0010-ANGLE-fixed-usage-of-shared-handles-for-WinRT-WinPho.patch | 57 | ||||
-rw-r--r-- | src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch | 44 |
2 files changed, 101 insertions, 0 deletions
diff --git a/src/angle/patches/0010-ANGLE-fixed-usage-of-shared-handles-for-WinRT-WinPho.patch b/src/angle/patches/0010-ANGLE-fixed-usage-of-shared-handles-for-WinRT-WinPho.patch new file mode 100644 index 0000000000..8f17018e6e --- /dev/null +++ b/src/angle/patches/0010-ANGLE-fixed-usage-of-shared-handles-for-WinRT-WinPho.patch @@ -0,0 +1,57 @@ +From 5cacddc702624d64a4917a7a704dbbb92aeba53c Mon Sep 17 00:00:00 2001 +From: Oliver Wolff <oliver.wolff@qt.io> +Date: Thu, 19 May 2016 10:55:46 +0200 +Subject: [PATCH] ANGLE: fixed usage of shared handles for WinRT/WinPhone + applications + +Both checks are not relevant in Qt's context and were skipped before but +they sneaked back in with the latest ANGLE update. + +Change-Id: Ic44de5468a3254afd76ef4804d97d245676daeb1 +--- + src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 3 +++ + src/3rdparty/angle/src/libANGLE/validationEGL.cpp | 3 +++ + 2 files changed, 6 insertions(+) + +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 62badcc..0173311 100644 +--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp ++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +@@ -2618,12 +2618,15 @@ bool Renderer11::getShareHandleSupport() const + return false; + } + ++ // Qt: we don't care about the 9_3 limitation ++#if 0 + // Also disable share handles on Feature Level 9_3, since it doesn't support share handles on RGBA8 textures/swapchains. + if (mRenderer11DeviceCaps.featureLevel <= D3D_FEATURE_LEVEL_9_3) + { + mSupportsShareHandles = false; + return false; + } ++#endif + + // Find out which type of D3D11 device the Renderer11 is using + d3d11::ANGLED3D11DeviceType deviceType = getDeviceType(); +diff --git a/src/3rdparty/angle/src/libANGLE/validationEGL.cpp b/src/3rdparty/angle/src/libANGLE/validationEGL.cpp +index 972f6a7..903f51b 100644 +--- a/src/3rdparty/angle/src/libANGLE/validationEGL.cpp ++++ b/src/3rdparty/angle/src/libANGLE/validationEGL.cpp +@@ -642,11 +642,14 @@ Error ValidateCreatePbufferFromClientBuffer(Display *display, EGLenum buftype, E + return Error(EGL_BAD_ATTRIBUTE); + } + ++// On Windows Store, we know the originating texture came from D3D11, so bypass this check ++#if !defined(ANGLE_ENABLE_WINDOWS_STORE) + const Caps &caps = display->getCaps(); + if (textureFormat != EGL_NO_TEXTURE && !caps.textureNPOT && (!gl::isPow2(width) || !gl::isPow2(height))) + { + return Error(EGL_BAD_MATCH); + } ++#endif + } + + return Error(EGL_SUCCESS); +-- +2.7.0.windows.1 + diff --git a/src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch b/src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch new file mode 100644 index 0000000000..1c4ee1d513 --- /dev/null +++ b/src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch @@ -0,0 +1,44 @@ +From db13a9cf7e41207660f080827983655864df802d Mon Sep 17 00:00:00 2001 +From: Oliver Wolff <oliver.wolff@qt.io> +Date: Wed, 11 May 2016 13:51:54 +0200 +Subject: [PATCH] ANGLE: Disable support for shared handles in warp mode on + Windows < 8 + +Shared handles are not supported on Windows 7 and below. If the +according flag is set CreateTexture2D will fail with E_OUTOFMEMORY. The +check already happens with newer ANGLE versions, which we use in 5.7 +but has to happen here as well. Otherwise Qt applications running on +Windows 7 and below will crash at startup. + +Change-Id: I8f539f16dce298611fb1ec7b2f6804d4a04d04e0 +--- + .../angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +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 223e2b0..dd554f4 100644 +--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp ++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +@@ -2370,6 +2370,19 @@ unsigned int Renderer11::getReservedFragmentUniformBuffers() const + + bool Renderer11::getShareHandleSupport() const + { ++ if (mDriverType == D3D_DRIVER_TYPE_WARP) ++ { ++#if !defined(ANGLE_ENABLE_WINDOWS_STORE) ++ // Warp mode does not support shared handles in Windows versions below Windows 8 ++ OSVERSIONINFO result = { sizeof(OSVERSIONINFO), 0, 0, 0, 0, {'\0'}}; ++ if (GetVersionEx(&result) && ++ ((result.dwMajorVersion == 6 && result.dwMinorVersion < 2) || result.dwMajorVersion < 6)) ++ { ++ // WARP on Windows 7 doesn't support shared handles ++ return false; ++ } ++#endif // ANGLE_ENABLE_WINDOWS_STORE ++ } + // We only currently support share handles with BGRA surfaces, because + // chrome needs BGRA. Once chrome fixes this, we should always support them. + // PIX doesn't seem to support using share handles, so disable them. +-- +2.7.0.windows.1 + |