fix(agc): read zero for vertex attributes behind a null V# #1969
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1969"
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 lubaxe on 2026-10-09T03:26:02Z.
What
A vertex attribute whose V# is all zero has no address, no records and no format. Its
DST_SELfields are 0, which selects 0, so on hardware every fetch through it reads 0.DecodeVertexFormatthrewunsupported vertex format 0for it, which stopped PPSA12544 after its intro.NullVertexDescriptorrecognizes the all-zero V#.DecodeVertexFormatgives it an R32 float format of the attribute's component count.VertexBufferReadSizeandVertexBufferExtentreturn that format's size (at most 16 bytes) instead of a guest range.zeroVertexBuffer: 16 zeroed bytes created with the device, next toemptyBuffer. The layout gives the attribute stride 0.TechnicalDebt.md(Functional).Tested
nullVertexDescriptorTestsinagc_driver_graphics: 1 to 4 components, sizes within the zero buffer, and format 0 with an address still rejected. Without the decoder change it fails withunsupported vertex format 0.ctest: 487 of 488 passed. The failure isagc_driver_pixel_lds, which also fails on unmodifiedmainon this GPU.agc_driver_recorder_tests, run directly: passed.tut_01. With eager write-back the scene renders correctly. Its lazy write-back problem is separate (#1970).tools/check_conventions.py --base origin/mainpasses.Conflicts with #1968 only in
tests/Graphics.cpp, where both add a test at the same place. I'll rebase whichever merges second.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-09T04:36:42Z.
Linux results, since this was tested on Windows only. Everything passes here.
Nobara 44 (Linux 7.2), GCC 16.2.1, Release,
BUILD_TESTING=ON. This PR merged ontomainf1451396cleanly.mainf1451396main+ this PRctest -R agc_driver -j1-E agc_driver)The CPU failure is
guest_dynamic_loader, which fails the same way onmain.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T05:17:22Z.
This conflicts with main again after today's merges (
Draw.cpp,tests/Graphics.cpp,TechnicalDebt.md); could you rebase? It passed testing and is otherwise ready.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T07:03:21Z.
Rebased onto current
main(conflicts inDraw.cpp,tests/Graphics.cpp,TechnicalDebt.md) as requested.mainnow zeroes out-of-range vertex fetches per attribute (zeroed[]/zeroVertexBuffer(context, attribute)), so a null V# goes through that branch (NullVertexDescriptor(attribute) || VertexFetchOutOfRange(attribute)). The device-wideContext::zeroVertexBufferis dropped as redundant.EmptyBufferBytescheck from the new test (the buffer is now sized to the attribute); TechnicalDebt wording adjusted.Rebuilt, libSceAgcDriver ctest 303/303, conventions check passes. Merging on green CI.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T07:23:01Z.
Rebased onto current
mainagain (conflict intests/Graphics.cpp, next to the newstoreAtFlipTests; both kept). Also dropped the staleEmptyBufferBytescheck from the new test, since the zero buffer is sized to the attribute now.Rebuilt, libSceAgcDriver ctest 304/304. Merging on green CI.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T07:25:36Z.
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.
main)docs/dev/TechnicalDebt.mdL426docs/dev/TechnicalDebt.mdL426