From 1b7c692e24f8e0f224a75db8e8f1556d8d367054 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 22 Aug 2018 15:17:52 +0200 Subject: [PATCH 06/17] ANGLE: winrt: Do full screen update if the the window size is reduced We cannot do partial updates if the window size is reduced as this will result in a "pDstBox is not a valid box for the destination subresource." error. Change-Id: I9a8d91bca961f52e1aab1bec5321922cfc842fb3 --- src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp index fa1adda79..e49968c2a 100644 --- a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp @@ -764,9 +764,14 @@ angle::Result TextureStorage11::setData(const gl::Context *context, Context11 *context11 = GetImplAs(context); - const int width = destBox ? destBox->width : static_cast(image->getWidth()); - const int height = destBox ? destBox->height : static_cast(image->getHeight()); - const int depth = destBox ? destBox->depth : static_cast(image->getDepth()); + const int imageWidth = static_cast(image->getWidth()); + const int width = destBox ? destBox->width : imageWidth; + const int imageHeight = static_cast(image->getHeight()); + const int height = destBox ? destBox->height : imageHeight; + const int imageDepth = static_cast(image->getDepth()); + const int depth = destBox ? destBox->depth : imageDepth; + if (imageWidth < width || imageHeight < height || imageDepth < depth) + fullUpdate = true; GLuint srcRowPitch = 0; ANGLE_CHECK_GL_MATH(context11, internalFormatInfo.computeRowPitch(type, width, unpack.alignment, -- 2.24.1.windows.2