renderer: preserve concurrent BDA page-fault reports #1138
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!1138
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1138/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:39 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.
@coderabbitai[bot] on GitHub · 2026-10-07 13:51 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
742eeb0b-365c-4ebe-87a4-22ac9be32bb5📥 Commits
Reviewing files that changed from the base of the PR and between
d2413fc2eband2047306a99.📒 Files selected for processing (5)
CMakeLists.txtsrc/graphics/host_gpu/renderer/cache/faultManager.cppsrc/graphics/host_gpu/renderer/cache/faultManager.hsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterMemory.cpptests/ShaderRecompilerComputeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
The changes make BDA fault bitmap updates atomic and cap the fault count processed by
FaultManager. New compute tests cover bitmap contents and production fault-buffer readback, including report limits and deferred page registration. CTest entries and command-line selectors allow each check to run separately.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
20473No demonstrated blocker remains for the concurrent fault-reporting and bounded-readback changes; proceed with normal validation.
🚥 Pre-merge checks | ✅ 4 | ❓ 1
❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 1 unsupported, 1 too large.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed