GPU: the two 2560x1440 targets a boot asks for are refused by the host, and the log does not say why #1600
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#1600
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@fiestorra on GitHub · 2026-11-24 19:41 UTC · original
What's wrong
A windowed boot asks the host for two 2560×1440 textures and never gets them. Both
CreateCommittedResourcecalls fail withE_INVALIDARG, in both of my 900-second runs, at the same two descriptions:Format 86 is
DXGI_FORMAT_B5G5R5A1_UNORM, 115 isDXGI_FORMAT_B4G4R4A4_UNORM; flags 5 is render-target and unordered-access, flags 1 is render-target. 2560×1440 is the title's internal render size, and both appear 6 and 11 seconds into a run that presents, right afterpresenting to a window width=3840 height=2160— never in a run that cannot present (mine could not, today). A texture with no host copy cannot be an RTV, an SRV or a UAV, so every draw that names one is lost, and nothing in the log says which argument the host refused.What the host actually accepts
An ignored GPU test asks for exactly those descriptions on the hardware adapter (
cargo test --release -p victory-gpu -- --ignored --nocapture packed_formats). Three findings:ALLOW_RENDER_TARGET1,ALLOW_UNORDERED_ACCESS4, both 5, and the neighbours 87 and 28 too). OnlyALLOW_RENDER_TARGET | ALLOW_DEPTH_STENCIL(3) is refused, as documented.E_INVALIDARG.D32_FLOAT_S8X24_UINT(19) is refused with a clear naming 19 and accepted with a clear namingR32_FLOAT_X8X24_TYPELESS(20);R16_TYPELESS(53) is accepted with a clear namingD16_UNORM(55) and refused with 53. Victory passes the title's clear through untouched, which is exactly what the host wants here: those depth textures have always been created, and a first version of this patch that dropped every clear whose format differed from the resource's silently dropped 358 legitimate depth clears in a 60-second boot. That version is not what is below.0xC(render target and unordered access together),0x1,0x2and0x200(buffer-only states) fail, while0x4,0x8,0x40,0x80and0xC0pass.So the description is fine, and one of the two other arguments — the initial state, or the clear value's format — is what the host refuses on those two colour targets. Neither was in the log, which is the defect worth fixing first: a failure that cannot be diagnosed from the run.
The patch
crates/victory-gpu/src/resource.rs:state(what the host was asked for),title_state(what the title named) andclear.host_texturetries a short ladder of descriptions, most faithful first: what the title asked for; then in the common state; then without the clear value; then without unordered access; and last as plain memory. The state and the permission the title asked for are kept as long as the host takes them, the first description the host accepts is used, and a warning names what was given up (flags_asked/flags_made,state_asked/state_made,clear_asked/clear_dropped), once per texture.HostTexture::stateused to assume the asked state).Verification
cargo test -p victory-gpu --locked→ 56 passed, 0 failed (2 ignored: an existing benchmark and the new GPU probe), including a test of the ladder's order and of its first attempt being exactly what the title asked.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings→ clean, with and without--features diagnostics.no host texture, no fallback taken — identical to unpatchedffe310ein the same state, so nothing that worked before changes.What I could not do: name which argument the host refuses in those two cases. My machine cannot create a swap chain today (
CreateSwapChainForHwnd→0x887A0022,step="swap chain", after the backoff patch in #1591), 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 with one boot of the diagnostics build atVICTORY_LOG=info: theno host textureline now carriesstate,title_stateandclear, and if the ladder took over there is ahost texture made only as a fallbackline. Please paste either line here.Patch below (against
ffe310e; applies independently of #1591):crates/victory-gpu/src/resource.rs (+318 −43)
No game data is involved: no shaders, textures, keys or package bytes, only descriptions, states and error codes.
Written with an AI assistant.
github-bot referenced this issue2026-11-26 04:38:56 +00:00
@DrDarkDK on GitHub · 2026-11-24 19:52 UTC · original
Reproduced both 2560×1440 allocation failures in a windowed boot on
ffe310ewith logging added atCreateCommittedResource. Windows 11 build 26300.9974, RTX 4070 Ti, driver 621.01.B5G5R5A1_UNORM), flags0x5: D3D12 message 599 identifiesALLOW_UNORDERED_ACCESSas unsupported for this format.B4G4R4A4_UNORM), flags0x1: message 599 identifiesALLOW_RENDER_TARGETas unsupported for this format.Both calls had title and host initial state
COMMON(0x0) and a clear value whose format matched the resource. Both also returnedE_INVALIDARGwith the debug layer disabled.AI-assisted with Codex.
@fiestorra on GitHub · 2026-11-24 20:19 UTC · original
Correction: this measurement ran on the integrated GPU, not on the RTX 4090, and the probe asked that one
The two 900-second boots behind this report, and the
packed_formatsprobe I quoted, all took adapter 0, which on this machine isAMD Radeon(TM) Graphics, the Ryzen's integrated GPU (driver32.0.21045.29003). The RTX 4090 is adapter 1 (32.0.16.2124, the 621.24 marketing version):D3D12CreateDevice(None, …)takes DXGI's default, the first adapter enumerated. So "the hardware adapter" in the report is that one, not the 4090.The matrix itself is unaffected — those descriptions are legal on the adapter that was asked — and the two
E_INVALIDARGcreations are still unexplained and still reproducible only from a session that can present.A note that came out of this, for anyone reading pipeline verdicts:
translate --pipelinesbuilds its own device and, until #1630, had no way to choose the adapter, so its verdicts are the default adapter's. Over the whole archive that difference is large: adapter 0 creates 0 of the title's 8,214 mesh pipelines and all 1,441 compute ones, the RTX 4090 creates 8,214 of 8,214 mesh and refuses 320 of the 1,441 compute ones withE_INVALIDARG.Written with an AI assistant.
@fiestorra on GitHub · 2026-11-24 20:44 UTC · original
One qualification on the probe result, from running the same description on the other adapter
The matrix in the report ("those descriptions are legal with every flag combination tried") was measured on adapter 0, the integrated GPU, because
packed_formatsbuilds its device withD3D12CreateDevice(None, …). The regression test now in #1630 runs the same 2560×1440B5G5R5A1_UNORMdescription throughhost_texturewith the selector set, and the two adapters disagree:So on the RTX 4090
ALLOW_UNORDERED_ACCESSon that format is refused, and only the render-target permission survives. That does not change the report's conclusion — the two original failures happened on the integrated GPU, where the description is legal and the refusal therefore comes from the state or the clear value — but the sentence should read "legal on the adapter that was asked", not "legal".Written with an AI assistant.
@fiestorra on GitHub · 2026-11-24 20:46 UTC · original
Update: on the RTX 4090 the same two targets need the fallback, and this is what each loses
I re-ran the same 60-second boot on the other adapter of this machine (adapter 1,
NVIDIA GeForce RTX 4090, driver32.0.16.2124, chosen withVICTORY_D3D12_ADAPTER; the earlier reports were adapter 0, the integrated GPU). With the description ladder of #1630 in place, both 2560×1440 targets appear, and both as fallbacks:B5G5R5A1_UNORM(86), asked withALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESS: the RTX 4090 refuses the UAV permission for that format, so the host copy is a render target only (flags 1). The clear value is the one the resource names and is kept, so the UAV permission was the refusal — the same refusal thepacked_formatsprobe reproduces directly.B4G4R4A4_UNORM(115), asked withALLOW_RENDER_TARGET: the RTX 4090 refuses the render target too, and refuses the creation even with the clear value in the resource's own format (clear_asked=115), so the only description it takes is plain memory (flags 0) with no clear. So on this GPU that target cannot be rendered into at all.What that means for the boot, honestly: the ladder keeps the textures (without it there is no host copy and every draw that names them is lost), but it cannot keep what the host refuses. A
flags 0texture can still be a shader resource; it can never be a render target, so the draws that render into (115) have nowhere to land, and the UAV writes to (86) go nowhere. Both are logged once, which is the only way anyone would know.Two things I would like the maintainers' judgement on, because they are policy and not measurements:
The other refusal in the same run is the one already noted at the top:
view the host does not allow unordered=true format=53 flags=2, a UAV view of a typeless depth resource, which is a different case and is correctly refused.No game data is involved: descriptions, flags, states and counts only.
Written with an AI assistant.
@Marvisak on GitHub · 2026-11-25 12:48 UTC · original
Automated triage for the maintainers.
Still as described on
main(940d32f):host_textureincrates/victory-gpu/src/resource.rsmakes oneCreateCommittedResourceattempt and on failure logs onlyno host texturewith the description, not the initial state or the clear value, and the texture then has no host copy.The comments settle the cause on discrete NVIDIA cards (RTX 4070 Ti, RTX 4090): the host refuses
ALLOW_UNORDERED_ACCESSonB5G5R5A1_UNORM(86) andALLOW_RENDER_TARGETonB4G4R4A4_UNORM(115). The same two textures are reported in #735, #797 and #1753; open PRs #89, #1787 and #1843 address them (#89 makes them in a supported format), and #1763 covers typed UAVs in such formats. The body's ladder patch is carried by open PR #1630 (also adapter selection and presenter backoff). Your policy questions (whether the ladder should go down to plain memory, and how loudly a dropped UAV permission is logged) are for the maintainers and best settled in #1630's review.Generated by Claude Code
@zdaniukdmitry on GitHub · 2026-11-26 16:20 UTC · original
Same family on an RTX 4060 (driver 610.88), plus one more format. Besides the 2560×1440
E_INVALIDARGabove, two calls removed the device outright before the world was reached:CreateCommittedResource3:D3D12_CLEAR_VALUE::Format = B4G4R4A4_UNORMon a resourcewith
ALLOW_RENDER_TARGETat FL 12.2 — "must be valid to be used as a render target".D3D12_RESOURCE_DESC::FormatwasB5G5R5A1_UNORMin the next one:GetResourceAllocationInfo:B5G5R5A1_UNORMwithALLOW_UNORDERED_ACCESS— "must becreated with a format that either can be used as unordered access, or cast to a format
that could be used as unordered access".
Mapping 85 (
B5G6R5_UNORM), 86 (B5G5R5A1_UNORM) and 115 (B4G4R4A4_UNORM) toB8G8R8A8_UNORMinpc_format(crates/victory-gpu/src/resource.rs) got past both, andthe
no host texture ... 0x80070057lines for formats 86/115 disappeared from my runs.Channel order is preserved (all of them are B, G, R, A), but such textures now take 4×
the memory and a 4444/565 render target becomes 8888 — whether that is the right mapping
is your call, I only report what unblocked the run.
The world hang that follows on this card is reported in #71.
Assembled with an AI assistant from local logs; I reviewed the text.