GPU: adapter choice and logging, presenter backoff, a texture-description ladder, and a display-deferral test a headless session can pass #1630

Open
github-bot wants to merge 2 commits from github-bot/gh-1630 into main AGit
Owner

@⁠fiestorra on GitHub · 2026-11-24 20:02 UTC · original
fiestorra:fix/presenter-backoff-and-texture-fallbacks → main · +64 −12 · 1 files · 2 commits · open

The ladder keeps every permission; the rest of the old description is gone

The branch is now one change: when the host refuses a texture description, make_texture retries it without the initial state, without the clear value, and without either, before giving up. Head e70d5f90, rebuilt on 63bcca43.

Why those four rungs and no more: the refusal in #1758/#1755 is of the description, and the state and the clear value are the two things that were not in the log. A rung that drops ALLOW_RENDER_TARGET or the unordered-access permission is not in the ladder, for the reason you gave: a texture made without the render-target permission takes no view, and the draw is lost later instead of here, which is a worse failure because it looks like a rendering bug. The case that does need a stand-in is handled where it belongs, by #2332 (stand_in_for, conditional on the host) and by Host::rtv binding a null view in its own slot rather than skipping it (#1700).

Each refused rung is logged at debug with its state and whether it carried a clear value, and the final failure keeps the warn! with the description. The texture's real initial state is set from the rung that worked, so the transitions that follow do not start from a lie.

The other four changes the old description listed are not in this branch — the swap-chain backoff, the adapter choice, the display-deferral test and the clear-value diagnosis each had their own PR, and mixing them is what made this one unreadable.

Measured: cargo test -p victory-gpu --lib → 231 passed, 0 failed; cargo clippy -p victory-gpu --all-targets --locked -- -D warnings clean.

Not claimed: that this rung set fixes the 2560x1440 target on its own. With #2332 the description never reaches the host as B4G4R4A4 on the cards that refuse it, so what this adds is the honest retry for the refusals that remain, and a log line that names which argument it was.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 20:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630) `fiestorra:fix/presenter-backoff-and-texture-fallbacks` → `main` · +64 −12 · 1 files · 2 commits · open **The ladder keeps every permission; the rest of the old description is gone** The branch is now one change: when the host refuses a texture description, `make_texture` retries it without the *initial state*, without the *clear value*, and without either, before giving up. Head `e70d5f90`, rebuilt on `63bcca43`. Why those four rungs and no more: the refusal in #1758/#1755 is of the description, and the state and the clear value are the two things that were not in the log. A rung that drops `ALLOW_RENDER_TARGET` or the unordered-access permission is **not** in the ladder, for the reason you gave: a texture made without the render-target permission takes no view, and the draw is lost later instead of here, which is a worse failure because it looks like a rendering bug. The case that does need a stand-in is handled where it belongs, by #2332 (`stand_in_for`, conditional on the host) and by `Host::rtv` binding a null view in its own slot rather than skipping it (#1700). Each refused rung is logged at `debug` with its state and whether it carried a clear value, and the final failure keeps the `warn!` with the description. The texture's real initial state is set from the rung that worked, so the transitions that follow do not start from a lie. The other four changes the old description listed are not in this branch — the swap-chain backoff, the adapter choice, the display-deferral test and the clear-value diagnosis each had their own PR, and mixing them is what made this one unreadable. Measured: `cargo test -p victory-gpu --lib` → 231 passed, 0 failed; `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` clean. Not claimed: that this rung set fixes the 2560x1440 target on its own. With #2332 the description never reaches the host as `B4G4R4A4` on the cards that refuse it, so what this adds is the honest retry for the refusals that remain, and a log line that names which argument it was. Written with an AI assistant.
A windowed boot asks for two 2560x1440 textures (B5G5R5A1_UNORM with
render-target and unordered-access, B4G4R4A4_UNORM with render-target) and
the host refuses both with E_INVALIDARG, so every draw that names one is
lost. Those descriptions are legal on the hardware adapter (an ignored test
prints the matrix), so the refusal comes from the initial state or the clear
value, and neither was in the log.

host_texture now tries what the title asked for, then the common state, then
without the clear value, then without unordered access, then as plain memory,
keeping the depth permission throughout; the first description the host takes
is used and a warning names what was given up, once per texture. It returns
the state the texture was really made in, so HostTexture::state starts from
the truth instead of the asked state, and the failure log names state,
title_state and clear.

