Repository navigation
feat(agc): upload varying guest samples of a multisampled texture no draw rendered to - #13146
Conversation
|
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.
|
|
@Prophet069 thanks for these. One problem common to all five PRs (#13145, #13146, #13147, #13148, #13149): each commit sits on main For this PR, |
…draw rendered to Sampling or storing to a multisampled R_X or Z_X color texture whose memory holds more than one repeated value now detiles the guest samples and writes them into the host target through an unsigned storage view, instead of refusing. Uniform memory keeps the exact clear; D_X, standard swizzles and compressed surfaces still throw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1d86b56 to
1c7da3a
Compare
|
Thanks, you were right: I squashed onto a moving |
|
@Prophet069 a heads-up: this branch sets the files #12916 changed back to their contents before #12916 merged ( AI-assisted: yes (Claude Code) |
|
An AMD RDNA 4 run, since the description lists an NVIDIA RTX 3080 Laptop GPU only. Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (
AI-assisted: yes (Claude Code) |
✅ NVIDIA GPU test: passedPR head
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (4 IDs in 390 tests)Skipped (40)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Windows GPU run of head Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release,
AI-assisted: yes (Claude Code). |
|
Death Stranding 2 (PPSA02015) needs this, and it works there. Linux, RTX 3080 Ti 12 GB, NVIDIA 615.71.09, Release, no input. Stack:
AI-assisted; the runs are from my machine(s). |
# Conflicts: # core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp # core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp
CnRJay
left a comment
There was a problem hiding this comment.
The evidence is in good order (main vs branch on the same GPU with validation, no new VUIDs, Death Stranding 2 reaching it). Two points on the new upload path in MultisampleTarget.cpp:
-
Barrier wider than needed. After the
DispatchMultisampleImageloop the barrier isCOMPUTE_SHADER -> ALL_COMMANDSwith colour attachment, shader and transfer read/write access. The path this replaces ended withTRANSFER -> COLOR_ATTACHMENT_OUTPUT. This runs once per created target, but it is still a full drain of everything recorded after it in the batch, and it is not tied to any consumer. Please narrow the destination to the stages that actually touch the image next (fragment shader / colour attachment output / compute), or say which consumer needs transfer and ALL_COMMANDS. -
Whole-surface host staging at creation.
guestSampleUploadbuilds a buffer ofwidth * height * samples * elementBytes(for the 1920x1080, 4-sample case that is about 33 MB for a 4-byte element) and keeps it until the recorder finishes, then dispatches inmaxStorageBufferRange-sized pieces. Is the buffer freed as soon as the recorder retires, and is there a cap if a title creates several of these in one frame? A counter for the bytes uploaded and the number of uploads per run in the test would show the cost is bounded.
✅ NVIDIA GPU test: passedPR head
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (5 IDs in 484 tests)Skipped (45)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
Sampling or storing to a multisampled R_X or Z_X color texture that no draw rendered to threw when its guest memory held more than one repeated 32-bit value.
createFillednow detiles the guest samples withMultisampleTextureLayout::Detileand writes them into the host target withDispatchMultisampleImagethrough an unsigned storage view; the staging buffer lives only until the recorder finishes. Uniform memory keeps the exact clear as before. D_X, standard swizzles and compressed surfaces still throw. The debt entry is updated; that the console samples such a surface from its guest color memory stays inferred, not measured.Tested
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(VVL vulkan-sdk-1.4.321.0; neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS),ctest --test-dir build -R <the 63 tests of agc_shader_memory_tests, agc_driver_cmask_fast_clear_tests, agc_driver_graphics_tests and agc_driver_sample_multisample_target_tests> -Von main8c8b998620and on this branch, same machine and GPU: main 63/63 passed, 0VUID-; this branch 63/63 passed, 0VUID-. New cases inSampleMultisampleTarget.cppcompare the uploaded samples with the guest bytes.sampling the 1920x1080 multisampled texture 0xc2e95f0000 of 4 samples, which no draw rendered to … does not hold one repeated 32-bit value(compute shader0xc280055c00). With it that stop is gone; the next run reached 1800 dispatches (previously 1500) and stopped later at the CMASK/DCC fast clear handled in a separate PR. Whether the upload path itself ran in that run was not logged.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)🤖 Generated with Claude Code