Repository navigation
fix(agc): take a CB resolve's sample count from its source target - #2121
Conversation
Adapt the relevant AA_CONFIG case from upstream PR boykopovar#2121. A color resolve may disable rasterizer multisampling while its source still contains eight samples. Keep source, destination, geometry, EQAA, and unsupported-bit checks strict. Verify the decoded resolve fields and draw key coverage, and reject a single-sample source and unsupported coverage bits.
|
Additional platform validation on standalone PR head Windows: passed — Windows 11, supported WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja. Release / Tests: Reproduce after building the test targets: Vulkan: native AMD RX 6900 XT, driver 32.0.21045.5002. Integration limitation: a local merge against main |
3dc5175 to
04747b2
Compare
|
Confirmed needed: Fallen Legion (PPSA07645) issues a mode-3 CB resolve while Taking the sample count from the resolve source target (this PR) unblocks it. Two further MSAA-guard findings are on #1189. Repro: run |
24b0c54 to
b4dc347
Compare
DecodeColorMetadataPass treated a CB_COLOR_CONTROL resolve as one only when PA_SC_AA_CONFIG has a sample count, and checked the source against it. A title that resolves with the rasterizer single-sample fell through to the draw path and threw "only normal color rendering with copy ROP is supported (... mode resolve)". A color target's sample count is CB_COLOR_ATTRIB.NUM_SAMPLES, separate from the rasterizer's; radeonsi itself writes PA_SC_AA_CONFIG 0 for a multisampled framebuffer when rasterizer multisampling and line smoothing are off. So a resolve is decoded when either the rasterizer or CB0 is multisampled, and its sample count is CB0's. When the rasterizer is multisampled, the source still has to match it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b4dc347 to
d57f9cf
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
What
Follow-up to #419, as discussed there.
DecodeColorMetadataPasscounted a draw withCB_COLOR_CONTROLin resolve mode as a CB resolve only whenPA_SC_AA_CONFIGhad a sample count, and required the source target to match it. A title that resolves with the rasterizer single-sample fell through to the normal draw path, which refuses it with "only normal color rendering with copy ROP is supported (CB_COLOR_CONTROL 0x00cc0030, mode resolve)".A color target's own sample count is
CB_COLOR_ATTRIB.NUM_SAMPLES, separate from the rasterizer's. radeonsi itself writesPA_SC_AA_CONFIG= 0 for a multisampled framebuffer when rasterizer multisampling and line smoothing are off (si_emit_msaa_config).PPSA36082
Hades II resolves its 4x targets with no sample count in
PA_SC_AA_CONFIG. On main f145139 with the fixes it needs to get that far plus #419, its resolve draws were skipped with the error above. With this change they go through as CB resolves. (It also needs a fix for its non-standard 4x sample positions to render correctly, which is a separate follow-up.)Tested
Linux (CachyOS), x86-64, GCC, 7800X3D / RTX 4090.
agc_driver_graphics(new checks):PA_SC_AA_CONFIGcleared still decodes as a resolve, with its 2 samples taken from CB0.build.ymlrun locally on this head, rebased on main d1fd937 (SPIRV tools on, test registration check, build, libs, ctest): 1002/1004.guest_kernel_fcntlfailed only because my script ran ctest with no terminal on stdin; it passes when run from a terminal.agc_driver_pixel_ldshung the GPU once (Xid 109). It is the intermittent hang I also see on other heads, doesn't touch CB resolves, and passed in the next run on the same machine.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)