A clear value is kept unless the host refuses it: for depth targets the host
wants the pair's other format (a D32_FLOAT_S8X24_UINT texture clears with
R32_FLOAT_X8X24 and refuses its own), which is what the title passes.
The one-shot creation the old code made, with a clear value in a format the
resource does not have, is refused (E_INVALIDARG) on both adapters of this
machine; host_texture still leaves a texture, with the render-target
permission, and the state it reports is the one it was made in. What the
ladder gives up is the host's business: the integrated GPU takes
B5G5R5A1_UNORM with a UAV (flags 0x5), the RTX 4090 refuses that and keeps
the render target (flags 0x1).
The reported boot failure (#1758, #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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:56 +00:00
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 20:03 UTC · original

Status of the checks, and the two ways to unblock them

CI for this head is in action_required (https://github.com/Marvisak/VIctory/actions/runs/45476638884): GitHub holds the workflow for a first-time contributor until a maintainer approves it, so gh pr checks reports nothing yet and the merge state is UNSTABLE only for that reason. Clicking Approve and run on that run is enough for this one; a collaborator invite would let later PRs run CI on their own, if that is preferable.

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.

**@⁠fiestorra** on GitHub · 2026-11-24 20:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7142977714) **Status of the checks, and the two ways to unblock them** `CI` for this head is in `action_required` (https://github.com/Marvisak/VIctory/actions/runs/45476638884): GitHub holds the workflow for a first-time contributor until a maintainer approves it, so `gh pr checks` reports nothing yet and the merge state is `UNSTABLE` only for that reason. Clicking *Approve and run* on that run is enough for this one; a collaborator invite would let later PRs run CI on their own, if that is preferable. 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.
Author
Owner

@⁠omeyasawant on GitHub · 2026-11-24 20:41 UTC · original · edited 2026-11-24 21:09 UTC

Independent title check of the texture-resource commit 964cdbd67ef1fa8ecb0fa0ddbd17294183167146 on an RTX 5090.

Setup
Windows 11 Pro 10.0.26200; i7-14700K; 192 GiB RAM; RTX 5090 driver 32.0.16.1088; Rust 1.98.1 MSVC; diagnostics build. This is a local integration, not the complete PR: #189 head 54b333f plus #967 adapter selection. Before texture commit: local 2c77331; after: dc5210e. Both runs explicitly log RTX 5090 selection and Emulate wave64 mode. No driver changes between runs.

Measured

  • Before: 2560x1440 textures in formats 86 (flags 5) and 115 (flags 1) fail with E_INVALIDARG; inspected presented frames 120 and 600 are black.
  • After applying only the texture commit: both are created via fallbacks (86: flags 5 -> 1, clear retained; 115: flags 1 -> 0, clear dropped). No no host texture message in the run. A locally inspected frame 600 contains the intro video; frame 1200 contains loading artwork. No captures are attached under the asset policy.
  • cargo build --profile diag -p victory --features diagnostics --locked: passes.
  • cargo test -p victory-gpu --locked -- --test-threads=1: 58 passed, 0 failed, 2 ignored on this integration. Full shader/workspace results on the underlying #189 branch were posted there; the complete combined workspace was not rerun for this report.

Remaining limitation
The title begins world submissions (about 2500-2700 draws/frame) but slows to roughly 0.2 FPS and exits with GPU removal / DXGI_ERROR_INVALID_CALL (0x887A0001). No correctly rendered world or gameplay is verified. This result supports texture creation and visible video, not an overall gameplay claim or proof of the later crash's cause. Initial-settings state and scripted Enter input were reused; this is not a synchronized FPS benchmark. Only two illustrative frames were inspected, not every frame.

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.

**@⁠omeyasawant** on GitHub · 2026-11-24 20:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7143930704) · edited 2026-11-24 21:09 UTC Independent title check of the texture-resource commit `964cdbd67ef1fa8ecb0fa0ddbd17294183167146` on an RTX 5090. **Setup** Windows 11 Pro 10.0.26200; i7-14700K; 192 GiB RAM; RTX 5090 driver 32.0.16.1088; Rust 1.98.1 MSVC; diagnostics build. This is a local integration, not the complete PR: #189 head `54b333f` plus #967 adapter selection. Before texture commit: local `2c77331`; after: `dc5210e`. Both runs explicitly log RTX 5090 selection and Emulate wave64 mode. No driver changes between runs. **Measured** - Before: 2560x1440 textures in formats 86 (flags 5) and 115 (flags 1) fail with E_INVALIDARG; inspected presented frames 120 and 600 are black. - After applying only the texture commit: both are created via fallbacks (86: flags 5 -> 1, clear retained; 115: flags 1 -> 0, clear dropped). No `no host texture` message in the run. A locally inspected frame 600 contains the intro video; frame 1200 contains loading artwork. No captures are attached under the asset policy. - `cargo build --profile diag -p victory --features diagnostics --locked`: passes. - `cargo test -p victory-gpu --locked -- --test-threads=1`: **58 passed, 0 failed, 2 ignored** on this integration. Full shader/workspace results on the underlying #189 branch were posted there; the complete combined workspace was not rerun for this report. **Remaining limitation** The title begins world submissions (about 2500-2700 draws/frame) but slows to roughly 0.2 FPS and exits with GPU removal / DXGI_ERROR_INVALID_CALL (0x887A0001). No correctly rendered world or gameplay is verified. This result supports texture creation and visible video, not an overall gameplay claim or proof of the later crash's cause. Initial-settings state and scripted Enter input were reused; this is not a synchronized FPS benchmark. Only two illustrative frames were inspected, not every frame. 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.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 20:44 UTC · original

The ladder now has a test that would have caught the bug it fixes

Added in dc73cce to crates/victory-gpu/src/resource.rs: an ignored GPU test, a_refused_description_still_leaves_a_texture, that makes the creation the old code made — the B5G5R5A1_UNORM 2560×1440 target with render-target and unordered-access, and a clear value naming a format the resource does not have — and checks both arms:

the one-shot creation is refused: The parameter is incorrect. (0x80070057)
host texture: 2560x1440 format 86 flags 0x5 of the 0x5 asked, state 0x4     <- integrated GPU
host texture: 2560x1440 format 86 flags 0x1 of the 0x5 asked, state 0x0     <- RTX 4090

cargo test --release -p victory-gpu -- --ignored --nocapture a_refused_description_still_leaves_a_texture

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 B5G5R5A1_UNORM with a UAV and keeps both permissions (flags 0x5), while the RTX 4090 refuses that format with a UAV and the texture is made as a render target only (flags 0x1), with the common state. The test asserts the portable part — the texture exists, its format is the one asked for, the render-target permission survives, and the state is one the texture may be made in — so it passes on both instead of pinning one driver's answer.

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 (D32_FLOAT_S8X24_UINT made from a clear naming R32_FLOAT_X8X24). A test that runs the real device would have failed that version in one second.

The rest is unchanged: cargo test -p victory-gpu --locked → 57 passed, 5 ignored; cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings clean; rustfmt --check clean on the file.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 20:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7143988281) **The ladder now has a test that would have caught the bug it fixes** Added in `dc73cce` to `crates/victory-gpu/src/resource.rs`: an ignored GPU test, `a_refused_description_still_leaves_a_texture`, that makes the creation the old code made — the `B5G5R5A1_UNORM` 2560×1440 target with render-target and unordered-access, and a clear value naming a format the resource does not have — and checks both arms: ``` the one-shot creation is refused: The parameter is incorrect. (0x80070057) host texture: 2560x1440 format 86 flags 0x5 of the 0x5 asked, state 0x4 <- integrated GPU host texture: 2560x1440 format 86 flags 0x1 of the 0x5 asked, state 0x0 <- RTX 4090 ``` `cargo test --release -p victory-gpu -- --ignored --nocapture a_refused_description_still_leaves_a_texture` 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 `B5G5R5A1_UNORM` with a UAV and keeps both permissions (flags `0x5`), while the RTX 4090 refuses that format with a UAV and the texture is made as a render target only (flags `0x1`), with the common state. The test asserts the portable part — the texture exists, its format is the one asked for, the render-target permission survives, and the state is one the texture may be made in — so it passes on both instead of pinning one driver's answer. 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** (`D32_FLOAT_S8X24_UINT` made from a clear naming `R32_FLOAT_X8X24`). A test that runs the real device would have failed that version in one second. The rest is unchanged: `cargo test -p victory-gpu --locked` → 57 passed, 5 ignored; `cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings` clean; `rustfmt --check` clean on the file. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 20:46 UTC · original

Field evidence for the ladder, from the other adapter

A 60-second boot on the RX 4090 (adapter 1, driver 32.0.16.2124, with this pull request applied) shows the ladder taking over for the exact two targets it was written for, and what it gives up:

host texture made only as a fallback flags_asked=5 flags_made=1 clear_asked=86  clear_dropped=false
host texture made only as a fallback flags_asked=1 flags_made=0 clear_asked=115 clear_dropped=true
  • The B5G5R5A1_UNORM target: the host refuses its UAV permission, so it is made as a render target only, with the clear value kept — the clear was never the problem there.
  • The B4G4R4A4_UNORM target: the host refuses the render target as well, and refuses the creation with the clear value in the resource's own format, so the only description taken is plain memory with no clear. Without the ladder there would be no host copy at all.

Both are logged once, and the boot is otherwise unchanged (1,024 frames, the same 11 programs as ffe310e). The open question — whether the ladder should stop before plain memory, since a flags 0 texture can never be an RTV — is in #1600, because it is a policy choice rather than a measurement.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 20:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7144034990) **Field evidence for the ladder, from the other adapter** A 60-second boot on the RX 4090 (adapter 1, driver `32.0.16.2124`, with this pull request applied) shows the ladder taking over for the exact two targets it was written for, and what it gives up: ``` host texture made only as a fallback flags_asked=5 flags_made=1 clear_asked=86 clear_dropped=false host texture made only as a fallback flags_asked=1 flags_made=0 clear_asked=115 clear_dropped=true ``` - The `B5G5R5A1_UNORM` target: the host refuses its UAV permission, so it is made as a render target only, with the clear value kept — the clear was never the problem there. - The `B4G4R4A4_UNORM` target: the host refuses the render target as well, and refuses the creation with the clear value in the resource's own format, so the only description taken is plain memory with no clear. Without the ladder there would be no host copy at all. Both are logged once, and the boot is otherwise unchanged (1,024 frames, the same 11 programs as `ffe310e`). The open question — whether the ladder should stop before plain memory, since a `flags 0` texture can never be an RTV — is in https://git.gtahub.st/github/Marvisak--VIctory/issues/1600, because it is a policy choice rather than a measurement. Written with an AI assistant.
Author
Owner

@⁠aycow on GitHub · 2026-11-24 21:17 UTC · original

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.

**@⁠aycow** on GitHub · 2026-11-24 21:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7144727847) 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.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 21:21 UTC · original

Verification: main's suite is red on this machine on exactly the test this pull request relaxes, and green with it

I ran the whole recipe on a branch that contains only the draw.rs change from #1700 (so its display.rs is main's), on the same machine I have been measuring on:

cargo test --workspace --locked
thread 'modules::display::tests::sdr_and_display_deferrals' panicked at
  crates\victory-hle\src\modules\display.rs:188:9:
assertion `left == right` failed
  left: -2147024846      # 0x80070032, E_NOT_SUPPORTED
 right: 0                 # S_OK

0x80070032 is exactly the code this pull request's sdr_and_display_deferrals change accepts alongside S_OK, with contract assertions on what each path must leave behind. On this branch (with it) the same command exits 0:

