Repository navigation
fix(agc): render 8_8_8_8 and 16_16_16_16 color targets with reversed component orders - #1425
Merged
adriadam10 merged 2 commits intoOct 8, 2026
Merged
Conversation
COMP_SWAP 2 and 3 store a four-component export as ABGR and ARGB from the lowest bits. Render such targets as RGBA8 and permute the pixel shader's exports through the existing component mapping (0x1b and 0x93), as the one-component swaps already do. Blending into them throws: the alpha factors would read the wrong export component.
9 tasks done
…ders Accept COMP_SWAP STD_REV and ALT_REV on 16_16_16_16 color targets and map them onto RGBA16 with the same export component mappings used for 8_8_8_8. ALT on 16_16_16_16 is still refused.
9 tasks done
9 tasks done
Collaborator
|
Checked on Linux: build + ctest 457/457, and Heads-up: #1349 and #1073 touch the same lines of |
11 tasks done
12 tasks done
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.
What
A color target of format 8_8_8_8 with
CB_COLOR_INFO.COMP_SWAP2 or 3 was refused ("unsupported color format 10 number type 0 component swap 2"). For four components these swaps are the reversed orders: SWAP_STD_REV stores the export as A, B, G, R from the lowest bits, and SWAP_ALT_REV as A, R, G, B. A title renders thousands of draws per minute into such targets. The same orders on 16_16_16_16 targets (format 12) were refused too.DecodeColorFormatreturns RGBA8 (unorm, snorm or sRGB) for those targets, with component mapping 0x1b (STD_REV) or 0x93 (ALT_REV). The pixel shader's exports are permuted through the same mapping the one-component swaps already use: memory componentctakes export component(mapping >> 2c) & 3. fix(agc): support alternate channel order in 16-bit color targets #1349 uses the same encoding for the alternate order of 16-bit targets (0xc6).Tested
agc_driver_graphicspasses with a new case. An 8_8_8_8 unorm target with COMP_SWAP 2 and 3 decodes to RGBA8 with mapping 0x1b and 0x93,ExportMappingscarries the mapping, all four channels are written, and enabling blending on it is refused.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)