gpu(native): keep colour attachment slots when a target has no host texture #61
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!61
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/61/head"
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?
@ShadyUnderLight on GitHub · 2026-11-26 12:07 UTC · original
ShadyUnderLight:fix/target-slots→main· +72 −7 · 4 files · 3 commits · merged 2026-11-26 12:58 UTCSummary
OMSetRenderTargetsdropped targets the host could not make, shortening the colour list so every later target moved down one slot; the binding is now refused instead.Problem
glue::targetsbuilt the colour list withfilter_map, so a target without a host texture (an unrepresentable format, or an RTV naming a resource with no texture) vanished from the middle of the list.rp.color[i]tocolorAttachments[i], and the guessed pipeline is made from the same shortened format list, soSV_TargetNwrites a surface an earlier slot owns.filter_maphas the same effect for an unknown or stale RTV handle.Fix
targets_readyon the title list records that state;graphicsdrops a draw while it is false.Tests
a_target_the_host_cannot_make_does_not_shift_the_ones_after_itbinds [format 12, format 28]; on main the bound format list has one entry (the second target moved into slot 0), here it is empty, and binding the makeable target again gives one.Baseline failure:
With the change:
test result: ok. 1 passed; 0 failed.Verification
cargo test -p victory-gpu a_target_the_host_cannot_make_does_not_shift_the_ones_after_it— ok.cargo test -p victory-gpu(native arm64) — 146 passed, 0 failed, 1 ignored.cargo test -p victory-metal— 9 passed, 0 failed.cargo clippy --workspace --all-targets --target x86_64-pc-windows-gnullvm -- -D warnings— clean.cargo clippy -p victory-gpu --all-targets -- -D warnings— the only errors are the two pre-existingunnecessary_castfindings incrates/victory-metal/src/present.rs:126,144; the same two appear on unmodifiedorigin/main, so this change adds none.cargo xtask policy—asset policy: 365 files ok.cargo build --release --target x86_64-apple-darwin -p victory— ok.recorded=13524 encoded=13524 no_pipeline=0 no_texture=0, 11 "frame presented" lines (lastframe=1024). The title does not hit this path today, so the fix is a latent correctness fix; no frames were lost.Risk
Optioncollect and a bool.Notes
All English, no game data in the repo. Found while auditing the native render-target path.
@LakshanSivakumar on GitHub · 2026-11-26 12:48 UTC · original · approved these changes
Thanks. Positional colour-slot resolution with the whole binding refused when a slot is missing looks right, and the test fails on main. Approved.