Repository navigation
GPU: adapter choice and logging, presenter backoff, a texture-description ladder, and a display-deferral test a headless session can pass - #1630
Conversation
|
Status of the checks, and the two ways to unblock them
The three commits are the fixes described in #1591 (the swap-chain retry storm), #1600 (the two 2560×1440 textures the host refuses, with the GPU probe that narrows it and the ladder that makes them exist) and the display-deferral test in #1413, and each one states what it measured and what it does not resolve. If any of them is against the grain here — the texture ladder in particular trades a refused description for a usable texture and says what it gave up, which not everyone wants in the runtime — say which and I will drop or reshape that commit. No game data in any of it: descriptions, states, error codes and counts only. Written with an AI assistant. |
|
Independent title check of the texture-resource commit Setup Measured
Remaining limitation AI assistance: OpenAI Codex performed the integrations and tests and drafted this report at the account owner's request. Exact runtime model identifier unavailable. No game bytes or game-derived dumps are included. Runtime-measurement correction: A subsequent idle-GPU check, after the title exited, found a competing local CUDA workload with GPU utilization near 98% and about 31 GB of the 32 GB VRAM occupied. The game runs above were not performed with GPU resources isolated. Their FPS, presentation counts and memory/latency observations must not be treated as clean performance benchmarks or evidence of a project-specific stall. The reported test pass/fail counts are the actual observed results; the explicit texture-format/debug-layer errors and local frame-content observations are still observations, but causality of remaining slowdowns/crashes is not established. A clean rerun is needed. No details of the unrelated workload are included. |
|
The ladder now has a test that would have caught the bug it fixes Added in
So the one-shot path — what this pull request changes — returns nothing at all and the ladder returns a usable texture, and that is now checked rather than argued. Before the ladder, a description the host refused left no host copy, and every draw that named one was lost. The two lines also show what the ladder gives up, and that it is the host's answer and not a fixed order: the integrated GPU takes Why it matters beyond this test: the first version of this patch dropped every clear value whose format differed from the resource's, and a debug-layer boot showed it silently dropping 358 legitimate depth clears ( The rest is unchanged: Written with an AI assistant. |
|
Field evidence for the ladder, from the other adapter A 60-second boot on the RX 4090 (adapter 1, driver
Both are logged once, and the boot is otherwise unchanged (1,024 frames, the same 11 programs as Written with an AI assistant. |
From the review on Marvisak#1707: - A new section says when to stop and leave a decision to a maintainer, with the Needs human attention line and the cases that require it. - Measurements must name the adapter and driver, and use the selector from Marvisak#1630 where available. - No checks reported on a first-time contributor's PR means waiting for a maintainer to approve the run, not passing.
|
Read-only comparison on a hybrid laptop with RTX 5070 Laptop GPU (10de:2d18) and AMD Radeon Graphics (1002:1114). Windows PnP lists the NVIDIA device as disconnected, with NVIDIA package 32.0.15.8191 still installed. Standard/high-performance DXGI and the DXCore D3D12 graphics list both expose only AMD and software WARP. D3D12 creates both, with SM 6.6, mesh tier 1, and wave ranges 32–64 on AMD and 4 on WARP. No driver, graphics-mode, or machine changes were made. This is a useful case where adapter preference cannot select a device that Windows does not currently enumerate. AI-assisted using Codex. |
|
Verification: I ran the whole recipe on a branch that contains only the
So the change is not cosmetic: on a Windows session where the display stack answers Environment, since it decides whether you can reproduce it: Windows 11, the agent runs in session 0 (the interactive desktop is session 1), no presentable desktop, adapters Two smaller notes from the same run, so the reviewer does not have to take them on trust:
No game data is involved: test names and HRESULT values only. Written with an AI assistant. |
|
Correction to one line above: eight commits, not six The diff size was right (+967/−50); the count was not. The branch has eight commits, and they are: Each still stands on its own, and for a reviewer who wants them separately rather than as a bundle I am happy to split the branch — the natural cut is the presenter backoff, the texture ladder plus its test, and the adapter work (selector, logging, the every-adapter probe, and the README row). No game data is involved. Written with an AI assistant. |
The reported boot failure (Marvisak#1758, Marvisak#1755) is this description: 2560x1440 B4G4R4A4_UNORM with ALLOW_RENDER_TARGET, which NVIDIA drivers refuse, so main's make_texture returns nothing and the draws that name it have no target at all. The ladder keeps a texture here (as plain memory on an RTX 4090 with driver 32.0.16.2124, measured), which is what the draws need to skip rather than the device needing to stop.
8223e1c to
3c036f7
Compare
|
Automated triage for the maintainers. Needs work. The branch carries only the texture-description ladder ( The rungs that only change the initial state or drop the clear value look fine. The rungs that drop permissions cause a new problem. If the texture is made without Update after your reply: the head has not changed. A combined boot that stops losing the device is useful to know, but the suites and a 120 s boot would not show an invalid RTV or barrier on a texture made without that permission. Only the debug layer would, so the point above stands. Generated by Claude Code |
|
Merge check: the three GPU fixes together keep the suites where Nobody can run this from CI, so I did it here:
The one failure in both columns is The GPU suite gained two tests and four skips because those are the tests the three pull requests add (the ladder's attempts, the typed-UAV rule, the sampler fallback), and some of them skip without a host. That is why the counts differ and why they are written out instead of "all green". So, for a reviewer deciding whether these can go in together: they do not regress the suites, and together they change what a boot does — which is the only reason to merge them as a set rather than one at a time. What this check does not cover: it says nothing about the title beyond those 120 seconds, and the run still stops at the terms-of-service screen, which is not a GPU matter. It also does not cover other people's fixes: the cap (#1779) is untouched here and still logs No game data is involved: test counts and frame numbers. Written with an AI assistant. |
…d of resource.rs The test for a query's samples was appended to the end of `resource.rs`'s test module, which is where Marvisak#1630 also appends the texture ladder's tests: two pull requests that touch nothing of each others', and a conflict at merge time for whoever takes them both. Moving it up next to the placed-resource test leaves both files' tails free, so the two merge in either order. The test is unchanged; only its position is.
…mmit Marvisak#2130 was rewritten on top of Marvisak#2120's update, so layering it on the old merges kept two versions of it. This tree is upstream main (940d32f) with all 32 open PRs of 0xkn0wh3r3 at their current commits, the upstream fixes Marvisak#1887, Marvisak#1717, Marvisak#1832, Marvisak#1630, Marvisak#1763 and Marvisak#1613, and the demo-only conformance list; the old history stays as this merge's first parent.
The ladder removes the texture-creation failures here, but the world is still a black frame — so it is not the black-screen cause on this cardTested on a card the PR has not been reported on, stacked under the three fixes a run needs to reach the world at all on NVIDIA. Reporting the negative result because it narrows where the black frame actually comes from, and because #904 (which proposes the missing SetupRTX 4060 Laptop (Ada, 8 GB), driver I had to stack the others because without #1763 and #2121 the boot dies at the UAV device removal before any world frame. Result
The ladder is clearly working: the 2560×1440 But every captured frame is still a single-colour What that seems to rule out#904's hypothesis is that the black world comes from the missing Caveat: this is one combination on one card, and the run is 70 s; #1697's frame-time/coverage view says the world also needs the dropped-draw shaders (I still log 141 What I could do next, if useful
Logs and the capture directories are available on request. |
Five small, independent fixes found while measuring the title's boot on this machine, plus the correction they forced: the boots I described in #1591, #1600 and #417 ran on this machine's integrated GPU, not on its RTX 4090.
D3D12CreateDevice(None, …)takes DXGI's default adapter, which here isAMD Radeon(TM) Graphics(adapter 0, driver32.0.21045.29003); the RTX 4090 is adapter 1 (32.0.16.2124, the 621.24 NVIDIA marketing version). The two commits about adapters below are that finding and its fix; the first three fixes are the ones described in those issues.1.
GPU: back off when no presenter can be made(host.rs)A run whose desktop cannot be presented on asked DXGI for a swap chain once per presented frame: 1,654 lines in 60 seconds (about four fifths of the log, 311 KB) and one
CreateDXGIFactory2+CreateSwapChainForHwndper frame. Two different errors appear (0x887A0022, the transient one retrying is for, and0x8007000E), and neither line said which step failed: the window, the factory, the swap chain and the copy list all funnelled into one message.Retry { attempts, next }onHost: wait 100 ms, doubling to a 1 s cap, so a state that clears recovers within a second; nothing is asked (and nothing logged) until the retry is due. The resize path uses the same gate.WARNnaming the step and the frame size (step="swap chain" width=3840 height=2160 format=28), later ones areDEBUGwith the attempt count, and oneINFOreports how many attempts failed when a presenter finally appears.presenter()returnsResult<Presenter, (PresentStep, Error)>.Measured in a session with no display, same state, same command: 131
no swap chainlines in 128 presented frames on unmodifiedffe310e, 1 with this commit. Five unit tests cover the schedule (100/200/400/800/1,000/1,000 ms), the gate, the reset and a simulated minute at 20 fps bounded to 63 attempts.2.
GPU: try a ladder of descriptions for a host texture(resource.rs)A windowed boot asks for two 2560×1440 textures and never gets them —
CreateCommittedResourceanswersE_INVALIDARGforB5G5R5A1_UNORMwith render-target and unordered-access (format 86, flags 5) and forB4G4R4A4_UNORMwith render-target (format 115, flags 1), 6 and 11 seconds into the run, right after the first successful present. A texture with no host copy cannot be an RTV, an SRV or a UAV, so every draw that names one is lost, and the log did not say which argument the host refused.An ignored GPU test in this PR prints the matrix (
cargo test --release -p victory-gpu -- --ignored --nocapture packed_formats): those descriptions are legal on the adapter it asks (adapter 0), with every flag combination tried — onlyALLOW_RENDER_TARGET | ALLOW_DEPTH_STENCILis refused; a colour clear value must name the resource's own format; a depth clear value must name the pair's other format (aD32_FLOAT_S8X24_UINTtexture is refused with a clear naming 19 and accepted namingR32_FLOAT_X8X24_TYPELESS); and some initial states are refused (for format 86 with flags 5,0xC,0x1,0x2,0x200fail).So the description is fine and the state or the clear value is what the host refuses — and neither was in the log. This commit:
state,title_stateandclearon failure;flags_asked/flags_made,state_asked/state_made,clear_asked/clear_dropped), once per texture;HostTexture::statestarts from the truth instead of the asked state (the transitions that follow depended on that).The clear value is kept unless the host refuses it. A first version of this patch dropped every clear whose format differed from the resource's, and a debug-layer boot showed it silently dropping 358 legitimate depth clears — hence the order above.
Not resolved here: which argument the host refuses in those two cases. This machine runs in a session with no display (a swap chain cannot be created there at all), and these two textures are only asked for once presenting works, so the failure does not reproduce headless. Anyone with a presentable desktop can settle it from the new log line.
3.
HLE: a refused display deferral is the host's state, not a failure(display.rs)cargo test --workspace --lockedonffe310efails on a session with no display:modules::display::tests::sdr_and_display_deferralsexpectsS_OK, andPowerSetRequest(PowerRequestDisplayRequired)answersERROR_NOT_SUPPORTED(0x80070032, the module's ownNOT_SUPPORTED). A console always grants it, so the assertion held on machines with a display and fails on headless CI or a locked session, hiding the suite's real signal. The test now checks the contract that holds anywhere — a granted deferral comes with a handle and closes cleanly, a refused one isNOT_SUPPORTEDand leaves no handle — and the refusal is logged atdebug!.4.
GPU: say which adapter the device is on, and let it be chosen(host.rs)The runtime now enumerates the adapters, chooses one by
VICTORY_D3D12_ADAPTER(a decimal index or part of a description, any case) or else index 0 exactly as before, and logs the choice:Both were exercised with a 25-second boot: the default and
VICTORY_D3D12_ADAPTER=1reached frame 512 with the same 11 programs, so the title runs on either. The ignoredmesh_tiersprobe prints what each adapter says:D3D12_OPTIONS7mesh tier5.
Shaders: the offline host takes the same adapter selector(victory-shader/emit/host.rs)translate --pipelinesbuilds its own device, so it ignored the selector and its verdicts were the integrated GPU's. With the same selector it created a device on the RTX 4090 and the whole-archive census changed shape:E_INVALIDARG, e.g.CS_ShadowRenderTiledMiscPPPC)Unspecified error)That is why an offline pipeline verdict here has to name the adapter. The 320 compute refusals on the 4090 are the wave64 family the NVIDIA reports describe (#578, #1001, #1107); the mesh half is simply unavailable on the integrated GPU, which the runtime already checks (
host.rs:324) and the offline tool did not.Verification
cargo test --workspace --locked→ green with these five commits; without the display one, that test is the only failure on this machine.cargo test -p victory-gpu --locked→ 57 passed, 4 ignored (2 pre-existing, the two GPU probes here);-p victory-hle→ 94 passed;-p victory-shader→ 120 passed, 1 ignored.cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features→ clean;rustfmt --checkclean for every line this PR adds.No game data is involved: descriptions, states, error codes, adapter names and counts only.
Written with an AI assistant.