cargo test --workspace --locked                                   # all binaries ok, 0 failed
cargo clippy --workspace --all-targets --locked -- -D warnings    # clean
cargo clippy --workspace --all-targets --all-features -- -D warnings   # clean

So the change is not cosmetic: on a Windows session where the display stack answers NOT_SUPPORTED for that deferral, main fails its own test suite, and this branch does not.

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 AMD Radeon(TM) Graphics (driver 32.0.21045.29003) and RTX 4090 (driver 32.0.16.2124); the failing call is the display deferral, so the adapter is irrelevant and the session is the likely reason. If your CI runners are headless Windows machines, main is probably red on this test there too — which would explain a failing check without a code defect, and this pull request removes it.

Two smaller notes from the same run, so the reviewer does not have to take them on trust:

  • rustfmt --check on crates/victory-gpu/src/host.rs reports 25 hunks on this branch and 25 on main — the same pre-existing ones, so nothing here adds formatting debt (I did not reformat other people's code).
  • The diff is +967/−50 over six commits, each self-contained: the adapter choice and its logging, the presenter retry backoff, the texture description ladder, the display deferral, the offline adapter selector, and two GPU tests.

No game data is involved: test names and HRESULT values only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 21:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7144821262) **Verification: `main`'s suite is red on this machine on exactly the test this pull request relaxes, and green with it** I ran the whole recipe on a branch that contains **only** the `draw.rs` change from #1700 (so its `display.rs` is `main`'s), on the same machine I have been measuring on: ``` cargo test --workspace --locked thread 'modules::display::tests::sdr_and_display_deferrals' panicked at crates\victory-hle\src\modules\display.rs:188:9: assertion `left == right` failed left: -2147024846 # 0x80070032, E_NOT_SUPPORTED right: 0 # S_OK ``` `0x80070032` is exactly the code this pull request's `sdr_and_display_deferrals` change accepts alongside `S_OK`, with contract assertions on what each path must leave behind. On this branch (with it) the same command exits 0: ``` cargo test --workspace --locked # all binaries ok, 0 failed cargo clippy --workspace --all-targets --locked -- -D warnings # clean cargo clippy --workspace --all-targets --all-features -- -D warnings # clean ``` So the change is not cosmetic: on a Windows session where the display stack answers `NOT_SUPPORTED` for that deferral, `main` fails its own test suite, and this branch does not. 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 `AMD Radeon(TM) Graphics` (driver `32.0.21045.29003`) and `RTX 4090` (driver `32.0.16.2124`); the failing call is the display deferral, so the adapter is irrelevant and the *session* is the likely reason. **If your CI runners are headless Windows machines, `main` is probably red on this test there too** — which would explain a failing check without a code defect, and this pull request removes it. Two smaller notes from the same run, so the reviewer does not have to take them on trust: - `rustfmt --check` on `crates/victory-gpu/src/host.rs` reports **25 hunks on this branch and 25 on `main`** — the same pre-existing ones, so nothing here adds formatting debt (I did not reformat other people's code). - The diff is +967/−50 over six commits, each self-contained: the adapter choice and its logging, the presenter retry backoff, the texture description ladder, the display deferral, the offline adapter selector, and two GPU tests. No game data is involved: test names and HRESULT values only. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 21:21 UTC · original

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:

805e365 GPU: back off when no presenter can be made
964cdbd GPU: try a ladder of descriptions for a host texture
10bc4e3 HLE: a refused display deferral is the host's state, not a failure
8ffef90 GPU: say which adapter the device is on, and let it be chosen
187bfb7 Shaders: the offline host takes the same adapter selector
83b7393 GPU: the mesh-tier probe asks every adapter, not only the default
dc73cce GPU: a GPU test for the description ladder
f15a9f9 README: document VICTORY_D3D12_ADAPTER

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.

**@⁠fiestorra** on GitHub · 2026-11-24 21:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7144829170) **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: ``` 805e365 GPU: back off when no presenter can be made 964cdbd GPU: try a ladder of descriptions for a host texture 10bc4e3 HLE: a refused display deferral is the host's state, not a failure 8ffef90 GPU: say which adapter the device is on, and let it be chosen 187bfb7 Shaders: the offline host takes the same adapter selector 83b7393 GPU: the mesh-tier probe asks every adapter, not only the default dc73cce GPU: a GPU test for the description ladder f15a9f9 README: document VICTORY_D3D12_ADAPTER ``` 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.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 21:53 UTC · original

Rebased onto main (70564ae) — and the ladder had to move, not just be re-applied

main moved 28 commits ahead while this was open, and the conflict was in resource.rs, where host_texture became make_texture and now also asks for castable formats through CreateCommittedResource3 (the "one host texture per texture memory, writable twins for depth" work). So the description ladder is no longer a loop around the old single creation: it is now the plain-creation fallback after the castable attempt, which keeps main's structure intact.

    if texture.is_none() {
        castable_formats.clear();
        let tries = attempts(d.flags, initial);
        for (i, &(flags, made_in, keep_clear)) in tries.iter().enumerate() {
            ...
            match made {
                Ok(()) => { if i > 0 { /* the fallback warning */ } initial = made_in; break; }
                Err(e) if i + 1 == tries.len() => { /* the failure log */ }
                Err(e) => { /* debug: trying a fallback */ }
            }
        }
    }

Three things this cost, worth knowing if you have a branch touching make_texture:

  • the ladder starts from the state the path would have used (main sets initial = 0 when the castable creation succeeds, so the common state is what is asked for first);
  • a depth target still keeps its depth permission in every attempt, and the last two attempts also drop the render-target permission for colour targets;
  • attempts is unchanged; the state it now returns updates initial before HostTexture::new, so a texture made as a fallback still starts in the state it was really made in.

The GPU test had to change with it (host_texture → make_texture, and the state now comes from HostTexture::state), and it still shows the case it was written for on the integrated adapter (driver 32.0.21045.29003, session 0):

the one-shot creation is refused: The parameter is incorrect. (0x80070057)
host texture: 2560x1440 format 86 flags 0x5 of the 0x5 asked, state 0x4

Verification after the rebase, whole workspace:

  • cargo test --workspace --locked → 24 suites, 0 failures (this branch also carries the display-deferral fix, so the sdr_and_display_deferrals failure that main has in this headless session does not appear here);
  • cargo clippy --workspace --all-targets --locked -- -D warnings and the same with --all-features → clean;
  • cargo test --release -p victory-gpu -- --ignored → 5 passed, including the adapter enumeration, the mesh tiers per adapter and the ladder;
  • rustfmt --check: host.rs reports the same 41 hunks as main, resource.rs the same 15, display.rs none — nothing here adds formatting debt.

The diff against main is now +952/−36 over eight commits.

