Repository navigation
Conversation
…reads A title's Sleep does not count the time a bind waits for a pipeline still being built (pso_async::title_held). A title's thread can also be kept inside a call that takes no time on the console: a submission, where XCL uploads and maps tiles before the lists and a driver can compile in them, a texture's placement on reserved memory, or a pipeline built in the title's call because it got no stand-in. On an AMD RX 9070 XT a retail title's stall check still ended it after 30 s without a present, with its submission thread inside the driver and no bind waiting (reported on xcl-dev#1288). pso_async::pc_call() is a guard for such a call. A call that has lasted 250 ms or more holds the title, a shorter one does not, so an ordinary submission changes nothing. It is taken for the whole of q_execute_command_lists, in create_placed_resource_x, and around the driver's pipeline creation when that runs in the title's own call (a worker's build holds nobody). Test: a_long_pc_call_holds_the_title. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A follow-up to xcl-dev#1288 for the case @raylitebull reported when merging it (xcl-dev#1288 (comment)): on an AMD RX 9070 XT a retail title's stall check still ended it after 30 s without a present, with the title's submission thread inside the driver (
D3D12Core.dll→amdxc64.dll) and no bind waiting. xcl-dev#1288 only sees a bind's wait inresolve_wait, soSleepwent on counting.Here a call of the title into D3D12 that XCL or the PC's driver keeps for 250 ms or more holds the title as well. A shorter call holds nobody, so an ordinary submission changes nothing. Part of xcl-dev#505.
What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:pc_call(), a guard for such a call on one of the title's threads;title_held()is also true while one has lastedPC_CALL_HOLDS_AFTER(250 ms) or more;building_here(), whether this thread is a worker building a pipeline. Testa_long_pc_call_holds_the_title.crates/xcl/src/hle/d3d12x/real.rs: the guard for the whole ofq_execute_command_lists(XCL's uploads and tile mappings before the lists, the PCExecuteCommandLists, what follows it), and infinish_psoaround the driver's pipeline creation when that runs in the title's own call (no stand-in; a worker's build holds nobody).crates/xcl/src/hle/d3d12x/device_x.rs: the guard increate_placed_resource_x(a texture placed on reserved memory: the PC's reserved resource and its tile mappings).held_by_pc_callmade to answerfalse, the test fails ("a PC call has lasted 500.0099ms, but the title is not held").Tested
stable-x86_64-pc-windows-msvc; debug for the tests, release for the title.cargo build --workspace && cargo test --workspace -- --test-threads=4onfb9c082: 890 passed, 0 failed, 42 ignored (SKIPPED GPU tests:gpu_wave32_program_in_wave64_hardware,gpu_geometry_wave32_prefix_count_over_a_mask– no wave64;heap_window_out_of_memory_falls_back_to_the_switch_form– its switch is off).XCL_NETWORK=0, scripted pad, binds waiting (noXCL_PSO_WAIT_MS), one run of 330 s into its world load; the tree ismain4178e88+ XG: fix CopyFromSubresource 7-argument ABI and guard destination span xcl-dev/xcl#684 + [upstream #1880] e2e: escape embedded NUL bytes in testtitle string literals #266 + Recompiler: route compute programs through a compact backend (XCL_COMPACT_CS) xcl-dev/xcl#1316 with Recompiler: compact cases share code whose branch targets differ xcl-dev/xcl#1448's commit + this change, heap windows on: the world's set-up began at 120.3 s and the title was running at the time limit (exit0x0), with 21,455 draws and 8,192 dispatches, none skipped, 349 compute pipelines made, no GPU wait released by the watchdog, no device removal and 28.5 GB committed at the end.resolve_wait; the case this is for is the AMD one in the report above, which I cannot reproduce.Regression run (default settings)
main:
PR:
A second round of the same two binaries:
main1396 frames, PR 1383. The head is onb9b6ea6, the commit of the main block;mainhas gone on to4178e88since (no file in common with this change, and it merges cleanly).Not tested
vram::Pages, which run on the submission thread before the lists; that is why the guard covers the whole submission and a texture's placement, not only the PCExecuteCommandLists. If the thread was somewhere else again, the guard belongs there too.AI use
Duplicate check (20:36 UTC, 24 Nov): no open PR counts a long call as holding the title; read xcl-dev#1747 (removes tile-mapping stalls themselves), xcl-dev#1046 (when a stalled GPU wait is released), xcl-dev#1429 (the sync watchdog after CPU releases), xcl-dev#1442 and xcl-dev#889 (build ahead: they shorten the waits).
🤖 Generated with Claude Code
Mirror of xcl-dev#1782 (auto-synced, do not edit).