Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add rotation shader for rotating output #1655

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshuatam
Copy link

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: #819

@misyltoad
Copy link
Collaborator

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.

@joshuatam
Copy link
Author

joshuatam commented Dec 16, 2024

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 joshuatam force-pushed the feat-main/rotation-shader branch from 5fbd420 to 3831a9e Compare December 22, 2024 15:41
@joshuatam joshuatam force-pushed the feat-main/rotation-shader branch from 3831a9e to 90ab765 Compare December 24, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants