Commit a740b193 by Ian Elliott Committed by Commit Bot

Vulkan: Rotate damage rects for 90/270 rotation

ANGLE supports the EGL_KHR_swap_buffers_with_damage extension by using the Vulkan-equivalent VK_KHR_incremental_present extension. The damage rectangles need to be rotated for 90/270-degree rotations. Test: Aztec Ruins with VVL Bug: b/157667116 Change-Id: I9a43594b30bc67ca80aeff7705b4350659207d09 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2289035Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
parent 58afe4cb
...@@ -1236,6 +1236,11 @@ angle::Result WindowSurfaceVk::present(ContextVk *contextVk, ...@@ -1236,6 +1236,11 @@ angle::Result WindowSurfaceVk::present(ContextVk *contextVk,
rect.extent.width = gl::clamp(*eglRects++, 0, width - rect.offset.x); rect.extent.width = gl::clamp(*eglRects++, 0, width - rect.offset.x);
rect.extent.height = gl::clamp(*eglRects++, 0, height - rect.offset.y); rect.extent.height = gl::clamp(*eglRects++, 0, height - rect.offset.y);
rect.layer = 0; rect.layer = 0;
if (Is90DegreeRotation(mPreTransform))
{
std::swap(rect.offset.x, rect.offset.y);
std::swap(rect.extent.width, rect.extent.height);
}
} }
presentRegion.pRectangles = vkRects.data(); presentRegion.pRectangles = vkRects.data();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment