Repository navigation
Conversation
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):
cargo test -p victory-gpu— 50 passed, 0 failed (1 ignored) on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok
Clean diagnostic logging when a draw's render target lacks a host copy or render-target permission. Looks good.
AI-assisted (Gemini 4 Neon).
mercuryVM
left a comment
There was a problem hiding this comment.
Read only, not built (read against set_targets):
The warnings are welcome, but the new render-target arm changes which slot each target lands in (crates/victory-gpu/src/draw.rs, in set_targets):
rtvsgoes toOMSetRenderTargetsas a dense array, sortvs[i]is bound to sloti.- Before this PR, a host copy without
ALLOW_RENDER_TARGETstill gothost.rtv(..). That made an empty descriptor in its slot, so its writes were dropped and the targets after it kept their slots. - With
continue, the targets after a skipped one move down a slot. A pixel shader writingSV_Target1then lands in what the title bound as target 0. - The "no host copy" arm just above has the same shift. That predates this PR, but it is the same bug.
Fix: keep the warning, but hold the slot. Push the empty view as before, or a null-resource RTV made with CreateRenderTargetView(None, Some(&desc), handle) and the target's format, instead of continue, in both arms.
The depth arm is fine: there is only one DSV, so None loses only depth.
AI-assisted (Claude Code).
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Draws whose render target has no host counterpart are now reported explicitly instead of silently skipped (draw.rs, 2.4K). Small observability fix.
4c4afb4 to
a4617e2
Compare
…mission set_targets skipped a render target whose resource has no host copy in silence, and made a render target view for one that lost ALLOW_RENDER_TARGET anyway: CreateRenderTargetView returns nothing, D3D12 binds an empty descriptor, and the draw renders into nothing with no line saying so. That is now reachable: resource::host_texture gives up the permissions a host refuses (on the RTX 4090 the title's 2560x1440 B4G4R4A4_UNORM target is made as plain memory, flags 0), and the only trace was the fallback line at creation. Both arms now warn once, as the missing-view arm already did, and a target without the permission is skipped instead of bound empty. Depth checks ALLOW_DEPTH_STENCIL the same way.
a4617e2 to
c0f73df
Compare
|
Automated triage for the maintainers. Needs work. The new warning for a render target with no host copy (
To change the verdict: keep the warnings, put a null descriptor in a skipped slot instead of compacting, and either rebase onto the fallback once it lands or show where Generated by Claude Code |
… copy or lost its permission
A draw that renders into nothing now says so
crates/victory-gpu/src/draw.rs,set_targets(the title'sOMSetRenderTargets): two ways a render target can be lost were silent.ALLOW_RENDER_TARGETgot a render target view anyway:CreateRenderTargetViewreturnsvoid, so a refusal is invisible, D3D12 binds an empty descriptor, and the draw renders into nothing. The same for depth andALLOW_DEPTH_STENCIL, where?skipped the depth buffer silently.Why it is worth naming now:
resource::host_texturedeliberately gives up what the host refuses (that is the point of #1630), and on the RTX 4090 the title's two 2560×1440 targets come out exactly like that — theB4G4R4A4_UNORMone is made as plain memory (flags_made=0) because that adapter refuses it as a render target at all (#1600 (comment)). So a target can exist, be named by a draw, and be unrenderable, with the only trace being one line at creation time.The change:
ALLOW_DEPTH_STENCILis skipped with its own line instead of?.Verification
cargo test -p victory-gpu --locked→ 50 passed, 1 ignored;cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warningsclean;rustfmt --checkclean for the lines added.What I did not capture: a live draw binding one of those targets in a run. The title only creates those two 2560×1440 targets in some runs (they appear in one 60-second run and not in the next two on the same adapter), so the positive path is reasoned from the creation-time fallback line rather than observed here. If someone can run it where those targets appear, the new line names the resource.
No game data is involved: resource handles and flags only.
Written with an AI assistant.