No game data is involved: descriptions, flags, states and adapter enumerations only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 21:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7145523747) **Rebased onto `main` (`70564ae`) — and the ladder had to move, not just be re-applied** `main` moved 28 commits ahead while this was open, and the conflict was in `resource.rs`, where `host_texture` became `make_texture` and now also asks for **castable formats** through `CreateCommittedResource3` (the "one host texture per texture memory, writable twins for depth" work). So the description ladder is no longer a loop around the old single creation: it is now the plain-creation fallback *after* the castable attempt, which keeps main's structure intact. ```rust if texture.is_none() { castable_formats.clear(); let tries = attempts(d.flags, initial); for (i, &(flags, made_in, keep_clear)) in tries.iter().enumerate() { ... match made { Ok(()) => { if i > 0 { /* the fallback warning */ } initial = made_in; break; } Err(e) if i + 1 == tries.len() => { /* the failure log */ } Err(e) => { /* debug: trying a fallback */ } } } } ``` Three things this cost, worth knowing if you have a branch touching `make_texture`: - the ladder starts from the state the *path* would have used (main sets `initial = 0` when the castable creation succeeds, so the common state is what is asked for first); - a depth target still keeps its depth permission in every attempt, and the last two attempts also drop the render-target permission for colour targets; - `attempts` is unchanged; the `state` it now returns updates `initial` before `HostTexture::new`, so a texture made as a fallback still starts in the state it was really made in. The GPU test had to change with it (`host_texture` → `make_texture`, and the state now comes from `HostTexture::state`), and it still shows the case it was written for on the integrated adapter (driver `32.0.21045.29003`, session 0): ``` the one-shot creation is refused: The parameter is incorrect. (0x80070057) host texture: 2560x1440 format 86 flags 0x5 of the 0x5 asked, state 0x4 ``` **Verification after the rebase**, whole workspace: - `cargo test --workspace --locked` → **24 suites, 0 failures** (this branch also carries the display-deferral fix, so the `sdr_and_display_deferrals` failure that `main` has in this headless session does not appear here); - `cargo clippy --workspace --all-targets --locked -- -D warnings` and the same with `--all-features` → clean; - `cargo test --release -p victory-gpu -- --ignored` → 5 passed, including the adapter enumeration, the mesh tiers per adapter and the ladder; - `rustfmt --check`: `host.rs` reports the **same 41 hunks as `main`**, `resource.rs` the same 15, `display.rs` none — nothing here adds formatting debt. The diff against `main` is now +952/−36 over eight commits. No game data is involved: descriptions, flags, states and adapter enumerations only. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 23:16 UTC · original

Tested against the real failure, and against the other two candidates: it is one of three causes

With the debug layer installed on a machine that reproduces the removal, the same scenario (session 1, window 3840×2160, empty cache, default adapter AMD Radeon(TM) Graphics, driver 32.0.21045.29003):

build id=599 id=1419 device removed
main 70564ae 1 0 yes, frame 128
+ this pull request 0 0 no
+ this and #1630 (texture ladder) 0 2 yes
+ this and #1778 (sampler heap) 0 0 no
+ all three 0 0 no, keeps presenting

So on this machine this change alone is enough to stop the removal, while the texture ladder alone is not — it removes the no host texture line and then uncovers a second rule violation (id 1419, the sampler heap) that was previously invisible because the run died at 599 first.

That is worth saying in the pull request rather than in a later comment: a reviewer testing only this change on an NVIDIA card may see the removal go away and a different one appear later, and it is the id 1419 of #1778 in that case.

Full write-up with the chain: #1754

Still in the log with all three, and a different problem: host view heap capped at 1000000 and 310,720 title slot past the host heap (#1760). No removal on this machine, still costing frames.

No game data is involved.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 23:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7147206629) **Tested against the real failure, and against the other two candidates: it is one of three causes** With the debug layer installed on a machine that reproduces the removal, the same scenario (session 1, window 3840×2160, empty cache, default adapter `AMD Radeon(TM) Graphics`, driver `32.0.21045.29003`): | build | `id=599` | `id=1419` | device removed | |---|---|---|---| | `main` `70564ae` | 1 | 0 | **yes**, frame 128 | | + this pull request | 0 | 0 | no | | + this and #1630 (texture ladder) | 0 | **2** | **yes** | | + this and #1778 (sampler heap) | 0 | 0 | no | | + all three | 0 | 0 | **no**, keeps presenting | So on this machine this change alone is enough to stop the removal, while the texture ladder alone is not — it removes the `no host texture` line and then uncovers a second rule violation (id 1419, the sampler heap) that was previously invisible because the run died at 599 first. That is worth saying in the pull request rather than in a later comment: **a reviewer testing only this change on an NVIDIA card may see the removal go away and a different one appear later**, and it is the id 1419 of #1778 in that case. Full write-up with the chain: https://git.gtahub.st/github/Marvisak--VIctory/issues/1754 Still in the log with all three, and a different problem: `host view heap capped at 1000000` and 310,720 `title slot past the host heap` (https://git.gtahub.st/github/Marvisak--VIctory/issues/1760). No removal on this machine, still costing frames. No game data is involved. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 23:41 UTC · original

Correction to my own measurements: those runs were on the RTX 4090, not on the integrated GPU

I have been writing "default adapter, integrated AMD Radeon(TM) Graphics, driver 32.0.21045.29003" on the runs I made in session 1. That attribution is wrong, and the cause is worth knowing because it is the exact trap this repository keeps warning about.

DXGI enumerates the adapters in a different order in the two sessions. Measured on this machine, same binary, same moment, with cargo test --release -p victory-gpu -- --ignored adapters:

session 0 (the agent's, services):
  adapter 0: "AMD Radeon(TM) Graphics"      vendor=0x1002  485 MiB
  adapter 1: "NVIDIA GeForce RTX 4090"      vendor=0x10de  24,138 MiB
  adapter 2: "Microsoft Basic Render Driver"

session 1 (the interactive desktop, where the title actually runs):
  adapter 0: "NVIDIA GeForce RTX 4090"      vendor=0x10de  24,138 MiB
  adapter 1: "AMD Radeon(TM) Graphics"      vendor=0x1002  485 MiB
  adapter 2: "Microsoft Basic Render Driver"

So the default adapter is the integrated AMD in the agent's session and the RTX 4090 in the session where the title runs, which is precisely where every number I published in the last few rounds came from. With my selector in place the run says it plainly:

INFO victory_gpu::host: host GPU adapter="AMD Radeon(TM) Graphics" index=1 vendor=0x1002 …

— index=1 is the AMD in session 1, the reverse of session 0, which is what made me notice.

What this changes, and what it does not:

  • The measurements stand, and they get stronger: the device removals, the 1,000,000-descriptor cap and the 310,720 slots past it were measured on an NVIDIA RTX 4090 (driver 32.0.16.2124), not on the integrated GPU — which is the same vendor as the machines in #1754, #1755, #1758 and #1760. The chain in #1754 is NVIDIA evidence, not AMD evidence.
  • The one open question I could not explain is now explained. I reported that in the run formats 27 and 86 answered "no typed UAV" while a direct query from the test process answered "yes" for 86. Those two ran on different adapters: the test in session 0 (integrated AMD, which does support a typed UAV view of B5G5R5A1_UNORM), the title in session 1 (RTX 4090, which does not). There was never a discrepancy — different device, different answer.
  • The corrections to apply elsewhere: the driver line in every comment where I wrote 32.0.21045.29003 for a session-1 run should read 32.0.16.2124 (NVIDIA GeForce RTX 4090). I will put this note on the threads where the numbers were used rather than editing old comments, so the record keeps both.
  • For anyone reproducing: an index in VICTORY_D3D12_ADAPTER is session-dependent, and a name substring is not. Use VICTORY_D3D12_ADAPTER=nvidia or =amd, and check the host GPU adapter= line rather than assuming which card the default is.

No game data is involved: adapter descriptions, vendor ids and memory sizes only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 23:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7147682470) **Correction to my own measurements: those runs were on the RTX 4090, not on the integrated GPU** I have been writing "default adapter, integrated `AMD Radeon(TM) Graphics`, driver `32.0.21045.29003`" on the runs I made in session 1. That attribution is wrong, and the cause is worth knowing because it is the exact trap this repository keeps warning about. **DXGI enumerates the adapters in a different order in the two sessions.** Measured on this machine, same binary, same moment, with `cargo test --release -p victory-gpu -- --ignored adapters`: ``` session 0 (the agent's, services): adapter 0: "AMD Radeon(TM) Graphics" vendor=0x1002 485 MiB adapter 1: "NVIDIA GeForce RTX 4090" vendor=0x10de 24,138 MiB adapter 2: "Microsoft Basic Render Driver" session 1 (the interactive desktop, where the title actually runs): adapter 0: "NVIDIA GeForce RTX 4090" vendor=0x10de 24,138 MiB adapter 1: "AMD Radeon(TM) Graphics" vendor=0x1002 485 MiB adapter 2: "Microsoft Basic Render Driver" ``` So the default adapter is the integrated AMD **in the agent's session** and the **RTX 4090 in the session where the title runs**, which is precisely where every number I published in the last few rounds came from. With my selector in place the run says it plainly: ``` INFO victory_gpu::host: host GPU adapter="AMD Radeon(TM) Graphics" index=1 vendor=0x1002 … ``` — `index=1` is the AMD *in session 1*, the reverse of session 0, which is what made me notice. What this changes, and what it does not: - **The measurements stand**, and they get *stronger*: the device removals, the 1,000,000-descriptor cap and the 310,720 slots past it were measured on an **NVIDIA RTX 4090** (driver `32.0.16.2124`), not on the integrated GPU — which is the same vendor as the machines in #1754, #1755, #1758 and #1760. The chain in https://git.gtahub.st/github/Marvisak--VIctory/issues/1754 is NVIDIA evidence, not AMD evidence. - **The one open question I could not explain is now explained.** I reported that in the run formats 27 and 86 answered "no typed UAV" while a direct query from the test process answered "yes" for 86. Those two ran on **different adapters**: the test in session 0 (integrated AMD, which does support a typed UAV view of `B5G5R5A1_UNORM`), the title in session 1 (RTX 4090, which does not). There was never a discrepancy — different device, different answer. - **The corrections to apply elsewhere**: the driver line in every comment where I wrote `32.0.21045.29003` for a session-1 run should read `32.0.16.2124` (`NVIDIA GeForce RTX 4090`). I will put this note on the threads where the numbers were used rather than editing old comments, so the record keeps both. - **For anyone reproducing**: an index in `VICTORY_D3D12_ADAPTER` is session-dependent, and a *name substring* is not. Use `VICTORY_D3D12_ADAPTER=nvidia` or `=amd`, and check the `host GPU adapter=` line rather than assuming which card the default is. No game data is involved: adapter descriptions, vendor ids and memory sizes only. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 23:54 UTC · original

