renderer: preserve concurrent BDA page-fault reports #1137
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1137
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1137/head"
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?
@Fayberr on GitHub · 2026-10-07 13:36 UTC · original
Fayberr:fix/bda-fault-bitmap-atomic→main· +318 −9 · 5 files · 5 commits · closed without mergingConcurrent shader invocations can lose BDA page-fault reports when they update different bits in the same bitmap word.
RecordBdaFaultcurrently performs a separate load, OR and store, so one invocation can overwrite another's report.This replaces that sequence with a device-scoped relaxed atomic OR. Existing dispatch and readback synchronization handles visibility.
The host reader also needs to respect the report area's capacity. The parser's raw count can exceed the 1,023 stored addresses, causing the callback to read entries from the next area. This clamps consumption to the stored capacity. Excess reports are still dropped by the existing parser; this does not add overflow recovery.
The capacity guard overlaps #869 and is kept in a separate commit. If an equivalent guard lands first, that commit can be dropped.
Two regressions use the existing native compute-test harness. The producer test checks contended updates across workgroups, mapped-page controls, pre-existing bits and neighboring words. The readback test exercises the production parser, deferred callback and real cache acquisition, including overflow, adjacent-area isolation and ring reuse.
Automated testing performed:
96eb681band passed 192 producer dispatches and 40 production parser/callback cycles on an RTX 3080 Ti.shader_recompiler_computeandcompute_meta_clear_classificationat the sameResourceMaterialization.cpp:1397assertion.Native Windows testing used separate MinGW compatibility adjustments excluded from this PR. Generated producer SPIR-V passed validation; native Vulkan validation layers were not explicitly enabled. PR #925 was excluded from the final comparison. No game compatibility or performance improvement is claimed.
AI assistance: Codex assisted with investigation, implementation, test development and automated testing.
Pull request closed