1From 5a58c6c7d97f003aa4a34ae130697dc81cc8fdf8 Mon Sep 17 00:00:00 2001 2From: Oliver Wolff <oliver.wolff@qt.io> 3Date: Wed, 22 Aug 2018 15:17:52 +0200 4Subject: [PATCH 8/8] ANGLE: winrt: Do full screen update if the the window 5 size is reduced 6 7We cannot do partial updates if the window size is reduced as this will 8result in a "pDstBox is not a valid box for the destination subresource." 9error. 10 11Change-Id: I9a8d91bca961f52e1aab1bec5321922cfc842fb3 12--- 13 .../src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp | 11 ++++++++--- 14 1 file changed, 8 insertions(+), 3 deletions(-) 15 16diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp 17index 8f76d16c30..b702450ded 100644 18--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp 19+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp 20@@ -664,9 +664,14 @@ gl::Error TextureStorage11::setData(const gl::Context *context, 21 // with compressed formats in the calling logic. 22 ASSERT(!internalFormatInfo.compressed); 23 24- const int width = destBox ? destBox->width : static_cast<int>(image->getWidth()); 25- const int height = destBox ? destBox->height : static_cast<int>(image->getHeight()); 26- const int depth = destBox ? destBox->depth : static_cast<int>(image->getDepth()); 27+ const int imageWidth = static_cast<int>(image->getWidth()); 28+ const int width = destBox ? destBox->width : imageWidth; 29+ const int imageHeight = static_cast<int>(image->getHeight()); 30+ const int height = destBox ? destBox->height : imageHeight; 31+ const int imageDepth = static_cast<int>(image->getDepth()); 32+ const int depth = destBox ? destBox->depth : imageDepth; 33+ if (imageWidth < width || imageHeight < height || imageDepth < depth) 34+ fullUpdate = true; 35 GLuint srcRowPitch = 0; 36 ANGLE_TRY_RESULT( 37 internalFormatInfo.computeRowPitch(type, width, unpack.alignment, unpack.rowLength), 38-- 392.15.0.windows.1 40 41