Measured on the RTX 4090 for 120 s: the ladder removes the missing texture, and the frame counter does not move

I had published the chain as "each of the three removes one cause"; this measures what the combination does to the run over two minutes, which is the honest test of whether it is worth merging on its own. Build: main 70564ae + #1832 + #1778 + this, diag with the D3D12 debug layer and DRED on, session 1, real window 3840×2160, empty cache, RTX 4090 (driver 32.0.16.2124).

main #1832 alone the three
id=599 1 0 0
id=1419 0 0 0
device removed yes no no
no host texture 1 1 0
made only as a fallback 0 0 1
last frame in 120 s 64 2,048 (draws=13312) 2,048 (draws=13312)

Two things to take from that, and one of them is not flattering to this pull request:

  • It does what it says: the B4G4R4A4_UNORM 1440p target that the title could not have now exists, as plain memory ("made only as a fallback"), and the warning is gone. That is a real rendering-relevant difference that the frame counter does not show.
  • It does not move the frame counter in this window. The three together reach exactly the same frame and draw counts as #1832 alone. So whatever limits this run after the removal is not the missing texture and not the sampler heap; it is the thing the log still shows in both: host view heap capped at 1000000 with 310,720 slots past the host heap, which is #1779's ground, not mine.

I would rather say that than let anyone merge this expecting the number to move: this is worth merging because a target the title asked for now exists and does not cost the device, not because it unblocks the frame.

Also of note for a reviewer: the three branches merge in this order without touching each other's code (#1778 → #1832 → this), 13 commits, and the only conflicts when I tried other orders were the test functions both appended at the end of resource::tests.

No game data is involved: counts and warnings only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 23:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7147933166) **Measured on the RTX 4090 for 120 s: the ladder removes the missing texture, and the frame counter does not move** I had published the chain as "each of the three removes one cause"; this measures what the combination *does to the run* over two minutes, which is the honest test of whether it is worth merging on its own. Build: `main` `70564ae` + #1832 + #1778 + this, `diag` with the D3D12 debug layer and DRED on, session 1, real window 3840×2160, empty cache, **RTX 4090 (driver `32.0.16.2124`)**. | | `main` | #1832 alone | the three | |---|---|---|---| | `id=599` | 1 | 0 | 0 | | `id=1419` | 0 | 0 | 0 | | device removed | **yes** | no | no | | `no host texture` | 1 | 1 | **0** | | `made only as a fallback` | 0 | 0 | 1 | | last frame in 120 s | 64 | **2,048** (`draws=13312`) | **2,048** (`draws=13312`) | Two things to take from that, and one of them is not flattering to this pull request: - **It does what it says**: the `B4G4R4A4_UNORM` 1440p target that the title could not have now exists, as plain memory ("made only as a fallback"), and the warning is gone. That is a real rendering-relevant difference that the frame counter does not show. - **It does not move the frame counter in this window.** The three together reach exactly the same frame and draw counts as #1832 alone. So whatever limits this run after the removal is not the missing texture and not the sampler heap; it is the thing the log still shows in both: `host view heap capped at 1000000` with **310,720 slots past the host heap**, which is #1779's ground, not mine. I would rather say that than let anyone merge this expecting the number to move: **this is worth merging because a target the title asked for now exists and does not cost the device, not because it unblocks the frame.** Also of note for a reviewer: the three branches merge in this order without touching each other's code (`#1778` → `#1832` → this), 13 commits, and the only conflicts when I tried other orders were the test functions both appended at the end of `resource::tests`. No game data is involved: counts and warnings only. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-24 23:59 UTC · original

Correction to the comment above, and the number that actually distinguishes the builds

The table I posted a moment ago compares "last frame in 120 s", and I have to correct how I read it: the statistics line prints only at powers of two (frame 1, 2, 4, …, 512, 1024, 2048), so "2048" is a log bucket and not a plateau. Both builds reaching 2048 does not mean they advance at the same pace.

The right metric is the time to reach the same frame. From the same three runs, frame=1 to frame=2048:

build start frame 2048 elapsed
main — never (device removed at frame 64) —
#1832 alone 23:48:05 23:49:39 94 s (~21.8 fps)
#1832 + #1778 + this 23:52:11 23:53:44 93 s
the three + #1779 23:56:00 23:57:16 76 s (~26.9 fps)

So, restated properly:

  • This pull request does not change the pace (93 s against 94 s). What it changes is what the run contains: the B4G4R4A4_UNORM 1440p target exists as plain memory and no host texture goes from 1 to 0. That is still my reason for asking for it to be merged — a target the title asked for now exists — but not a speed-up, and I should not have implied the two were the same thing.
  • #1779 does change the pace: 76 s for the same 2,048 frames is about 23% more frames per second, which fits the 310,720 descriptor slots past the capped heap going to 0 in that build. That is the number that says the capped heap was costing throughput.

I am leaving the earlier comment as it is rather than editing it, so the correction is visible next to what it corrects.

No game data is involved: frame counters and timestamps only.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-24 23:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7148014024) **Correction to the comment above, and the number that actually distinguishes the builds** The table I posted a moment ago compares "last frame in 120 s", and I have to correct how I read it: the statistics line prints only at **powers of two** (frame 1, 2, 4, …, 512, 1024, 2048), so "2048" is a log bucket and not a plateau. Both builds reaching 2048 does **not** mean they advance at the same pace. The right metric is the time to reach the same frame. From the same three runs, `frame=1` to `frame=2048`: | build | start | frame 2048 | elapsed | |---|---|---|---| | `main` | — | never (device removed at frame 64) | — | | #1832 alone | 23:48:05 | 23:49:39 | **94 s** (~21.8 fps) | | #1832 + #1778 + this | 23:52:11 | 23:53:44 | **93 s** | | the three + #1779 | 23:56:00 | 23:57:16 | **76 s** (~26.9 fps) | So, restated properly: - **This pull request does not change the pace** (93 s against 94 s). What it changes is what the run *contains*: the `B4G4R4A4_UNORM` 1440p target exists as plain memory and `no host texture` goes from 1 to 0. That is still my reason for asking for it to be merged — a target the title asked for now exists — but not a speed-up, and I should not have implied the two were the same thing. - **#1779 does change the pace**: 76 s for the same 2,048 frames is about **23% more frames per second**, which fits the 310,720 descriptor slots past the capped heap going to 0 in that build. That is the number that says the capped heap was costing throughput. I am leaving the earlier comment as it is rather than editing it, so the correction is visible next to what it corrects. No game data is involved: frame counters and timestamps only. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 00:57 UTC · original

