Files
Ian Elliott e488d8b8da Vulkan: Implement Android pre-rotation
As an Android GLES driver on top of Vulkan, ANGLE must pre-rotate
rendering on behalf of the application.  This involves modifying the
vertex shader to multiply gl_Position with a mat2 "rotation matrix".
Not doing so means that SurfaceFlinger (SF) will perform a costly
rotation blit before presenting every image.  Setting
WindowSurfaceVk::mPreTransform to mCurrentTransform tells SF to not do
the blit.

When the surface is rotated 90 or 270 degrees, the width and height
must be swapped for:

- The swapchain images, and for any depth, stencil, and/or multisample
  attachments used with the swapchain image.

- The viewport, scissor, and render area.

Because the Metal back-end shares the TranslatorVulkan, it will define
the same preRotation (mat2) DriverUniform that is used for Vulkan.

Bug: angleproject:3502
Change-Id: I968dbe8869ba0f50de18dd41f1195e847c06b545
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2038272
Commit-Queue: Ian Elliott <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2020-02-27 01:11:16 +00:00
..
2019-11-01 17:37:15 +00:00
2019-12-15 14:44:43 +00:00