fix(gpu): add integer RT blend bypass and merged readback run handling #3469
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!3469
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3469"
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?
@legayclightning22 on GitHub · 2026-11-27 04:22 UTC · original
legayclightning22:fix/integer-rt-blend-and-merged-readbacks→main· +263 −3 · 5 files · 1 commits · openSummary
Adds integer (UINT/SINT) render-target blend bypass preserving
RenderTargetWriteMaskalongside merged readback/shadow run detection and relay packing (414f893,+263/-3).Changes
Verification
cargo test --locked -p victory-gpu --lib(231 passed, 1 ignored, only the 3 known baseline hardware failures)cargo clippy --locked -p victory-gpu --all-targets --all-features -- -D warningscargo xtask policy@oni-swr on GitHub · 2026-11-27 04:46 UTC · original
WARP test report (
victory-gpu,--features diagnostics --lib --locked --no-fail-fast -- --test-threads=1)OS: Windows 11 Pro 10.0.26200 (build 26200.9974), x64
Host adapter: WARP only (VICTORY_WARP=1 and VICTORY_D3D12_WARP=1; d3d10warp.dll 10.0.26100.9818); no physical GPU used.
victory-gpuonly honoursVICTORY_D3D12_WARPwith thediagnosticsfeature, so the run uses it; a test that prints its adapter reported "Microsoft Basic Render Driver".dxil.dll: Windows SDK 10.0.26100.0, version 1.8.2502.11 (via VICTORY_DXIL)
rustc/cargo: 1.98.1 (48a229cea 2026-09-01)
Base: main
63bcca43c6Head:
414f893d69(fast-forwards onto main, no conflicts, 5 files)host::relay_tests::readback_packs_dirty_ranges_without_reordering_their_landings,pipeline::host::tests::integer_target_bypasses_blending_and_preserves_mixed_target_masks,shadow::changed_runs_are_exactly_the_bytes_that_differ. No other test changed result. The one ignored test is the same on both.Review note (diff read, not a full audit):
apply_integer_blend_bypassis not behind a switch. That is fine for a validity fix: it returns early unless the blend state is enabled and a bound target is an integer format, so draws without an integer target are untouched. The shared-blend case (IndependentBlendEnableoff) expands slot 0 to every target before clearing the integer ones, which the second half of the new test checks.read_indirectgoes throughpack_relay_fetch/copy_fetch_runs. The arguments and the count are given different ids, so they are never merged and the readback layout is unchanged from before (arguments at 0, count atlen).merge_writeback_runsis on by default, not opt-in: on a host with at least 8 GiB of VRAM budget and 16 GiB of free RAM (wide_back), or withVICTORY_WIDE_BACK=1, only the changed runs are merged.VICTORY_WIDE_BACK=0orVICTORY_CARD_REHASH_RUNS=0gives back the whole-range path. The output bytes should be the same either way (the title bytes are synced into the copy in both), but the merged-run path differs by machine, so the machine used for a test run decides which path it covers. This WARP run does not tell which side of that threshold a given PC lands on.AI-assisted (Claude). Aggregate counts only; no game files used.
@futurepro62 on GitHub · 2026-11-27 09:56 UTC · original
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
414f893(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 869 passed, 0 failed, 10 ignored.readback_packs_dirty_ranges_without_reordering_their_landings,integer_target_bypasses_blending_and_preserves_mixed_target_masks,changed_runs_are_exactly_the_bytes_that_differ.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
@legayclightning22 on GitHub · 2026-11-27 13:42 UTC · original · edited 2026-11-27 16:48 UTC
Thanks @oni-swr and @futurepro62 for running the WARP and RTX 5070 Ti verification passes! Both CI and hardware/WARP runs are green with all 3 new tests passing, so
414f893is ready for review/merge.@passerbyyhx on GitHub · 2026-11-27 19:01 UTC · original
Windows pixel readback at
414f893d69ee2a7654c88675f7b0bbab542a2270and parent63bcca43c6a00a758510398fa43096ce7e4f7df0, on RTX 4090 Laptop (621.14) and Microsoft WARP. A synthetic MRT draw writes UINT, SINT and UNORM targets over distinct nonzero background channels. The shared write mask was 0x5; the independent masks were 0x5/0xA/0x6. Integer channels selected by the effective mask were replaced, other channels retained their background values, and the UNORM target distinguished additive blending from the blend-disabled control. The scissored-out pixels stayed unchanged. No errors during the measured draw/readback.Both revisions produced the expected pixels on both adapters. On parent the parsed state still carried the original blend enable/masks and the existing host-side preparation normalized them. Head canonicalizes earlier. This verifies no observed change in these rendered pixels; it does not attribute a pixel regression to the parent.
Synthetic MRT fixture. GTA-VI-3/EIGHT-20261127. AI-assisted with Codex.
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.