Rebased and narrowed to the ladder: the backoff and the display fix are now in main, and the adapter selector goes to its own pull request

main moved to 42363ab and this branch stopped merging. Rebuilding it against the new main showed that most of what it carried is now either in main or better done on its own, so I have narrowed it to the texture description ladder — its genuinely new part — and split the rest out.

What the new main already has, which this branch was also doing:

  • The presenter back-off: merged as #1626 as Presentation { presenter, retry: SwapChainRetry } in crates/victory-gpu/src/host.rs, the same measure against the same problem (a run with no desktop to present on asking DXGI every frame). My commit is dropped, not merged; yours is the one in the tree.
  • The display deferral fix: main's sdr_and_display_deferrals already accepts NOT_SUPPORTED ("Windows can reject display power requests on some hosts"), so my commit for it is dropped too.

What this pull request still carries, rebased on 42363ab (three commits):

  • GPU: try a ladder of descriptions for a host texture — the ladder itself, attempts() and make_texture() in crates/victory-gpu/src/resource.rs: the description the title asks for first, then the same without the clear value, without the unordered-access permission, without the render-target and unordered-access pair, and finally as plain memory, with a warning naming what was refused. Measured before this: no host texture for the 2560×1440 B4G4R4A4_UNORM target, and the texture exists afterwards ("made only as a fallback").
  • GPU: a GPU test for the description ladder and GPU: a test for the packed 2560x1440 render target a boot asks for — the two tests that pin it.

What is not in this pull request any more, and why:

  • the adapter selector (VICTORY_D3D12_ADAPTER, the host GPU adapter=… line, the mesh-tier probe over every adapter, the README entry) — it deserves to be reviewed as its own change, and it is what the conflicts in host.rs were really about. I will open it separately rather than hold the ladder behind it.

Verification on the rebased branch: cargo test -p victory-gpu --locked 142 passed, 5 ignored; cargo test --workspace --locked 26 suites ok; clippy --workspace --all-targets with and without --all-features clean under -D warnings; rustfmt --check on resource.rs 15 hunks, none of them on the lines added here.

One failure in the workspace run, and it is main's, not this branch's: victory-hle::modules::lifecycle::tests::showing_a_title_window_shows_its_stand_in fails on 42363ab alone in this headless session (checked by running it with main checked out). The sdr_and_display_deferrals failure I used to mention here no longer happens, because main fixed it.

No game data is involved: descriptions, formats and test counts.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 00:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7149070267) **Rebased and narrowed to the ladder: the backoff and the display fix are now in `main`, and the adapter selector goes to its own pull request** `main` moved to `42363ab` and this branch stopped merging. Rebuilding it against the new `main` showed that most of what it carried is now either in `main` or better done on its own, so I have **narrowed it to the texture description ladder** — its genuinely new part — and split the rest out. What the new `main` already has, which this branch was also doing: - **The presenter back-off**: merged as #1626 as `Presentation { presenter, retry: SwapChainRetry }` in `crates/victory-gpu/src/host.rs`, the same measure against the same problem (a run with no desktop to present on asking DXGI every frame). My commit is dropped, not merged; yours is the one in the tree. - **The display deferral fix**: `main`'s `sdr_and_display_deferrals` already accepts `NOT_SUPPORTED` ("Windows can reject display power requests on some hosts"), so my commit for it is dropped too. What this pull request still carries, rebased on `42363ab` (three commits): - `GPU: try a ladder of descriptions for a host texture` — the ladder itself, `attempts()` and `make_texture()` in `crates/victory-gpu/src/resource.rs`: the description the title asks for first, then the same without the clear value, without the unordered-access permission, without the render-target and unordered-access pair, and finally as plain memory, with a warning naming what was refused. Measured before this: `no host texture` for the 2560×1440 `B4G4R4A4_UNORM` target, and the texture exists afterwards ("made only as a fallback"). - `GPU: a GPU test for the description ladder` and `GPU: a test for the packed 2560x1440 render target a boot asks for` — the two tests that pin it. What is **not** in this pull request any more, and why: - **the adapter selector** (`VICTORY_D3D12_ADAPTER`, the `host GPU adapter=…` line, the mesh-tier probe over every adapter, the README entry) — it deserves to be reviewed as its own change, and it is what the conflicts in `host.rs` were really about. I will open it separately rather than hold the ladder behind it. Verification on the rebased branch: `cargo test -p victory-gpu --locked` 142 passed, 5 ignored; `cargo test --workspace --locked` 26 suites ok; `clippy --workspace --all-targets` with and without `--all-features` clean under `-D warnings`; `rustfmt --check` on `resource.rs` 15 hunks, none of them on the lines added here. One failure in the workspace run, and it is **`main`'s, not this branch's**: `victory-hle::modules::lifecycle::tests::showing_a_title_window_shows_its_stand_in` fails on `42363ab` alone in this headless session (checked by running it with `main` checked out). The `sdr_and_display_deferrals` failure I used to mention here no longer happens, because `main` fixed it. No game data is involved: descriptions, formats and test counts. Written with an AI assistant.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:32 UTC · original · edited 2026-11-25 07:19 UTC

Automated triage for the maintainers.

Needs work. The branch carries only the texture-description ladder (attempts() / make_texture() in crates/victory-gpu/src/resource.rs), while the description still lists five fixes; please update it. CI passes.

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 ALLOW_RENDER_TARGET (the RTX 4090 run shows flags 1 → 0) or without unordered access, host_resource() still returns it. State::set_targets (draw.rs) and the clear path in list.rs then call host.rtv() and transition it to RENDER_TARGET, which D3D12 does not allow on such a resource. Before this change those draws were skipped cleanly; now they make invalid API calls. Either stop the ladder before dropping permissions, or have the RTV/UAV and transition paths check the host texture's real flags (#1613 adds such checks for the RTV side). Also, the doc comment's texture_ladder filter does not match the test name.

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

**@⁠Marvisak** on GitHub · 2026-11-25 03:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7152003069) · edited 2026-11-25 07:19 UTC <!-- victory-triage v1 head=3c036f7909d7a8f881213202774d8be3c6d0d08f verdict=needs-work at=2026-11-25T07:19:30Z --> Automated triage for the maintainers. **Needs work.** The branch carries only the texture-description ladder (`attempts()` / `make_texture()` in `crates/victory-gpu/src/resource.rs`), while the description still lists five fixes; please update it. CI passes. 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 `ALLOW_RENDER_TARGET` (the RTX 4090 run shows flags 1 → 0) or without unordered access, `host_resource()` still returns it. `State::set_targets` (`draw.rs`) and the clear path in `list.rs` then call `host.rtv()` and transition it to `RENDER_TARGET`, which D3D12 does not allow on such a resource. Before this change those draws were skipped cleanly; now they make invalid API calls. Either stop the ladder before dropping permissions, or have the RTV/UAV and transition paths check the host texture's real flags (#1613 adds such checks for the RTV side). Also, the doc comment's `texture_ladder` filter does not match the test name. 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](https://claude.ai/code)_
Author
Owner

@⁠fiestorra on GitHub · 2026-11-25 04:14 UTC · original

Merge check: the three GPU fixes together keep the suites where main has them

Nobody can run this from CI, so I did it here: main 940d32f with #1630, #1832 and #1778 merged into one tree (they touch resource.rs, the descriptor heap and the shader cache, and they do not conflict), then the tests and a boot.

main alone the three merged
cargo test --workspace --locked 26 suites ok, 1 failure 26 ok, 1 failure — the same one
cargo test -p victory-shader --locked --lib 247 passed, 3 ignored 247 passed, 3 ignored
cargo test -p victory-gpu --features diagnostics --lib 146 passed, 2 ignored 148 passed, 6 ignored
boot, 120 s, RTX 4090 32.0.16.2124, session 1 device removed ×2, dies at frame 64 0 removals, 2,048 frames, 13,312 draws

The one failure in both columns is victory-hle::modules::lifecycle::tests::showing_a_title_window_shows_its_stand_in, which fails on main too in a session without a desktop — it is the agent's environment, not the change.

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 host view heap capped at 1000000 once per run.

No game data is involved: test counts and frame numbers.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-25 04:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7152658457) **Merge check: the three GPU fixes together keep the suites where `main` has them** Nobody can run this from CI, so I did it here: `main` `940d32f` with **#1630**, **#1832** and **#1778** merged into one tree (they touch `resource.rs`, the descriptor heap and the shader cache, and they do not conflict), then the tests and a boot. | | `main` alone | the three merged | |---|---|---| | `cargo test --workspace --locked` | 26 suites ok, 1 failure | **26 ok, 1 failure** — the same one | | `cargo test -p victory-shader --locked --lib` | 247 passed, 3 ignored | **247 passed, 3 ignored** | | `cargo test -p victory-gpu --features diagnostics --lib` | 146 passed, 2 ignored | **148 passed, 6 ignored** | | boot, 120 s, RTX 4090 `32.0.16.2124`, session 1 | device removed ×2, dies at frame 64 | **0 removals, 2,048 frames, 13,312 draws** | The one failure in both columns is `victory-hle::modules::lifecycle::tests::showing_a_title_window_shows_its_stand_in`, which fails on `main` too in a session without a desktop — it is the agent's environment, not the change. 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 `host view heap capped at 1000000` once per run. No game data is involved: test counts and frame numbers. Written with an AI assistant.
Author
Owner

