feature: add rotation shader for rotating output
Added a rotation shader to fix blank display problem on portrait screen with unsupported DRM rotation.
Once enabled, the DRM orientation is hardcoded to 0 degrees (left) or 180 degrees (right), and the rotation shader is hardcoded for 270 degrees rotation (counter clockwise 90 degrees)
Tested on: OneXPlayer X1 Intel
It could possibly fix an upstream issue: https://github.com/ValveSoftware/gamescope/issues/819
This shouldn't be necessary. One could just set up the regular composition scene graph and image to be rotated without an additional step here.
This shouldn't be necessary. One could just set up the regular composition scene graph and image to be rotated without an additional step here.
Do you have other suggestion on the implemention? In fact I have tried several ways to rotate the image, adding a rotation shader is the best in terms of performance and the amount of code added.
As the main problem is that, intel drm driver i915 does not support 90/270 degrees rotation on a portrait screen. So before apply the rotation shader, the image is rendered in landscape size on a portrait screen (drm rotation = normal), and then rotated after applied the rotation shader.