GPU: adapter choice and logging, presenter backoff, a texture-description ladder, and a display-deferral test a headless session can pass #1630
No reviewers
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!1630
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1630"
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 20:02 UTC · original
fiestorra:fix/presenter-backoff-and-texture-fallbacks→main· +64 −12 · 1 files · 2 commits · openThe 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_textureretries it without the initial state, without the clear value, and without either, before giving up. Heade70d5f90, rebuilt on63bcca43.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_TARGETor 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 byHost::rtvbinding a null view in its own slot rather than skipping it (#1700).Each refused rung is logged at
debugwith its state and whether it carried a clear value, and the final failure keeps thewarn!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 warningsclean.Not claimed: that this rung set fixes the 2560x1440 target on its own. With #2332 the description never reaches the host as
B4G4R4A4on 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:03 UTC · original
Status of the checks, and the two ways to unblock them
CIfor this head is inaction_required(https://github.com/Marvisak/VIctory/actions/runs/45476638884): GitHub holds the workflow for a first-time contributor until a maintainer approves it, sogh pr checksreports nothing yet and the merge state isUNSTABLEonly 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.
@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
964cdbd67ef1fa8ecb0fa0ddbd17294183167146on 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
54b333fplus #967 adapter selection. Before texture commit: local2c77331; after:dc5210e. Both runs explicitly log RTX 5090 selection and Emulate wave64 mode. No driver changes between runs.Measured
no host texturemessage 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.
@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
dc73ccetocrates/victory-gpu/src/resource.rs: an ignored GPU test,a_refused_description_still_leaves_a_texture, that makes the creation the old code made — theB5G5R5A1_UNORM2560×1440 target with render-target and unordered-access, and a clear value naming a format the resource does not have — and checks both arms:cargo test --release -p victory-gpu -- --ignored --nocapture a_refused_description_still_leaves_a_textureSo 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_UNORMwith a UAV and keeps both permissions (flags0x5), while the RTX 4090 refuses that format with a UAV and the texture is made as a render target only (flags0x1), 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_UINTmade from a clear namingR32_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 warningsclean;rustfmt --checkclean on the file.Written with an AI assistant.
@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:B5G5R5A1_UNORMtarget: 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.B4G4R4A4_UNORMtarget: 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 aflags 0texture can never be an RTV — is in #1600, because it is a policy choice rather than a measurement.Written with an AI assistant.
@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.
@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 itI ran the whole recipe on a branch that contains only the
draw.rschange from #1700 (so itsdisplay.rsismain's), on the same machine I have been measuring on:0x80070032is exactly the code this pull request'ssdr_and_display_deferralschange accepts alongsideS_OK, with contract assertions on what each path must leave behind. On this branch (with it) the same command exits 0:So the change is not cosmetic: on a Windows session where the display stack answers
NOT_SUPPORTEDfor that deferral,mainfails 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(driver32.0.21045.29003) andRTX 4090(driver32.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,mainis 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 --checkoncrates/victory-gpu/src/host.rsreports 25 hunks on this branch and 25 onmain— the same pre-existing ones, so nothing here adds formatting debt (I did not reformat other people's code).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
Correction to one line above: eight commits, not six
The diff size was right (+967/−50); the count was not. The branch has eight commits, and they are:
Each still stands on its own, and for a reviewer who wants them separately rather than as a bundle I am happy to split the branch — the natural cut is the presenter backoff, the texture ladder plus its test, and the adapter work (selector, logging, the every-adapter probe, and the README row).
No game data is involved.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-24 21:53 UTC · original
Rebased onto
main(70564ae) — and the ladder had to move, not just be re-appliedmainmoved 28 commits ahead while this was open, and the conflict was inresource.rs, wherehost_texturebecamemake_textureand now also asks for castable formats throughCreateCommittedResource3(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.Three things this cost, worth knowing if you have a branch touching
make_texture:initial = 0when the castable creation succeeds, so the common state is what is asked for first);attemptsis unchanged; thestateit now returns updatesinitialbeforeHostTexture::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 fromHostTexture::state), and it still shows the case it was written for on the integrated adapter (driver32.0.21045.29003, session 0):Verification after the rebase, whole workspace:
cargo test --workspace --locked→ 24 suites, 0 failures (this branch also carries the display-deferral fix, so thesdr_and_display_deferralsfailure thatmainhas in this headless session does not appear here);cargo clippy --workspace --all-targets --locked -- -D warningsand 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.rsreports the same 41 hunks asmain,resource.rsthe same 15,display.rsnone — nothing here adds formatting debt.The diff against
mainis 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 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, driver32.0.21045.29003):id=599id=1419main70564aeSo on this machine this change alone is enough to stop the removal, while the texture ladder alone is not — it removes the
no host textureline 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 1000000and 310,720title 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: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, driver32.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: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:
—
index=1is the AMD in session 1, the reverse of session 0, which is what made me notice.What this changes, and what it does not:
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.B5G5R5A1_UNORM), the title in session 1 (RTX 4090, which does not). There was never a discrepancy — different device, different answer.32.0.21045.29003for a session-1 run should read32.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.VICTORY_D3D12_ADAPTERis session-dependent, and a name substring is not. UseVICTORY_D3D12_ADAPTER=nvidiaor=amd, and check thehost 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: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:
main70564ae+ #1832 + #1778 + this,diagwith the D3D12 debug layer and DRED on, session 1, real window 3840×2160, empty cache, RTX 4090 (driver32.0.16.2124).mainid=599id=1419no host texturemade only as a fallbackdraws=13312)draws=13312)Two things to take from that, and one of them is not flattering to this pull request:
B4G4R4A4_UNORM1440p 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.host view heap capped at 1000000with 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 ofresource::tests.No game data is involved: counts and warnings only.
Written with an AI assistant.
@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=1toframe=2048:mainSo, restated properly:
B4G4R4A4_UNORM1440p target exists as plain memory andno host texturegoes 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.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-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 requestmainmoved to42363aband this branch stopped merging. Rebuilding it against the newmainshowed that most of what it carried is now either inmainor 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
mainalready has, which this branch was also doing:Presentation { presenter, retry: SwapChainRetry }incrates/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.main'ssdr_and_display_deferralsalready acceptsNOT_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()andmake_texture()incrates/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 texturefor the 2560×1440B4G4R4A4_UNORMtarget, and the texture exists afterwards ("made only as a fallback").GPU: a GPU test for the description ladderandGPU: 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:
VICTORY_D3D12_ADAPTER, thehost 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 inhost.rswere really about. I will open it separately rather than hold the ladder behind it.Verification on the rebased branch:
cargo test -p victory-gpu --locked142 passed, 5 ignored;cargo test --workspace --locked26 suites ok;clippy --workspace --all-targetswith and without--all-featuresclean under-D warnings;rustfmt --checkonresource.rs15 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_infails on42363abalone in this headless session (checked by running it withmainchecked out). Thesdr_and_display_deferralsfailure I used to mention here no longer happens, becausemainfixed it.No game data is involved: descriptions, formats and test counts.
Written with an AI assistant.
@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()incrates/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 inlist.rsthen callhost.rtv()and transition it toRENDER_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'stexture_ladderfilter 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
@fiestorra on GitHub · 2026-11-25 04:14 UTC · original
Merge check: the three GPU fixes together keep the suites where
mainhas themNobody can run this from CI, so I did it here:
main940d32fwith #1630, #1832 and #1778 merged into one tree (they touchresource.rs, the descriptor heap and the shader cache, and they do not conflict), then the tests and a boot.mainalonecargo test --workspace --lockedcargo test -p victory-shader --locked --libcargo test -p victory-gpu --features diagnostics --lib32.0.16.2124, session 1The one failure in both columns is
victory-hle::modules::lifecycle::tests::showing_a_title_window_shows_its_stand_in, which fails onmaintoo 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 1000000once per run.No game data is involved: test counts and frame numbers.
Written with an AI assistant.
@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_formatfallbacks 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.main940d32fwith #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_KEYSdrives 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
no host texture(0x80070057)format: 115/86/85creation failureshost texture made only as a fallbackflags_asked=5and=1)frame=VICTORY_CAPTURE+VICTORY_DUMP_TARGETS)#000000#000000The ladder is clearly working: the 2560×1440
B5G5R5A1_UNORMcreation 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: 67still appears twice but no longer as a creation failure.But every captured frame is still a single-colour
#000000at 1,586 bytes — byte-identical to the black captures #904 reports on an RTX 5060 Laptop with the sameVICTORY_KEYS+series-srecipe.What that seems to rule out
#904's hypothesis is that the black world comes from the missing
pc_formatfallbacks 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 refusedhere 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
VICTORY_DUMP_TARGETS=1already 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.
mainwas not modified.@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.
@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()incrates/victory-gpu/src/resource.rs), after the branch was cut down to what still applies tomain. 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 currentmain(head9ef0e429), 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:
checkpassing. 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.
3c036f7909toe70d5f9007@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_textureretries it without the initial state, without the clear value, and without either, before giving up. Heade70d5f90, rebuilt on63bcca43.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_TARGETor 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 byHost::rtvbinding a null view in its own slot rather than skipping it (#1700).Each refused rung is logged at
debugwith its state and whether it carried a clear value, and the final failure keeps thewarn!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 warningsclean.Not claimed: that this rung set fixes the 2560x1440 target on its own. With #2332 the description never reaches the host as
B4G4R4A4on 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: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 intofn rungs(initial) -> Vec<(u32, bool)>, which makes the order checkable:The property you objected to — a rung dropping a permission — is now structural and stated:
rungstakes 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 warningsclean.Written with an AI assistant.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.