@⁠imrealynailong on GitHub · 2026-11-25 09:24 UTC · original

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 card

Tested 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 pc_format fallbacks as the cause of its black world) has no verification yet.

Setup

RTX 4060 Laptop (Ada, 8 GB), driver 32.0.15.6607, Windows 11 build 26200, i7-13620H, 16 GB. main 940d32f with #2121 (40bd210, view-heap paging), #1763 (50d91b1, typed-UAV refusal) and #579 rebased (7044040) merged in a separate worktree, then this PR (3c036f7) on top; all merges clean. Diagnostics build, --console series-s, VICTORY_KEYS drives the menus, empty cache.

I had to stack the others because without #1763 and #2121 the boot dies at the UAV device removal before any world frame.

Result

without this PR with this PR
no host texture (0x80070057) 2 0
format: 115 / 86 / 85 creation failures 1 / 0 / 0 0 / 0 / 0
host texture made only as a fallback 0 2 (flags_asked=5 and =1)
highest frame= 1,600 1,518
captured frame (VICTORY_CAPTURE + VICTORY_DUMP_TARGETS) 960×540, 1 unique colour #000000 960×540, 1 unique colour #000000

The ladder is clearly working: the 2560×1440 B5G5R5A1_UNORM creation that used to fail now succeeds as a fallback (host texture made only as a fallback flags_asked=5 flags_made=…), and two such substitutions happen over the run. format: 67 still appears twice but no longer as a creation failure.

But every captured frame is still a single-colour #000000 at 1,586 bytes — byte-identical to the black captures #904 reports on an RTX 5060 Laptop with the same VICTORY_KEYS + series-s recipe.

What that seems to rule out

#904's hypothesis is that the black world comes from the missing pc_format fallbacks for formats 85/86/115/67 and the capped view heap. With #1630 supplying the fallbacks and #2121 removing the cap symptoms (title slot past the host heap: 0 in this run), the picture is still pure black. So on this card at least, neither of those two is what makes the frame black — they were both real defects, and fixing them does not bring the scene back.

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 host pipeline refused here because #2176 is not in this stack). I am not claiming the fallbacks are unnecessary — only that they do not fix the black frame.

What I could do next, if useful

  • Add #2176 (wave32 translation) under this stack so the 141 wave64 refusals go to 0, and re-capture: that would separate "black because draws are dropped" from "black because the draws that run produce nothing".
  • Same with VICTORY_DUMP_TARGETS=1 already on: I can report which render targets at a given frame are non-black, which should say whether the G-buffer is being written at all.

Logs and the capture directories are available on request. main was not modified.

**@⁠imrealynailong** on GitHub · 2026-11-25 09:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7158293202) ## 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 card Tested 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 `pc_format` fallbacks as the cause of its black world) has no verification yet. ### Setup RTX 4060 Laptop (Ada, 8 GB), driver `32.0.15.6607`, Windows 11 build 26200, i7-13620H, 16 GB. `main` `940d32f` with **#2121** (`40bd210`, view-heap paging), **#1763** (`50d91b1`, typed-UAV refusal) and **#579** rebased (`7044040`) merged in a separate worktree, then this PR (`3c036f7`) on top; all merges clean. Diagnostics build, `--console series-s`, `VICTORY_KEYS` drives the menus, empty cache. I had to stack the others because without #1763 and #2121 the boot dies at the UAV device removal before any world frame. ### Result | | without this PR | **with this PR** | |---|---:|---:| | `no host texture` (0x80070057) | 2 | **0** | | `format: 115` / `86` / `85` creation failures | 1 / 0 / 0 | **0 / 0 / 0** | | `host texture made only as a fallback` | 0 | **2** (`flags_asked=5` and `=1`) | | highest `frame=` | 1,600 | 1,518 | | captured frame (`VICTORY_CAPTURE` + `VICTORY_DUMP_TARGETS`) | 960×540, 1 unique colour `#000000` | **960×540, 1 unique colour `#000000`** | The ladder is clearly working: the 2560×1440 `B5G5R5A1_UNORM` creation that used to fail now succeeds as a fallback (`host texture made only as a fallback flags_asked=5 flags_made=…`), and two such substitutions happen over the run. `format: 67` still appears twice but no longer as a creation failure. **But every captured frame is still a single-colour `#000000` at 1,586 bytes** — byte-identical to the black captures #904 reports on an RTX 5060 Laptop with the same `VICTORY_KEYS` + `series-s` recipe. ### What that seems to rule out #904's hypothesis is that the black world comes from the missing `pc_format` fallbacks for formats 85/86/115/67 and the capped view heap. With #1630 supplying the fallbacks and #2121 removing the cap symptoms (`title slot past the host heap`: 0 in this run), **the picture is still pure black**. So on this card at least, neither of those two is what makes the frame black — they were both real defects, and fixing them does not bring the scene back. 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 `host pipeline refused` here because #2176 is not in this stack). I am not claiming the fallbacks are unnecessary — only that they do not fix the black frame. ### What I could do next, if useful - Add #2176 (wave32 translation) under this stack so the 141 wave64 refusals go to 0, and re-capture: that would separate "black because draws are dropped" from "black because the draws that run produce nothing". - Same with `VICTORY_DUMP_TARGETS=1` already on: I can report which render targets at a given frame are non-black, which should say whether the G-buffer is being written at all. Logs and the capture directories are available on request. `main` was not modified.
Author
Owner

@⁠catminou4 on GitHub · 2026-11-24 22:19 UTC · original · reviewed

Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Adapter choice and logging + presenter backoff: a presenter that could not be made now records why and when to retry, instead of retrying DXGI every frame behind a locked screen. 50K diff across gpu/hle/shader — the largest of this wave; static review only, recommend Windows CI.

**@⁠catminou4** on GitHub · 2026-11-24 22:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#pullrequestreview-6048311966) · **reviewed** Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Adapter choice and logging + presenter backoff: a presenter that could not be made now records why and when to retry, instead of retrying DXGI every frame behind a locked screen. 50K diff across gpu/hle/shader — the largest of this wave; static review only, recommend Windows CI.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-26 12:23 UTC · original

What this branch carries now, and the one rung that waits for #1700

