Repository navigation
Conversation
|
Error 921 localized on main On A wait before the grouped release was insufficient. Releasing one alias can reactivate another and queue more mapping work. In a scratch change limited to the fixture, I waited for the mapping fence via RTX 3080 Ti / 621.35, Windows 11 build 26300, Rust 1.99.1 MSVC, debug. Current-baseline retest With D3D12 validation enabled, the serial title-texture suite stopped with error 921 on both On the integrated tree, the stock queue-ordering and timeout-retention tests each passed in a fresh process with no reported validation errors or skips. The existing mirror-upload and placed-texture GPU readback tests also passed individually on both trees. These runs leave the resource involved in the suite failure unidentified. RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, debug. Results on earlier revisionsTested Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (NVIDIA 621.35), Rust 1.99.1 MSVC, debug. The run confirmed XCL selected the real RTX 3080 Ti backend. Commit 07e6199d
Not tested Full workspace suite, AMD, retail titles, and frame-rate impact. AI use Codex with GPT-6.2 Sol ran the tests and drafted this report. Retest at 90b45fb The focused title-texture suite passed on the same RTX 3080 Ti setup, with 10 passed, 0 failed, 0 ignored and no reported skips. This includes the current head’s queue-ordering and timeout-retention tests. I selected the hardware with I tested the PR head in isolation. After the #451 merge, Git reports a conflict in Codex with GPT-6.2 Sol ran the retest and drafted this update. D3D12 debug-layer follow-up at 90b45fb With Windows Graphics Tools installed, XCL confirmed the debug layer was active on the RTX 3080 Ti. The queue-ordering and timeout-retention tests both reported pass. The overall synthetic title-texture suite did not complete successfully. The debug callback reported message 921, a resource reaching final release while a queue still referenced it. This was a separate run from the earlier 10/10 result with validation off. I did not identify which resource was released. One ownership check before rebasing: Windows 11 build 26300, driver 621.35, Rust 1.99.1 MSVC, debug. Retail behavior and integration with latest main were outside this run. Codex with GPT-6.2 Sol ran the diagnostic pass, reviewed resource ownership, and drafted this update. |
|
Tested RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed, so the debug-layer tests run), rustc 1.100.0 MSVC, debug, Pass: 677 passed, 0 failed, 41 ignored. SKIPPED: only the 2 Run and written with Claude Code (Claude Opus 5.5). |
|
Test report on AMD RDNA3: RX 7800 XT (16 GB, wave32 and wave64), driver 32.0.32015.7029, Ryzen 7 9800X3D, Windows 11 Pro 10.0.26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug build. No retail data was used. The PR's own runs are all on NVIDIA, so this adds an AMD GPU with 64-lane waves. Tested: the PR head
Not tested: a regression run on a title, a release build, the head merged onto current AI use: Claude Code ran the commands and drafted this comment; the runs are real runs on the hardware above. |
07e6199 to
aa34274
Compare
aa34274 to
90b45fb
Compare
|
Tested on an RTX 3080 against Setup: RTX 3080 10 GB, driver 610.88, 32 GB RAM with ~15–17 GB used by other programs. Release builds of
All smoke runs reported Not tested:
The same numbers are posted on the other PRs: #451, #465. Test runs and this report: Claude Code (Claude Opus 5.5). |
|
Long-run data point on RTX 3060 Ti 8 GB (Ryzen 7 9800X3D, driver 32.0.16.1742, Windows 11): with this PR's direction plus the rest of the texture-upload work, a retail run survives its old crash point and reaches world streaming with the frame rate intact. Build: main Result: clean exit at the 600 s timer, 16434 frames. On this machine a 600 s run on the older stack died at ~395 s with 0xc0000005 during world loading (~26.6 GB commit). This run held 60 presents / 2 s from t≈26 s through t≈470 s - no intro dip at all (it used to be 4-8 fps for two minutes) - then streamed the world: a brief 20 presents / 2 s stretch around t≈480 s, back to 60, and at t≈598 s: 24.9 GB commit, 12.5 GB local + 4.6 GB non-local video on the 8 GB card, no device removal, no crash. Not attributing the whole effect to this PR alone - it is the combined stack - but the CPU-wait removal is the piece that matches gw1337x's profiling in #283 (submit-thread stalls in Not tested: this PR in isolation on the retail title; no visual assessment (unattended run). AI use: GPT-6.2 Astra (API model selector) in DSH ran the build and the run and wrote this comment; the human contributor reviewed it. |
|
Independent AMD RDNA4 check on clean PR head Tested on Radeon RX 9060 XT (driver
10 passed, 0 failed, 0 ignored, no skips. XCL confirmed it used the hardware D3D12 backend. The same-queue readbacks matched the uploaded bytes. The timeout test kept the blocked upload in flight, then retired it after the fence was signaled and verified the texture contents. The existing CPU-write and remap test also passed. The three focused GPU tests passed again on a separate run. The D3D12 debug layer was unavailable, so this run adds no debug-layer coverage. Full workspace tests and performance were outside this check. AI use: OpenAI Codex (GPT-6.2 Sol) ran the tests and drafted this report. |
… CPU wait title_textures::refresh runs on the title's thread before each of its submits and uploaded the CPU's writes to its textures on XCL's own queue, then waited on the CPU until the GPU had run them (texture::upload_batch). While a retail title streams its world with video memory past the card, those waits are long: thread dumps show its submit thread blocked in fence::wait under refresh, presents drop to a few per 20 s, and the title's watchdog ends it on the loading screen. When the submitting queue is a DIRECT queue on the texture's device, the upload list now runs on that queue, ahead of the title's lists, so the GPU orders the copies before the work that samples them, with no cross-queue wait. A fence on that queue retires each batch's allocator, list and staging buffers at later submits; over 512 MB in flight the oldest batches are waited for, and a batch whose wait fails or times out stays in flight. Compute and copy queues, and a queue of another device, keep the upload queue and its wait. texture::submit_batch is upload_batch without the wait.
90b45fb to
4a514ae
Compare
|
Lifetime question at head
Scenario: a texture kept in step is uploaded at the next DIRECT submit, and the title makes its final Possible fix: keep the batch's I haven't shown that a title actually releases this early. This is from reading the code. AI-assisted (Claude Code). |
…copy non-coherent reads safely Integrates upstream PRs ivall#455 and ivall#751: - Submit title texture upload batches directly on the title's direct queue without per-batch CPU fence waits, reclaiming staging buffers asynchronously and ordering vram tile updates before each submit (ivall#455). - Copy title texture bytes outside the coherent UMA window through a reusable thread-local ReadProcessMemory buffer so concurrent page decommits cannot fault (ivall#751).
|
Independent NVIDIA RTX 5080 build/test run and code review at head Code Review Findings (in addition to @upipibi's destination-resource lifetime catch)
Tested
Not tested
AI use: Antigravity (Gemini 4 Neon) performed the code review, ran the RTX 5080 workspace tests, and drafted this comment. |
…copy non-coherent reads safely Integrates upstream PRs ivall#455 and ivall#751: - Submit title texture upload batches directly on the title's direct queue without per-batch CPU fence waits, reclaiming staging buffers asynchronously and ordering vram tile updates before each submit (ivall#455). - Copy title texture bytes outside the coherent UMA window through a reusable thread-local ReadProcessMemory buffer so concurrent page decommits cannot fault (ivall#751).
…copy non-coherent reads safely Integrates upstream PRs ivall#455 and ivall#751: - Submit title texture upload batches directly on the title's direct queue without per-batch CPU fence waits, reclaiming staging buffers asynchronously and ordering vram tile updates before each submit (ivall#455). - Copy title texture bytes outside the coherent UMA window through a reusable thread-local ReadProcessMemory buffer so concurrent page decommits cannot fault (ivall#751).
…copy non-coherent reads safely Integrates upstream PRs ivall#455 and ivall#751: - Submit title texture upload batches directly on the title's direct queue without per-batch CPU fence waits, reclaiming staging buffers asynchronously and ordering vram tile updates before each submit (ivall#455). - Copy title texture bytes outside the coherent UMA window through a reusable thread-local ReadProcessMemory buffer so concurrent page decommits cannot fault (ivall#751).
|
Code read of
When this is stacked under #640/#782, AI use: Claude Code, Claude Sonnet 5.5, read the code at the head above and drafted this; a person checked it before posting. |
|
Holding off on merge until the three open review issues are resolved: (1) retaining destination |
…copy non-coherent reads safely Integrates upstream PRs xcl-dev#455 and xcl-dev#751: - Submit title texture upload batches directly on the title's direct queue without per-batch CPU fence waits, reclaiming staging buffers asynchronously and ordering vram tile updates before each submit (xcl-dev#455). - Copy title texture bytes outside the coherent UMA window through a reusable thread-local ReadProcessMemory buffer so concurrent page decommits cannot fault (xcl-dev#751).
|
Measurement at Time in
Where the time goes inside the uploads with this PR, in the longest refreshes (2 runs, every upload went to the title queue):
The write-watch look, the range rebuild, and So for the world-load stall on this card, the detile (#1512 / #1513) and the hash are the larger parts; this PR's change alone did not shorten it. No device removal in these 4 runs (grahamster2 saw two on an RTX 3080 at an earlier head). Not tested: the review fixes asked for above; AI use: Claude Code (Claude Opus 5.5) ran the runs, added the local timers and wrote this. |
|
Test report at Tested – NVIDIA (32-lane waves), Linux, Wine + vkd3d-proton, release build for
Why: The same holds on a tree with this PR merged together with other title-texture changes: without the destinations all 19 of its For anyone repeating Krashgamer's split of the refresh time: #2144 prints it under Not tested: Windows, AMD; a fix for the reactivation. AI-assisted. Claude Code, Claude Opus 5.5. |
|
Thanks @ozimchuk. That corrects the fix I suggested above: holding the destinations in For whoever picks this up: #1452 has a second race in the same path (treybertram06, Aftermath dump on an RTX 3080). Textures created after AI-assisted (Claude Code). |
Part of #248; related to #262 (the same direction for sparse uploads, see #262 (comment)).
title_textures::refreshruns on the title's thread before each of its submits. It uploaded the CPU's writes to kept-in-step textures on XCL's own queue, then waited on the CPU until the GPU had run them (texture::upload_batch→wait). While a retail title streams its world with video memory past the card, those waits are long:title_textures::refresh→texture::upload_batch→texture::wait→gpu::fence::wait;When the submitting queue is a DIRECT queue on the texture's device, the upload list now runs on that queue, ahead of the title's lists. The GPU orders the copies before the work that samples them, without a cross-queue wait (the deadlock #262 describes for waiting on title queues). A fence on that queue retires each batch's allocator, list and staging buffers at later submits; with over 512 MB in flight the oldest batches are waited for. Compute and copy queues, and a queue of another device, keep the upload queue and its wait.
What is in it
gpu/texture.rs:submit_batch=upload_batchwithout the wait, returning what has to stay alive (InFlight).upload_batchissubmit_batch+wait, unchanged for its callers.hle/d3d12x/title_textures.rs:upload_alltakes the submitting queue;title_queue_forpicks it when it is DIRECT on the same device;submit_on_title_queuesignals a per-queue fence;reclaimreleases finished batches and waits over the cap.A batch whose wait fails or times out stays in flight. New GPU test
gpu_an_upload_still_running_is_kept_when_its_wait_times_outstalls the queue on a gate fence and checks that. It fails if the batch is released on a timeout.New GPU test
gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released:read_r8moves from the mirror test to the test module so both tests use it. The existinggpu_mirror_upload_follows_cpu_writes_and_later_mapping_changescallsrefreshwith a DIRECT queue, so it now runs through this path too and still reads the written bytes back.Tested
At
4a514ae,cargo build --release -p xclpassed.cargo test -p xcl --lib title_textures -- --nocaptureon the RTX 4070 passed 11 tests, with 0 failed, 0 ignored and 0 skipped.RTX 4070 12 GB (driver 617.42), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 26200, rustc 1.93.1.
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4at90b45fb(rebased on main7ebf1b8): 679 passed, 0 failed, 41 ignored, run alone on the GPU.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.cargo testused the same GPU. The rerun alone passed.cargo test --release -p xcl --lib title_textures: 10 passed, with D3D12.X: a title texture whose memory is as at its last upload is not uploaded again #486's test.Retail title, world streaming (guarded runs,
XCL_NETWORK=0, frame-event, activity and thread-dump logging): with this change the title got past its loading screen for the first time on this machine, twice. Without it, every run ended on the loading screen (the title's watchdog, or a free-RAM guard). Both runs used larger local stacks:3516080+ this change;3516080+ D3D12.X: constant buffer views are float4 rows (stride 16), not raw buffers #335 + this change + Textures: a layout's high-coordinate tables hold one period, not 65536 entries #435.After loading the world draws black and the title stops, which is a separate problem.
Regression run
main:
PR:
An earlier 60-second run on the same PR head showed 1,436 frames and peaked at 21,806 MB, above the 125% limit against this baseline. It also recorded zero device removals and crashes. The cause of the run-to-run variance is unknown.
Not tested
AI use