GPU: preserve typed null render target slots #450
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!450
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-450"
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?
@fuzeofficlal on GitHub · 2026-11-24 03:32 UTC · original
fuzeofficlal:fix/typed-null-rtv→main· +232 −9 · 5 files · 2 commits · openA typed null RTV still occupies an output slot. Skipping it in
State::set_targetsmoves the next live target into the wrong slot. Keep the typed null descriptor in the host binding array and track only live textures for state transitions and capture.The regression draws two colors with a null RGBA8 RTV in slot 0 and a live RGBA8 RTV in slot 1. The PSO uses UNKNOWN for slot 0. Before the fix, the D3D12 debug layer rejected the live target bound to slot 0. With the fix, all 16 pixels in the live texture receive the color from SV_Target1 on native D3D12 and WARP.
cargo test -p victory-gpu --features diagnosticspassed with 47 tests and one ignored benchmark. The default suite passed with 44 tests and one ignored benchmark. The default view lookup also returns no format when there is no resource. The staged asset policy check passed.@DeerSilver on GitHub · 2026-11-24 11:01 UTC · original
Tested head
93edd8emerged ontomainffe310e(clean merge) on NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1: pass. No game files: the test suite only.a_missing_resource_has_no_default_view_formatcargo test --workspace --locked: 343 passed, 0 failed, 6 ignored, against 342 passed / 6 ignored onmain.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 00:18 UTC · original · edited 2026-11-26 01:22 UTC
Automated triage for the maintainers.
Merge candidate (re-checked on
6d96d4a). The change is the same as before the push.State::set_targetsincrates/victory-gpu/src/draw.rsbinds a typed null RTV in its own slot throughHost::rtv(None, Some(&desc))instead of skipping it, so later targets no longer shift down a slot. The new commit reordersresource::view_formatso it callshost_resource(which returnsNonefor a null pointer) before it dereferences the record. A small test,a_missing_resource_has_no_default_view_format, covers that.Overlap still stands: #1613 handles more skipped-slot cases, but it does not merge cleanly into
mainat the moment. The maintainer can pick one PR and fold the other's extra cases into it.CI: passing (
check).Generated by Claude Code
@AgneyaK on GitHub · 2026-11-25 03:47 UTC · original
Heads-up on overlap: #1613 (updated today) now also keeps a skipped render-target slot with a null view. It covers this PR's typed null view (including one with no description, which this PR still skips) and targets with no recorded view or no host texture. The last is the NVIDIA case on
main, where a refused 2560x1440 target shifts the later ones. Its test checks both the no-view and the typed-null-view case againstmain.Your test pins the PSO's slot 0 to
UNKNOWN, which is a useful extra case. Happy to fold anything from here into #1613, or the other way round, whichever the maintainer prefers.AI use: Claude Code (Claude Opus 5.5) wrote this.
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.