fix(agc): add an opt-in workaround for NVIDIA depth test errors #18937
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18937"
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 lgqdaxia on 2026-11-12T14:15:36Z.
What
Read-only D32S8 draws can make later depth tests accept extra samples on the tested NVIDIA driver. In PPSA05813, the missing stencil depth-fail updates produce straight shadow stripes across the character's face and neck.
Add
APS5_READONLY_DEPTH_BOUNDS_COMPARE=1as an opt-in workaround, disabled by default. Eligible draws retain their native depth bounds and use read-onlyGREATER_OR_EQUALat viewport depth 1. Samples surviving those bounds already pass this comparison. Other draw states retain their original behavior.This uses the fixed-depth comparison technique from #9737.
Before (left) / enabled (right)
Tested
Windows 11 Pro (26300), NVIDIA GeForce RTX 3080 Laptop GPU, driver 621.14; MinGW GCC 15.2.0.
3200/2048become2048/2048; depth, stencil and history color stay byte-identical.0, SYNC-HAZARD0in both arms.State.cpp,DrawDecode.cppandGraphics.cppcompiled successfully.Validation refs — 2026-11-12, Windows/NVIDIA
Production compilation and CPU checks:
55d1dece34+bf6fae80b7. Game-frame comparison: frozeneb499dddc5runtime with the same production change. The current branch rebases that implementation onto389e0e17fc; the production diff is preserved.Standalone results
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)