fix(agc): size a moved read-only buffer at the render target as its build does #9050
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9050"
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 EagleBearerYS on 2026-10-21T10:54:27Z.
What
A follow-up to #8224. Since #8224, a read-only strided buffer that starts below the render target and runs less than one stride into it is bound only up to the target.
addGuestBufferandCheckBufferAliasesapply that cut.ShaderResources::MovedReadOnlyBuffers, the check a cached build makes before it serves a draw, does not:So, from the code, a cached hit of the Boggle (CUSA03312) draw that #8224 fixed takes its vertex buffer as moved. This wasn't run in the title.
The change:
MovedReadOnlyBufferstakes the draw's target and cuts a read-only buffer as the build does.ShaderResources::BytesUpToTarget, whichaddGuestBuffer,CheckBufferAliasesandMovedReadOnlyBuffersall call, each with the target only for a read-only buffer, as #8224's second commit does.Tested
agc_driver_graphics, after #8224's alias cases: one cached build whose read-only stride-60, 4-record buffer runs 8 bytes into the render target.MovedReadOnlyBuffers' size line put back todescriptor.GetSize(), it fails in 3 of 3 runs on Linux and Windows: "a cached build whose strided buffer runs 8 bytes into the render target took it as moved for the same words and target (1 moved, the first 240 bytes)".agc_driver_graphicspasses 10 runs in a row on Linux and Windows.precise_waittiming test on Linux, which fails withmain's code too.^agc: 815 tests, 0 failed.main80565c594(with #8310 to build) and this PR atf65fda5c3, withANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1.agc_driver_graphicspasses 3 of 3. With onlyMovedReadOnlyBuffers' size line put back todescriptor.GetSize(), it fails 3 of 3 with the red line above.^agc_gave 870 passed, 3 skipped and 3 failed, the same as onmain. They name the three asagc_driver_sample_order*, which they say #9056 fixes.python3 tools/check_conventions.py --base origin/main: passed.Checklist
main27c88a8d75, and merges cleanly with currentmain(2abfb1beb4); 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 (none added).mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by gdols on 2026-10-21T14:26:32Z.
NVIDIA, Windows. GeForce RTX 3080, driver 616.92, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release,
main80565c594(+ #8310 to build), this PR atf65fda5c3,ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1.agc_driver_graphicspasses 3 of 3. With onlyMovedReadOnlyBuffers' size line put back todescriptor.GetSize(), it fails 3 of 3 with the message in the description: "a cached build whose strided buffer runs 8 bytes into the render target took it as moved for the same words and target (1 moved, the first 240 bytes)".^agc_gives 870 passed, 3 skipped and 3 failed, the same asmain; the three areagc_driver_sample_order*, fixed by #9056.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T14:32:38Z.
@gdols, thank you for the RTX 3080 run and the revert check. It's now in Tested.