Repository navigation
fix(agc): recapture and skip refused draws on the draw finisher - #15455
Conversation
|
Hi Nesyth, Three points on
#15456 sits directly on this branch, so it picks up whatever changes here. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (4 IDs in 517 tests)Skipped (48)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
@oneandonlydean Thanks. The first two are fixed in 07ca4e1; the third needs no change. Offsets on a finisher retry. The tail now keeps the parameters from Program bytes on the retry. The worker's redo decodes again from the packet. A registered program keeps the registry's snapshot there, and an unregistered one is read again by Skip count. The worker's I'll bring #15456 onto this branch once you're happy with it. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (4 IDs in 519 tests)Skipped (48)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (9, not counted against this PR)Validation IDs already present on main (4 IDs in 519 tests)Skipped (59)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Thanks for this. The finisher restart resets everything finishDraw writes before its capture check, and RecaptureScope keeps the retry from checking again. I ran the PR's tests with the full pipeline env ( 1. A restarted relocated hit caches the donor's unpatched decode under its own key ( When the worker's lookup hits through a relocation alias ( The restart sets A later draw relocated from that entry gets the wrong shift. Repro, in
Results on lavapipe:
Suggested fix: carry the patches in the tail, and apply them on a restart when the worker hit. @@ struct DrawTail {
Pm4::DrawParameters resolvedParameters{};
+ std::vector<DrawUserPatch> userPatches;
@@ DrawVerdict Driver::draw(
- std::vector<DrawUserPatch> userPatches;
+ auto& userPatches = tail.userPatches;
@@ void Driver::restartFinishedDraw(DrawTail& tail) {
+ if (tail.drawHit && !tail.userPatches.empty()) {
+ auto patched = std::make_shared<DrawDecode>(*tail.decode);
+ for (const auto& patch : tail.userPatches) patched->programs[patch.program].userData[patch.index] = patch.value;
+ tail.decode = std::move(patched);
+ }
const auto& programs = *tail.programs;I chose carrying 2.
- if (AgcDriver::DriverDetail::DrawFinisher::Enabled()) Expect(FetchCheckedOnFinisher.load(), ...
+ if (AgcDriver::DriverDetail::DrawFinisher::Enabled() && AgcDriver::DriverDetail::DrawPipeline::Depth() != 0) Expect(FetchCheckedOnFinisher.load(), ...With it, the forced-inline run passes, and Commits to take. Three commits, directly on your head 44e8088, so they fast-forward:
git fetch https://github.com/chitters2004/AnyPS5 draft/review-15455
git merge --ff-only FETCH_HEADOr cherry-pick only what you want, for example 🤖 Generated with Claude Code |
|
One more small thing. The copy exists only so that the restart can undo @@ struct DrawTail {
- Pm4::DrawParameters resolvedParameters{};
@@ DrawVerdict Driver::draw(
drawParameters = Pm4::ResolveDraw(packet, queue);
- tail.resolvedParameters = drawParameters;
@@ DrawVerdict Driver::finishDraw(DrawTail& tail, PerformanceTimer& timing) {
- auto& drawParameters = tail.drawParameters;
+ auto drawParameters = tail.drawParameters;
@@ void Driver::restartFinishedDraw(DrawTail& tail) {
- tail.drawParameters = tail.resolvedParameters;Results:
It's the fourth commit on the same fork branch, 88402da "perf(agc): finish a draw from a copy of its resolved parameters", on top of the three from my earlier comment, so it still fast-forwards from your head 44e8088: git fetch https://github.com/chitters2004/AnyPS5 draft/review-15455
git merge --ff-only FETCH_HEADOn its own, without the earlier commits, it doesn't cherry-pick cleanly (it sits next to the relocation fix in 🤖 Generated with Claude Code |
…eline env Registers agc_driver_draw_unsupported_buffer_type_skip_refused_draw_pipeline, the skip-refused run under APS5_DRAW_PIPELINE=1, APS5_PIPELINED_DRAWS=32 and APS5_PIPELINE_DISPATCH=1. Adds a case to the draw cache relocation test: a relocated stage data hit whose data changes before its capture check is restarted, the donor's tables then point at other data, and the same draw again must still read through its own user word, not the donor's decode. CI-Tests: agc_driver_draw_cache_relocation|agc_driver_draw_unsupported_buffer_type|agc_driver_draw_recapture_on_change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mLh2ezxgHr94nrZ32MRLz
Registers agc_driver_draw_unsupported_buffer_type_skip_refused_draw_pipeline, the skip-refused run under APS5_DRAW_PIPELINE=1, APS5_PIPELINED_DRAWS=32 and APS5_PIPELINE_DISPATCH=1. Adds a case to the draw cache relocation test: a relocated stage data hit whose data changes before its capture check is restarted, the donor's tables then point at other data, and the same draw again must still read through its own user word, not the donor's decode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
A draw finished on the draw finisher (
APS5_DRAW_PIPELINE, #6946) handled two cases differently from the same draw finished on queue 0's worker. The capture check before the hand-off to the committer (capturedMemoryChanged) ran only on the worker, since its redo replays the draw from the worker's queue state. So a draw whose captured memory changed before that point was recorded with the old capture. WithAPS5_SKIP_REFUSED_DRAWS=1, a draw refused on the finisher stopped the driver instead of being skipped. The finisher now runs the check too, and on a change it captures the draw's stages again from the tail it already holds. A refused draw is reported and skipped as on the worker.RecaptureScope), as the worker's redo does.finishDraw; the conflicts are textual.Tested
Windows 11 Pro 26300, Radeon RX 7900 XTX (AMD Software 26.10.1), Ryzen 7 7800X3D, Release, MinGW-w64 GCC 15.2.
agc_driver_draw_recapture_on_change_finisherandagc_driver_draw_unsupported_buffer_type_skip_refused_finisherrun the two existing tests with the finisher on. Removing the finisher's check, the restart before the second pass or the refused-draw catch makes the matching test fail.^agc_suite, 1290 tests, has the same two failures asmain(agc_driver_direct_write_completion,agc_driver_sample_order_grid_reference). This holds with the finisher off and withAPS5_DRAW_PIPELINE=1set for every test.mainand 177 on this branch (the two finisher variants) pass. Both report the same 6 lines ofVUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605and no missing layer.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)