Repository navigation
Conversation
…its guest planes on access A guest read, DMA copy source or texture, storage, index or vertex read over a native multisample depth surface that a draw had written threw sample-preserving guest publication of native multisample depth is not implemented (Sonic Superstars PPSA06888 boykopovar#5382, Monster Hunter Wilds PPSA24191 boykopovar#7972, Onimusha PPSA27836 boykopovar#6570). The access now completes the pending fast clear and recorder work, reads the samples back in the guest layer, row, column, fragment order with the merged multisample readback, retiles them into the Z_X plane with the descriptor pipe-bank XOR through MultisampleTextureLayout, and rewrites every HTILE word to the expanded clear word (Mesa radv_get_htile_initial_value: 0xfffc000f without stencil, ZMask 0xf with the full Z range otherwise) before retiring the surface like an unwritten one. Written D16 surfaces, surfaces the device stores in another format and surfaces it cannot sample still throw with their own messages. The console HTILE after a DB decompress and its compressed plane bytes are not measured.
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This was referenced Oct 24, 2026
Ondra97
marked this pull request as ready for review
October 24, 2026 04:38
This branch has not been deployed
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
After #9950 publishes a written native multisample D32 depth surface to guest memory, its guard becomes inactive, but
releaseRetiredstill excludes multisampled surfaces. Replacing those surfaces keeps their native images and sample shadows cached after their last sampled view is released.Record completed guest publication and reclaim an inactive published owner only when no sampled view holds it. Call the existing
retirepath before removing the owner so the depth/stencil owner maps cannot retain raw pointers to the freed surface. The existing recorder keep-alive mechanism preserves resources needed by recorded GPU work. Serialize publication with the GPU mutex used by surface creation and reclamation. Inactive owners without completed publication remain cached and are documented as a remaining limitation.Depends on #9950, exact head
875fa29033c500a0f49af4c50cf3970d37fd2229, preserved as a prerequisite merge. The own change is commitf94177b01a: three files, 38 additions and three removals. It does not change sample ordering, guest layout or shader instruction semantics.Tested
Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0, Release, NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 / 32.0.16.1742.
Full Release builds pass on literal main
db6af9e0fd8c75366dabc2066dbf90117f7490d0and candidate4f64dee52dbfc4dc4c4cf374e6f24dccbf8e670e. Both use the same pinned dependencies and the realNativeMultisampleDepthexecution fixture.Same machine/GPU,
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, Khronos 1.4.363. Actual instance/device layer insertion was confirmed; neither log reports a missing requested layer. Both final runs have zero validation warnings/errors, VUIDs, skips or timeouts.a published inactive native owner remained cached without held viewsThe selection is
agc_driver_native_multisample_depth,agc_driver_native_depth_retirement,agc_driver_native_depth_clears,agc_driver_native_depth_clear_refusals,agc_driver_graphicsandpatched_libraries, run serially withctest --test-dir build -R <selection> -V. Every selected test completes within 6.4 s.The new GPU regression covers all six publication combinations: 2/4/8 samples at 5x3, and at 70x67 with pipe-bank XOR
0x8c00. It checks the published samples, HTILE and padding, keeps a native sampled view across another target allocation, verifies that its owner survives, releases the view, requires reclamation on a later allocation, then renders again at the original address. The control uses identical fixture bytes and removes only the ownDepthSurface.cppchange. Production source restoration was verified by SHA-256, followed by another successful full build and the final six tests.Conventions, strict main-sync, whitespace and registration checks pass: 1281 test executables, none built without registration. Conventions reports one existing 2196-character debt-entry warning from the #9950 prerequisite, zero errors. The full CTest suite was not run.
Overlap review checked the exact shared-file diffs, including conflicting older PRs. None implements published-owner reclamation. #9533/#9717/#9742 overlap the preserved #9950 prerequisite and already propose #9950 first; #10368/#10375 insert independent cases into the same fixture, so retain both sets of cases when merging. Recapture #7446 and buffer-alias checks #6498 are separate implementations and are excluded from this PR.
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)