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

Support for RGB565 render format for GUD #8320

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kennylevinsen
Copy link
Member

The GUD driver needs to use RGB565 for performance reasons, but exposes XRGB8888 with the driver doing a conversion in that case, making a fallback insufficient.

Extend the bit depth option to allow lowering to a maximum of 6 bits per channel.

Depends on https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4824 to have any use.

@mstoeckl
Copy link
Contributor

mstoeckl commented Sep 1, 2024

Note: wlroots!4824 is not needed to test this, as RGB565 is often supported with the DRM and wayland backends for wlroots.

Setting bit depth to 6 worked fine with this PR; the only problem with the code that I noticed is that the error message in sway/commands/output/render_bit_depth.c, "Invalid bit depth. Must be a value in (8|10).", should be updated to say something like "(6|8|10)".

GUD devices uses RGB565 by default for performance reasons. Allow
specifying render_bit_depth 6 to pick this format. The definition works
out if you consider hte maximum number of bits per channel instead of
the average.
@kennylevinsen
Copy link
Member Author

"Invalid bit depth. Must be a value in (8|10)."

Good point, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants