gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

feature: add rotation shader for rotating output

Open joshuatam opened this issue 1 year ago • 2 comments

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

joshuatam avatar Dec 06 '24 09:12 joshuatam

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.

misyltoad avatar Dec 13 '24 22:12 misyltoad

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.

joshuatam avatar Dec 16 '24 17:12 joshuatam