The description listed five changes; the branch carries one of them, the texture-description ladder (attempts() / make_texture() in crates/victory-gpu/src/resource.rs), after the branch was cut down to what still applies to main. I am not going to claim the other four here: they are their own PRs (#1591's swap-chain backoff, the adapter choice, the display deferral, the clear-value diagnosis), and mixing them made this one hard to review.

The rungs that drop permissions. You are right and it is the reason the ladder is not safe as it stands: if a texture is made without ALLOW_RENDER_TARGET, a render target view of it is an invalid call, and the draw then either removes the device or renders into nothing — exactly the failure the ladder was meant to remove, moved one step later. The rungs that only change the initial state or drop the clear value stay; the rungs that drop a permission are removed from this branch until a dropped permission is bound as a null view in its own slot rather than skipped. That work is #1700, rebased onto current main (head 9ef0e429), which is what the ladder should depend on.

So: this PR is now only the ladder minus the permission rungs, and it says so. When #1700 lands, the remaining rungs can come back in a follow-up with the boot that shows they help.

CI: check passing. I will push the trimmed ladder once I have re-run the two boots that motivated it; the 120 s boot alone would not show an invalid RTV, which is your point, and it is why the permission rungs go.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-26 12:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7191934043) **What this branch carries now, and the one rung that waits for #1700** The description listed five changes; the branch carries **one** of them, the texture-description ladder (`attempts()` / `make_texture()` in `crates/victory-gpu/src/resource.rs`), after the branch was cut down to what still applies to `main`. I am not going to claim the other four here: they are their own PRs (#1591's swap-chain backoff, the adapter choice, the display deferral, the clear-value diagnosis), and mixing them made this one hard to review. **The rungs that drop permissions.** You are right and it is the reason the ladder is not safe as it stands: if a texture is made without `ALLOW_RENDER_TARGET`, a render target view of it is an invalid call, and the draw then either removes the device or renders into nothing — exactly the failure the ladder was meant to remove, moved one step later. The rungs that only change the initial state or drop the clear value stay; the rungs that drop a permission are removed from this branch until a dropped permission is bound as a **null view in its own slot** rather than skipped. That work is #1700, rebased onto current `main` (head `9ef0e429`), which is what the ladder should depend on. So: this PR is now only the ladder minus the permission rungs, and it says so. When #1700 lands, the remaining rungs can come back in a follow-up with the boot that shows they help. CI: `check` passing. I will push the trimmed ladder once I have re-run the two boots that motivated it; the 120 s boot alone would not show an invalid RTV, which is your point, and it is why the permission rungs go. Written with an AI assistant.
github-bot force-pushed github-bot/gh-1630 from 3c036f7909 to e70d5f9007 2026-11-26 13:36:18 +00:00 Compare
Author
Owner

@⁠fiestorra on GitHub · 2026-11-26 13:34 UTC · original

The ladder keeps every permission; the rest of the old description is gone

The branch is now one change: when the host refuses a texture description, make_texture retries it without the initial state, without the clear value, and without either, before giving up. Head e70d5f90, rebuilt on 63bcca43.

Why those four rungs and no more: the refusal in #1758/#1755 is of the description, and the state and the clear value are the two things that were not in the log. A rung that drops ALLOW_RENDER_TARGET or the unordered-access permission is not in the ladder, for the reason you gave: a texture made without the render-target permission takes no view, and the draw is lost later instead of here, which is a worse failure because it looks like a rendering bug. The case that does need a stand-in is handled where it belongs, by #2332 (stand_in_for, conditional on the host) and by Host::rtv binding a null view in its own slot rather than skipping it (#1700).

Each refused rung is logged at debug with its state and whether it carried a clear value, and the final failure keeps the warn! with the description. The texture's real initial state is set from the rung that worked, so the transitions that follow do not start from a lie.

The other four changes the old description listed are not in this branch — the swap-chain backoff, the adapter choice, the display-deferral test and the clear-value diagnosis each had their own PR, and mixing them is what made this one unreadable.

Measured: cargo test -p victory-gpu --lib → 231 passed, 0 failed; cargo clippy -p victory-gpu --all-targets --locked -- -D warnings clean.

Not claimed: that this rung set fixes the 2560x1440 target on its own. With #2332 the description never reaches the host as B4G4R4A4 on the cards that refuse it, so what this adds is the honest retry for the refusals that remain, and a log line that names which argument it was.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-26 13:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7193538152) **The ladder keeps every permission; the rest of the old description is gone** The branch is now one change: when the host refuses a texture description, `make_texture` retries it without the *initial state*, without the *clear value*, and without either, before giving up. Head `e70d5f90`, rebuilt on `63bcca43`. Why those four rungs and no more: the refusal in #1758/#1755 is of the description, and the state and the clear value are the two things that were not in the log. A rung that drops `ALLOW_RENDER_TARGET` or the unordered-access permission is **not** in the ladder, for the reason you gave: a texture made without the render-target permission takes no view, and the draw is lost later instead of here, which is a worse failure because it looks like a rendering bug. The case that does need a stand-in is handled where it belongs, by #2332 (`stand_in_for`, conditional on the host) and by `Host::rtv` binding a null view in its own slot rather than skipping it (#1700). Each refused rung is logged at `debug` with its state and whether it carried a clear value, and the final failure keeps the `warn!` with the description. The texture's real initial state is set from the rung that worked, so the transitions that follow do not start from a lie. The other four changes the old description listed are not in this branch — the swap-chain backoff, the adapter choice, the display-deferral test and the clear-value diagnosis each had their own PR, and mixing them is what made this one unreadable. Measured: `cargo test -p victory-gpu --lib` → 231 passed, 0 failed; `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` clean. Not claimed: that this rung set fixes the 2560x1440 target on its own. With #2332 the description never reaches the host as `B4G4R4A4` on the cards that refuse it, so what this adds is the honest retry for the refusals that remain, and a log line that names which argument it was. Written with an AI assistant.
Author
Owner

@⁠fiestorra on GitHub · 2026-11-26 13:53 UTC · original

The ladder now has a test, and it pins the one property you cared about

Head 18812e76.

The rungs are out of make_texture's loop and into fn rungs(initial) -> Vec<(u32, bool)>, which makes the order checkable:

assert_eq!(rungs(0x0c), [(0x0c, true), (0, true), (0x0c, false), (0, false)]);
assert_eq!(rungs(0), [(0, true), (0, false)]);      // no repeated rung
assert_eq!(rungs(0x0c).len(), 4);

The property you objected to — a rung dropping a permission — is now structural and stated: rungs takes no flags, so every rung asks for the description it was given. The test says that instead of asserting something a no-op could pass; what it does pin is the order and the deduplication, which a refactor could get wrong silently.

cargo test -p victory-gpu --lib → 232 passed, 0 failed; cargo clippy -p victory-gpu --all-targets -- -D warnings clean.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-11-26 13:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/1630#issuecomment-7193970907) **The ladder now has a test, and it pins the one property you cared about** Head `18812e76`. The rungs are out of `make_texture`'s loop and into `fn rungs(initial) -> Vec<(u32, bool)>`, which makes the order checkable: ```rust assert_eq!(rungs(0x0c), [(0x0c, true), (0, true), (0x0c, false), (0, false)]); assert_eq!(rungs(0), [(0, true), (0, false)]); // no repeated rung assert_eq!(rungs(0x0c).len(), 4); ``` The property you objected to — a rung dropping a permission — is now structural and stated: `rungs` takes no flags, so every rung asks for the description it was given. The test says that instead of asserting something a no-op could pass; what it does pin is the order and the deduplication, which a refactor could get wrong silently. `cargo test -p victory-gpu --lib` → 232 passed, 0 failed; `cargo clippy -p victory-gpu --all-targets -- -D warnings` clean. Written with an AI assistant.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1630/head:github-bot/gh-1630'
git switch 'github-bot/gh-1630'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1630'
git switch 'github-bot/gh-1630'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1630'
git switch 'github-bot/gh-1630'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1630'
git switch 'main'
git merge --squash 'github-bot/gh-1630'
git switch 'main'
git merge --ff-only 'github-bot/gh-1630'
git switch 'main'
git merge 'github-bot/gh-1630'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1630
No description provided.