Tested merge candidate: open PRs added a batch at a time, each batch built, tested and run on the title (replaces #3327) #3409
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!3409
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3409"
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?
@pes7 on GitHub · 2026-11-26 22:51 UTC · original
pes7:merge/tested→main· +8483 −593 · 35 files · 147 commits · openDraft, a tested merge candidate.
mainplus 53 open pull requests, added a few at a time. Each step was checked by building, testing and running the title, so maintainers can see which PRs are known to work together and with the title. It replaces #3327, which is closed (see below for why).Nothing here closes or replaces any of these pull requests: each stays open and is closed only when it lands in
main. If it helps, merging this branch lands them all at once with the checks below already done. Picking single PRs from the list is just as fine.Why a smaller tested set, not everything that is green
In #3327 I merged every open PR that merged cleanly and had a green
check, 375 of them. That set builds and passescargo test, but it does not run the title. Each problem below was found by bisecting that set or by others' reports:0x887A0004) about 70-90 s in, at the first cutscene, on a machine with three adapters. One cause found in the set was #967 (the adapter choice); other combinations still did it after #967 was reverted.xmem/ guard PRs. #2848's guard-reopen commit was one of them, confirmed independently in #2848 by @Jackster and since removed from it.lower.rsgrowing past the 512 KiB asset policy once enough shader PRs are combined.So "mergeable and green" alone is not enough: individually fine PRs break the title in combination. This branch therefore grows only by steps that keep the title running.
How each PR got in
PRs taken, most useful first:
merge-candidateon their current head;They were added in batches (six at first; later rounds larger, halved on failure). Since the device-removal fix, every new state also gets three title runs, with the D3D12 debug layer on. A batch stays only if all of these hold:
cargo check --workspace --all-targets --lockedcargo test --workspace --locked: 0 failures (the one known flakyrelaunch_closes_its_duplicated_process_handleis ignored)diagnostics, Series X, a scriptedEnter/ hold schedule through #3392, warm shader cache), judged automatically, with screenshots every 30 s also looked at:device removed;A batch that fails is halved until the PR that fails it is out. That PR is listed with the reason.
The base,
main+ #3392 alone, reaches the prison yard in 300 s with 10 552 draws a frame. #3392 is in the base only because the scripted input needs a held key.In this branch (53)
Batch 1, title OK (max 10132 draws a frame):
Batch 2, title OK (max 11200 draws a frame):
Batch 3, title OK (max 10581 draws a frame):
Batch 4, title OK (max 11409 draws a frame):
Batch 5, title OK (max 10827 draws a frame):
Batch 6, title OK (max 10317 draws a frame):
Batch 7, title OK (max 10578 draws a frame):
Batch 8, title OK (max 10473 draws a frame):
Batch 9, title OK (max 11812 draws a frame):
Batch 10, title OK (max 11017 draws a frame):
A fix on top: #3540 (an invalid raw SRV removed the device)
After the batches from #2472 to #1701, the title removed the device in 3 of 4 runs, about 200 s in. #2472 + #3035 had also needed a second run. Each time it was
DXGI_ERROR_INVALID_CALL. WithVICTORY_D3D12_DEBUG=1the debug layer named the call:CreateShaderResourceViewof a raw view withFirstElement (2). The host wants raw views to start on 16 bytes; the console takes any dword.This is in
main(buffer_srv), not in any of the PRs here. The PRs only change which host copies exist, so the faulting view came up more often. #3540 makes raw views (SRV, UAV and constant buffers) take a copy that starts on 16 bytes. It is merged here as its own commit.With it, the same set: 3 of 3 title runs with no device removal and no raw-view message from the debug layer;
cargo test --workspace930 passed, 0 failed;clippy -D warningsclean, also with--all-features.Merges adapted here, not in the PRs
#450 changes
Host::rtvto takeOption<&ID3D12Resource>. Tests written againstmainstop compiling next to it: #2962's (1e25b23), and #2729's and #642's (965d938). These commits change only those test calls,&xtoSome(&x).Tried and left out
Conflict with the set so far (need a rebase onto it, not judged)
#2821, #2542, #2727, #3065
Status
victory-shader(about 140), in the same way, as the machine is free for title runs. This branch is pushed only at points where the title run passed. A failing run is repeated before a PR is left out, since a device removal can come and go.Known and open: in about one run in three, the cutscene picture stays black for about 60 s (roughly 120-180 s in) while the subtitles keep going, and then the world appears normally. It happened on an earlier state of this branch too, so it does not come from the latest additions. The cause is not known yet, and I have not compared it with
mainalone.Not checked: other GPUs (the batch runs are on one machine's integrated AMD Radeon; NVIDIA reruns pending) and Series S mode. The tests ran on the same machine's GPU.
🤖 Generated with Claude Code
In the user-data loop, a dword numbered `ROOT_VIEW_OFFSET` (4) was taken for a root view's offset without asking whether the parameter was a root descriptor at all. Root constants with five or more dwords have a real dword 4; it was looked up as a root view, none was found, and the draw or dispatch was refused ("a root view's offset: no root view, or outside title buffers") with no log line. The ray-tracing builder's dispatches were among the casualties. Ask `u.root == RootType::Descriptor` too, through a helper beside `is_root_view`, so a root constant's dword 4 goes to the title's user data as the value it is. The test pins the predicate: descriptor dword 4 is an offset, constants and table dword 4 are not.Title buffer views reached CreateShaderResourceView and CreateUnorderedAccessView with the title's own format. The title's heap holds views the host refuses: made for its own runtime, or old ones in slots it does not use. On WARP with the debug layer: - a raw view of R32_UINT: "When creating a RAW Shader Resource View, the format must be DXGI_FORMAT_R32_TYPELESS", then device removal (DXGI_ERROR_INVALID_CALL) for the shader resource view; - a structured view with a format: "it must be DXGI_FORMAT_UNKNOWN"; - a typed view of a typeless format: "cannot be used when creating a typed View of a Buffer". A raw or structured view reads its bytes whatever its format says, so it is now made in the format the host wants (R32_TYPELESS, UNKNOWN); a raw view with a structure stride, or a typed view of no format or a typeless one, has none and stays null, with a warning once. Structure strides are left as they are (2, 6 and 4096 are taken by the debug layer). Test: buffer_views_take_a_format_the_host_takes. From DexNom/VIctory@570a941e9b (buffer_view_ok in descriptor/host.rs), reworked: views are corrected where their bytes do not depend on the format instead of refused, and the stride limits and the raw 16-byte start, which the debug layer does not ask for or which #123 covers, are left out. Co-authored-by: DexNom <[email protected]>VICTORY_KEYSentries can hold a key, so a scripted run can walk 5723344383`VICTORY_KEYS=<seconds>:<key>` held each key for 200 ms: enough for a menu press, not for walking. An entry now takes an optional third field, the hold in milliseconds: VICTORY_KEYS=10:Enter:300,20:Enter:300,200:W:6000 Without it the hold stays 200 ms, so existing schedules behave as before. Both the keyboard device and the stand-in pad see the keys (`Enter` is the pad's A, `W` the left stick up), with or without window focus. Co-Authored-By: Claude Opus 5.5 <[email protected]>@Jackster on GitHub · 2026-11-26 23:40 UTC · original
Windows 11,
63bcca4+ this PR, the CI job's three commands:cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo test --workspace --locked: 908 passed / 0 failed across 30 suites (unpatched63bcca4here: 872;victory-gpualone goes 232 → 261 tests).cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: FAILS:A test call site still passes
&texturewherertvnow takesOption<&ID3D12Resource>— one of the batches rolled up here changed that signature without its caller. So the diagnostics build does not compile; the default build and the whole test suite do.Synthetic only. AI-assisted.
@pes7 on GitHub · 2026-11-27 00:52 UTC · original
@Jackster thanks, that's exactly it. #2962's diagnostics-only test still called
rtv(&texture, ..)after #450 changed it to takeOption<&ID3D12Resource>, and my batch checks did not build--all-features. Fixed in1e25b23on top of the set, and CI is green on that head. On it, locally: clippy-D warningsclean both ways,cargo test --workspace908 / 0, andvictory-gpu --all-features278 / 0. The--all-featurescheck is now part of every batch.@futurepro62 on GitHub · 2026-11-27 07:47 UTC · original
NVIDIA full-suite run, to go with the reports above by Jackster, since none of them names a GPU run. Tested exact head
1e25b23(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: 902 passed, 0 failed, 10 ignored.default_dir_ignores_empty_user_env_vars,empty_victory_log_falls_back_to_rust_log_and_default,constant_views_fit_their_records,views_at_new_addresses_add_no_entries,released_entries_keep_their_generations_below_the_kind_bits,views_held_whole_are_current_for_heap_syncs,null_rtv_and_dsv_descs_match_resource_dimension_and_msaa,typed_buffer_views_take_only_formats_the_device_buffers_take,buffer_views_take_a_format_the_host_takes,live_dynamic_slots_keep_a_texture_given_up,heap_syncs_make_the_slots_whose_records_hold_their_views_whole,promoted_typeless_textures_accept_null_and_unknown_format_views,a_lost_host_state_matches_no_wanted_heaps,only_a_root_descriptors_dword_four_is_a_view_offset,a_failed_save_leaves_its_changes_to_the_next,first_use_of_a_finished_pipeline_is_recorded_without_queueing,half_midpoints_round_to_the_even_neighbour,half_nan_attributes_remain_nan,a_missing_resource_has_no_default_view_format,depth_and_stencil_planes_reach_the_guest_buffer,a_format_without_unordered_access_loses_the_flag,a_declared_copy_back_after_a_marked_one_keeps_newer_title_writes,a_parent_is_found_past_many_children,registered_buffers_widen_the_search,loose_windows_are_reused_for_ranges_inside_them,overlapping_windows_agree_through_title_memory,window_sizes_are_any_power_of_two,loose_memory_must_be_committed,last_bc4_mip_ends_after_the_active_block,float_depth_rounds_at_each_u16_threshold,free_memory_is_not_tracked,a_null_or_empty_path_opens_the_key_itself,nowhere_to_put_the_key_is_an_invalid_parameter,accepts_tls_directory_ending_at_the_image_end,rejects_tls_directory_running_past_the_image_end,rejects_tls_directory_running_past_the_rva_range.typed_null_rtv_keeps_the_next_color_slot,packed_10_bit_frames_are_sampled_for_black_detection,present_without_a_plane_drains_the_draw_traceonly build with thediagnosticsfeature, so the run above doesn't include them; they pass incargo test -p victory-core -p victory-gpu -p victory-hle -p victory-loader -p victory-shader -p victory --lib --locked --features victory-core/diagnostics,victory-gpu/diagnostics,victory-hle/diagnostics,victory-loader/diagnostics,victory-shader/diagnostics,victory/diagnostics(same skips).--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
@borosf on GitHub · 2026-11-27 11:48 UTC · original
A data point for a tested set, from the other direction: I stacked all 20 of my open PRs onto
main(63bcca43) and onto + #2958, and ran the title. They hold together, and there is exactly one trivial conflict between them.Build and tests. 16 of the 20 merge cleanly on
main. The four that do not are conflicts between my own PRs, and all four are mechanical:gpu/src/memory.rsUSES.fetch_addand the allocation-freeget_mut; the diagnostics map update stays behind#[cfg(feature = "diagnostics")]gpu/src/copystat.rsCOUNTERS= 65 (61 +RefreshCalls+Calls/CallUs/CallWaitUs)gpu/src/memory.rsby_bit+untrackedboth keptOn top of that, #2958 conflicts in one line —
emit/lower.rs, two module declarations at the same spot (mod stride_record;from #3214-era work andmod marks;from #2958). Keeping both is the whole resolution; nothing about the marks lowering has to change.Verification of the stack (Intel Arc B580, diag profile,
--console series-x, 205 s with the title):cargo test -p victory-gpu --lib: 243 passed, 2 failed, and those same two fail on unmodifiedmainon this host (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views— both want a heap reachingHEAP_VIEWS, which this card caps).cargo xtask policy: 194 files ok.mainremoves the device in 1–3 runs of 4 (see #2671), so the set does not make that worse — with only one run each, that is all I would claim from it.If it is useful for the set here, the ordering that needs no hand-resolution is: #3215-era descriptor work → #3238 → #3248 → the rest, then #2958 last. I am not asking for these to be added; this is just what it costs to try.
683ad7a) into fix/pipeline-library-null-blob 08b526d98c940d32f) into fix/pipeline-library-null-blob ee84a44859The host refuses a raw SRV or UAV whose first byte is not 16-byte aligned in its buffer: the call is invalid and the device is removed. The console takes a raw view at any dword, and a title run ended so, about 200 s in, with the debug layer naming it: CreateShaderResourceView: When creating a RAW Shader Resource View, the offset of the first element from the start of the buffer must be a multiple of 16 bytes. Thus, FirstElement (2) must be a multiple of 4 buffer_srv and buffer_uav asked shadow::for_view for a copy the view starts on an element (4 bytes) of. A raw view (and a constant buffer, made raw) now asks for 16 bytes instead, so a view 4, 8 or 12 bytes past a boundary gets its own copy, which starts on 256. view_copy asks the same, so the copy refreshed and copied back for a view is the one its slot reads. #3075 does this for raw UAVs; this covers SRVs and constant buffers too. Co-Authored-By: Claude Opus 5.5 <[email protected]>The title asks for 1 245 184 descriptor slots, more than the 1 000 000 a host heap holds, and it walks them in increasing order. "Log when the high-water mark moves" is therefore one line per distinct slot: 199 846 of the first 200 000 lines of a run, ~8 000 a second, on the thread recording the frame. That was the whole of the first frame's stall: before 310 932 lines in the run, first frame 21 433 ms after 231 lines in the run, first frame 33 ms Same build, same warm caches (926 MB pipeline library, 1 347 MB shader cache), same 150 s window. What the line said - that slots above the host heap's count are not mirrored - is what the one line now says. The underlying problem is not this change: 245 184 title slots can never be mirrored because they exceed the tier-2 heap limit, which needs either several host heaps with the index arithmetic adjusted or the views above 1 M placed elsewhere. That is why the first world frames get null views. cargo test --workspace --locked; both clippy configurations with -D warnings; cargo xtask policy.The switch answers one question - "is this shader the one that removes the device (or paints the wrong picture)?" - and it could only be asked of a diagnostics build. That is the build in which the removal does not reproduce on the machines seen so far: a diagnostics build does more work per submission, so the frame that hangs the GPU in a release build never gets there (measured here: release removes the device 10 s in, the same build with `--features diagnostics` and no debug layer runs 180 s and does not remove it at all). So `is_skipped`, `skipped_shader` and `parse_skip_hashes` are no longer behind the feature, and the three call sites keep the skip but gate only their reporting (`note_drop`, `dropped`, `shaders_of`). A release build now answers the question testers are actually asking: VICTORY_SKIP_PIPELINES=0602c2384acbb3b2 -> dropped 1/frame in the menu and a skipped pipeline is dropped the way one with no host pipeline is (the frame's "dropped N without a host pipeline" counter moves). No behaviour change without the variable: `is_skipped` reads it once, and an empty list is the `false` it was before. cargo test --workspace --locked; both clippy configurations with -D warnings; cargo xtask policy.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.