fix(agc): draw a one-fragment multisampled color target as one sample with sample 0's coverage #9450
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9450"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-21T22:27:54Z.
What
A color target whose
CB_COLOR_ATTRIBhas 4 samples and 1 fragment (EQAA) threwcolor targets with fewer fragments than samples (EQAA) are unsupported. PPSA02015 draws its scene into such a target beside a 4x depth target (CB_COLOR_INFO0x10046710,CB_COLOR_ATTRIB0x2000,DB_EQAA0x112202).With one fragment, a pixel keeps what sample 0 covers. That is the truncated coverage path of #8115, so this decodes the target as one sample, keeps its coverage sample count, and draws it there. Measured with radeonsi GL on a 4-sample, 1-storage-sample framebuffer (Radeon 610M, Mesa 26.2.5, and Radeon 680M, Mesa 26.2.4): green drawn on sample 0 alone is kept, green on samples 1-3 is dropped, and a later draw on sample 0 replaces it. With 2 or 4 storage samples the same draws resolve to blends, so the one-fragment case is distinct.
radeonsi GL,
GL_AMD_framebuffer_multisample_advanced, 4 color samples, 1 storage sample, mask byglSampleMaskiWhat stays refused, so unknown behaviour still throws:
DB_EQAAwithout static anchors at the depth target's sample count (the measured configuration);si_clear.c);The first version of the decode idea is mrfelek's (#5424, c19078289).
ColorTarget::fmaskAddresscomes from #7948 (address without the pipe-bank XOR); this sets it for one-fragment targets, which #7948's multi-fragment path leaves at 0.Tested
Linux (Arch), on
main5ed5427bac.agc_driver_graphicsagc_driver_pixel_sample_coverageagc_driver_cmask_fast_clearagc_multisample_guest_accessEach new case fails without its change (decode, anchors, CMASK codes, FMASK guard).
agc_driver_pixel_sample_coveragealso passes on a Radeon 680M (RADV) and refuses the target without this change. Windows: build, ctest, tools tests and conventions show no failure that the merge base lacks.Validation layer, as CONTRIBUTING asks: the four tests above on
main5ed5427bacand on this head5d418de02d(the head after it changes only the debt doc), same machine, NVIDIA RTX 5080, driver 615.78.08, Vulkan 1.4.351, Arch Linux 7.2.11,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V, Khronos layers 1.4.363. The loader reportsInsert instance layer "VK_LAYER_KHRONOS_validation"on both sides; both pass 4 of 4 with noVUID-message on either side.PPSA02015 (on the pre-rebase head, with the open PRs it needed to reach this point) gets past this stop and next stops at 89 s on sampling a multisampled texture no draw rendered to, a separate change.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:55:59Z.
Review: CHANGES_REQUESTED
The one-fragment implementation is narrowly described and the report includes useful Radeon hardware measurements and functional cases. The PR is based on current
main, declares the #8115 prerequisite, and its eligibility, conventions, intake, labels and report checks pass. The product and relinker jobs were skipped; I did not run local tests.I’m requesting changes for two repository/evidence items before approval:
CONTRIBUTING.mdrequires the same focused tests onmainand the PR head, on the same machine and GPU, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andctest -V. Please report both runs, confirm the requested validation layer was found, compare for newly introducedVUID-messages, and include vendor/model/driver/OS. The current report provides useful multi-vendor rendering tests but not this required validation-layer comparison.Unblocks: PPSA02015without its Game bring-up discussion. The repository has Death Stranding 2 discussion #5424. Please update the line toUnblocks: PPSA02015 #5424(or usenoneif the PR should not carry a title unblock).I reviewed the new sample-count flow:
coverageSamplesretains the coverage count,samplesbecomes the one fragment/storage count, andtruncatedCoveragecarries the mixed color/depth path into pipeline keys and both attachment creation modes. I have not found a substantiated functional defect in that path during this review; the requests above are for required validation evidence and the checklist rule. The exact overlap bot output lists several same-file AGC changes, but my spot comparison found the reportedPipelineJournal.cpphunks update layout-size guards alongside distinct state fields; please keep merge coordination in view if later rebases reveal a real shared implementation hunk.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:56:00Z.
I reviewed the current one-fragment path and its live checks. The PR declares #8115 and its policy checks pass; product/relinker jobs were skipped. Because this is an AGC change, I requested the required same-machine/GPU main-vs-PR Vulkan validation-layer comparison, including confirming layer availability and comparing VUIDs. I also found the existing Death Stranding 2 Game bring-up discussion #5424; please pair it with PPSA02015 in
Unblocks.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:36:03Z.
Review: DISMISSED
The existing blocking items remain outstanding: the required validation-layer main/change pair and the
Unblocks: PPSA02015 #5424discussion reference. Since the prior review, currentmainhas advanced: this head’s merge base is275e896797, while current main is110a18ba01. Please rebase and rerun the required paired focused validation on the same hardware, then refresh conventions/overlap and the checklist. The existing hardware coverage is valuable, but it does not replace the repository’s specified VUID comparison.