ra_pl: add x2bgr10/x2rgb10 special RA formats - #18364
Merged
Merged
Conversation
x2bgr10/x2rgb10 are packed formats that do not automatically get mapped by the existing ra_pl logic. They are more useful than other non-byte-aligned packed formats because they show up when dealing with > 8bit RGB content, which is more common in an HDR context. In practice, x2bgr10 is probably the only one that's going to get used, but I figured there's no harm in supporting both.
Member
|
It's fine. One nitpick though, we already have those in ra_gl and ra_d3d11, but only the one that's is needed. So if you add both bgr/rgb formats in ra_pl, I would like to keep ra_gl and ra_d3d11 in sync. |
|
Tested on top of my #18300 series with its two format commits dropped (the hwdec_cuda table and the hwdec_vulkan check removal): the restored |
kasper93
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
x2bgr10/x2rgb10 are packed formats that do not automatically get mapped by the existing ra_pl logic. They are more useful than other non-byte-aligned packed formats because they show up when dealing with > 8bit RGB content, which is more common in an HDR context.
In practice, x2bgr10 is probably the only one that's going to get used, but I figured there's no harm in supporting both.
I also experimented with adding generic logic to map packed formats, but it's a bunch of un-intuitive code and the ra format constraints mean the only accepted packed formats would be x2bgr10 and x2rgb10 anyway. To add insult to injury, you'd still need special case code in
ra_glto provide missing metadata to make the generic mapping work.With all that as the alternative, simply adding special formats to
ra_plis much easier to understand and maintain.