Repository navigation
feat(agc): render into SW_64KB_Z_X color targets - #5506
Merged
oneandonlydean merged 1 commit intoOct 14, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
SW_64KB_Z_X (0x18) color targets use the texture equations and 64 KiB block geometry of that swizzle mode, including the equation bits above the block that R_X targets already apply. PPSA12361 renders the R32 float copy of its depth into one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
Collaborator
|
The full build is green on this head. Before it goes in it needs one run by someone other than the author on the title this is for (title ID, GPU/OS, before/after on current |
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
Color targets with the
SW_64KB_Z_Xswizzle mode (0x18) stopped withAGC graphics: unsupported color tile mode. PPSA12361 (Transport Fever 2: Console Edition) renders into one in every frame of a map: the single-sample R32 float target its DB depth copy writes (CB_COLOR_ATTRIB3 = 0x4dc60000, 2688x1512), which its ambient occlusion pass then samples.ColorTileMode::Z64KBXmaps toTextureTileMode::kZ64KBXand uses that mode's texture equations and 64 KiB block geometry, as feat(agc): support 64 KiB display XOR color targets #4318 did forSW_64KB_D_X. It gets its own equation-cache slot.SW_64KB_R_X, the Z_X equation has bits above the 64 KiB block (the inter-block pipe/bank swizzle), so the layout applies the equation to the block coordinates as it does for R_X targets. Without that, offsets outside the first block of a row differ from the texture equation.docs/dev/debt/libSceAgcDriver.md.The equations themselves are unchanged: the texture tiling tests already check
SW_64KB_Z_Xaddresses against AMD addrlib GFX10, and the new color tests check the color layout against those equations.Tested
Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce MX450 (driver 581.83).
agc_driver_graphics_tests: the observed descriptor decodes asZ64KBX, maps tokZ64KBX, keeps the 64 KiB alignment and XOR flag, and an FMASK swizzle mode of another family is refused. The 64 KiB layout loop now covers Z_X: for 1 to 16 bytes per element and a 0x4600 XOR, offsets across block boundaries match the Z_X equation, the size matches the texture geometry, and tiling round-trips.DecodeStatesplits a Z_X color base into its block address and pipe/bank XOR for 0, 0x4600 and 0xff00. All graphics tests pass.agc_driver_uint8x4_color_target_tests: a UINT16_ABGR export into a Z_X target, without and with a 0x4600 XOR, lands at the right guest bytes, with resident targets and withAPS5_NO_RESIDENT_TARGETS=1.mainat8d98e8851.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)