Repository navigation
Windows 10 support (upstream #175 Agility SDK) + RTX 3080/Win10 verification - #22
justlovett0 wants to merge 27 commits into
Conversation
Windows 10's in-box D3D12 stops at shader model 6.5 and refuses root signatures with the directly indexed heap flags (c01), so every translated pipeline was refused and nothing drew (#84). victory.exe now exports D3D12SDKVersion (620) and D3D12SDKPath (.\D3D12\), and `cargo xtask agility` fetches Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, checks its published SHA-512, and puts D3D12Core.dll and d3d12SDKLayers.dll in target\<profile>\D3D12\. The DLLs never enter the repository. Windows 11, or a missing folder, keeps the in-box runtime. `victory config` reports whether the runtime is in place, and the SM 6.5 error names the command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lighting verification (RTX 3080 10 GB / Win10 21H2 / driver 621.24)
The dynamic builder still stays off — "not all of its programs have a host pipeline, missing 3 of 53":
All three fail with the same gap: "a first-lane read where not every lane runs" (
So the remaining lever for dynamic shadows is the divergent cross-half first-lane read (and the related divergent wave-reduction / mask-exchange) in those builder programs, the exchange uses a group barrier that needs every lane, which the divergent blocks don't have. Frame rate: ~2.4–3.5 fps in default mode with the builder on; AI-assisted (Qwen Code); local measurements, real world-confirmed visuals. |
…tures Opt-in VICTORY_TEXTURE_MIP_DROP (0..=3) drops top mip levels of pure sampled textures, with automatic E_OUTOFMEMORY retry. Adapted to the fork's lazy Hosted/Made host-copy architecture (twins and render targets exempt): - resource.rs: HostTexture tracks title_mips/mip_drop/is_3d; host_texture allocates with apply_mip_drop + allocate_with_oom_retry; remap_subresource and host_mip_drop/host_mip_info accessors. - texture.rs: staging detile reads console mip host_mip+drop; HOST_WRITTEN becomes per-subresource so partial copies leave untouched mips uploadable. - list.rs: CopyResource/CopyTextureRegion/ResolveSubresource remap and prune dropped-mip subresources. - descriptor/host.rs: SRV mip-window re-basing across all texture dimensions. Default (unset) is bit-identical to before; proactive VRAM/RAM auto-drop is intentionally omitted. Adds logic tests for eligibility, remap, OOM retry and SRV re-basing.
- Clean-up passes over each translated module (VICTORY_SHADER_OPT bits: dead code, folding, reuse, branch facts, loads within a block, wave64 first-lane exchange), part of the shader cache key. About 43 % fewer host instructions over the pack; about 20 ms less GPU time per frame on the test machine. - translate: a census of the emitted code. - Checked with plain game runs of this tree on the test machine. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ative VGPR reads keep parked lanes (fxceless#11) The console compiler parks a wave64 lane mask in two lanes of a spare VGPR and may restore the halves with other instructions between the two v_readlane_b32. The pair restore now looks ahead in the block (nothing between may touch the second register, write the first, or save into the lanes), so the mask comes back as a mask. This lets indirect_light_probes CS_IrradianceCache_Shade / ShadeSecondary translate: they were dropped every frame, leaving the irradiance cache unlit and everything in shadow black. An M0-relative read (v_movrels_b32) names every VGPR from its base up, which marked the parking VGPR as an ordinary one and turned unspilling off for the whole program. Relative reads no longer count there (relative writes still do). billboard_nobump CS_RaytracingResolve_a56bfb9c translates with it. translate: VICTORY_TRANSLATE_ONLY=<hash prefixes> limits a run to those containers; VICTORY_HOST_MAX_WAVE=32 translates as on a 32-lane host, so --pipelines matches what the runtime creates on NVIDIA. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…art; relative VGPR reads keep parked lanes (fxceless#11)" This reverts commit f141c9f.
…t one" This reverts commit dd59e1c.
|
Confirmed on Windows 10 Pro 22H2 (19045) with an RTX 5060 Ti 16 GB (driver 621.24), i7-14700KF, 64 GB. Without this PR, Full numbers: #148 AI-assisted (Claude Code, Claude Opus 5.5). |
…ut one" This reverts commit e46a698.
…ps without one"" This reverts commit e3088fb.
…alysis, negatives)
Windows 10 / RTX 3080 follow-up: mip-drop, relay, and where the frame time goesContinuing from the earlier verification on Windows 10 22H2 (19044), Ryzen 9 7900X, RTX 3080 10 GB, driver 621.24 (32.0.16.2124), Series X profile. The fork now renders textures, world geometry and mostly-correct static lighting at ~4 fps (230–250 ms/frame). README updated with the full findings; summary here. Best verified configWhat helped
The frame rate is latency-bound, not throughput-boundCPU and GPU usage are low during play. Looking straight up (minimal rendering) the frame is ~150 ms; a full scene adds ~80–100 ms. Frame account: ~48 ms preparing (copies ~25 ms) + ~91 ms GPU + ~94 ms copy-back (overlapped by the relay). The relay worker spends ~80 ms fetching card-copy pieces (GPU read-back latency), and the title's own gap between present and the next frame's first list call is ~100 ms in a full scene (5 ms when looking up). So the ~150 ms floor is read-back fetch latency + title pacing, not compute — more horsepower doesn't help, overlap does. Negative results (this machine)
Remaining frontier
Happy to share the mip-drop port diff or test specific switches/PRs on this hardware. |
…sable in any combination)
|
Correction to the optimizer note above: I tested the "safe" subset ( |
|
+1, fixes the startup problem and got me to menu and setup etc please merge |
|
The Windows 10 part here looks solid: three people in this thread now get past start-up on Windows 10 with it, and the pinned SHA-512 in One suggestion that might help it land sooner: the PR also carries the texture mip-drop port (VIctory #1272, about 850 lines across Written with an AI assistant (Claude). |
… runtime when present (Shaun-Fong) Pinned f47a36e. Review: night/review/Marvisak-VIctory-463.md (ADMIT). Same Windows 10 fix as original VIctory fxceless#175 / fxceless#22 without the downloader (that one is held for Eric). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Second Windows 10 RTX 4080 datapoint for this PR (and the lit-world stack built on top of it) I built this fork's tree
This agrees with @justlovett0 and @oz-stanislav-zhukov that #175 is required on Windows 10, and adds a second Ada card to the 3080/5060 Ti results. One nuance for the README: without Agility DLLs beside the exe, the config line reports the SDK as unavailable even when the merge is present. Counts and hashes only; no game files. AI-assisted (Claude Code, Claude Opus 5.5); measured on my own machine. |
CPU-written scratch chunks (constants, rect vertices) can live in CPU-visible video memory (CUSTOM + WRITE_COMBINE + L1) so shaders read them from VRAM not system RAM over PCIe. Probed once (Host::rebar); falls back to upload_buffer when unsupported, and a video-memory budget guard leaves a tenth free so texture/lighting residency is not pressed. Default OFF = bit-identical. Inactive on the Win10/RTX 3080 test box (ReBAR probe false); needs Resizable BAR enabled. Budget word and slot-strides stay in system RAM (shader-written atomic / scattered writes).
Four-idea latency plan: tried and measured (Win10/RTX 3080)The frame here is latency-bound (low CPU/GPU usage): ~172 ms GPU render + ~64 ms CPU prep on the critical path, ~86 ms read-back fetch overlapped by
Net safe ceiling ~230 ms ( |
…OMPARE_PARALLEL VICTORY_PERMLANE=0 refuses v_permlane16/x16 as before (default on). VICTORY_CARD_COMPARE_PARALLEL=0 uses the original one-thread-per-piece CARD_COMPARE_SERIAL (default on = parallel group reduction). The COPY queue already has VICTORY_RELAY_COPY_QUEUE. Verified intertwined: geometry/models/ lighting load properly, 230-240ms; fetch wait 86->6ms, copy-back 186->34ms, GPU 172->140ms; refusals 21->9 (permlane hash a929109552ce1e84 now translates).
|
@justlovett0 not great that you created PR from your main branch and now you're pushing extra things... |
… image The pixel shaders 7d0f14ce44746d7e and 6b6db9f1a526daeb of the world run read an image descriptor's size bits with no instruction that samples it, so no use named its kind and the program was refused. Eight dwords are taken for an image descriptor (2D) and its size comes from getDimensions. The waterfall test runs the console loop that ends in v_alignbit_b32 of dwords 1 and 2. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A refused descriptor load is deferred: where nothing needs its dwords the program translated before. The eight-dword fallback also applied there, adding a 2D heap handle and getDimensions to programs that already worked. It now runs only after the whole emit has refused with that message, so a program that translated before comes out as it did. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…16-bit wave sums with lanes gone
Three translator gaps that dropped world shaders (46 programs of the
retail pack; 0 that translated before stop now, by a whole-pack
`translate --validate --list` against the previous commit):
- A descriptor nothing uses as one, whose dwords the code reads all the
same ("a descriptor read only as data", 35, and one "a descriptor's
address or format read as data"): an 8-dword image picked from the heap
by an index in a constant buffer, its width/height/base level turned
into a texel size (PS_PuddleDetect, 34 pixel programs), or a 4-dword
buffer tested for being empty by its record count
(ShallowWaterSim:CS_MinTimestepReduce). New `unused_descriptor_kind`
gives such loads a kind (image: a 2D texture, documented as a shortcut;
buffer: a raw view) and `descriptor_data` rebuilds their size dwords from
the host view as it does for used descriptors; the buffer's address
dwords come from the host as before. Lane-copied descriptors and
samplers keep their own handling (checked first).
- The first half of an f16 interpolation pair whose register an f16 second
half then writes the high half of ("the first half of an
interpolation", 8, PS_DeferredTextured and mirror-reflection variants):
the second half keeps the low half of the register, which the first
half wrote and nothing reads. The first half of a pair now writes 0.
- A 16-bit float wave sum where some lanes have left the program ("a wave
sum of 16-bit floats where not every lane runs", 2,
compute_graph_ops:CS_TransposeVecMatMul*): on a host wave of 64 lanes,
`half_sum_present` follows the console's balanced tree, each lane
reading its partner run's partial sum from the first lane of that run
that is here (every lane of an aligned run holds the run's sum on the
console, the ones outside EXEC included), +0 where none is. Two host
waves of 32 still refuse it.
Tests: a GPU test of the 16-bit sum with 64, 63, 40, 33, 32, 17, 5 and 1
lanes staying, bit for bit against the console's tree (RX 7900 XT).
cargo test --workspace and clippy -D warnings pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No PC GPU renders to R9G9B9E5, so CreateRenderTargetView on such a target removes the device. Add it to the existing stand-in table, next to the 16-bit colour formats. (cherry picked from commit 7dc19f2)
(cherry picked from commit 9ba864a)
… for the upscaler's output Two passes of ours for the title's Series S mode, in a new module `over`. A present there has two planes: the game image at 1920x1080 and the interface at 3840x2160, empty texels zero with alpha zero. Only the first plane's first resource was shown, so the window was black through the menus and loading screens. The second plane (its description 0x48 bytes after the first, laid out the same) is now drawn over the back buffer after the copy of the first: one triangle, the plane sampled across the whole buffer, blended by its alpha, taken as premultiplied. `list::upscale_stretch` records, on a title list, a compute pass that writes a texture from the bilinear samples of the top-left part of another, then replays the list's state. It is what the upscale dispatch is given in place of the console upscaler (next commit). Measured on an RTX 3050 8 GB, Windows 11: with `--console series-s` the menus and loading screens are visible at 30 fps where the window was black. One plane behaves as before. No test yet; planes after the second and a plane's placement parameters are not read.
In its Series S mode the title renders at 1280x720 and calls the console's
FidelityFX upscaler (`ffxDispatch` of amd_fidelityfx_loader_xbox.dll) to make
the 1920x1080 output. The loader and upscaler are the title's own DLLs and
run, but the upscaler's passes are compute pipelines in a container that is
not translated ("falling back to NewBE" in the title's log), so the output
was never written: the world was black behind the interface.
The executable's import of `ffxDispatch` is now bound to ours. An upscale
dispatch (type 0x10001, the public FidelityFX API's layout) is recorded as
`victory_gpu::list::upscale_stretch` of its colour input into its output;
any other dispatch, and an upscale that could not be stretched, goes to the
title's DLL. The DLL is not registered as an HLE module: that kept the
title's own from loading and left its other three entry points missing.
Measured on an RTX 3050 8 GB, Windows 11, release build, on top of the
R9G9B9E5 stand-in (fxceless#32): the Series S world renders (opening cutscene), 0.4
to 1.2 s a frame with peaks of 3 s, the card about a quarter busy, 7 GB of
video memory, no host error in a five-minute run. Series X is not affected
in the run made (it does not dispatch the upscaler).
Not done: temporal accumulation, sharpening, use of the depth and motion
inputs. No test yet. Only the opening cutscene was looked at.
… is an error; tests What the review of fxceless#188 asked for. - over.rs: the stretch's groups are 8 by 8 and reach past a target whose size is not a multiple of 8; the shader now reads the target's size and returns for texels outside it, instead of leaving them to out-of-bounds writes being dropped. - ffx.rs: a dispatch that was neither stretched nor passed to the title's own DLL (none found) returned success with the output unwritten. It now returns FFX_API_RETURN_ERROR and says so once in the log. - queue.rs: the choice of a present's second plane is a function of its own (`second_plane`), so it can be tested. - over.rs: a stretch pass that could not be made is tried again at the next dispatch, as the pass over a present is; the two view rings say what their fixed sizes rest on. Tests: the typed-format mapping and the stretch's bounds guard (`over::tests`), the second plane's choice over seven cases (`queue::plane_tests`), the upscale description's offsets and the unanswered dispatch (`ffx::tests`). `cargo test --release -p victory-gpu -p victory-hle`: 113 passed, 0 failed, 1 ignored; 97 passed, 0 failed; `no_dll_planting` 1 passed. One release run with `--console series-s` on an RTX 3050 8 GB, about 3.5 minutes: both passes fire, the world renders, no host error.
Windows 10 support (merge upstream #175) + verification on RTX 3080 / Win10
This fork was validated on Windows 11 (in-box D3D12 is SM 6.6). On Windows 10 the in-box D3D12 is SM 6.5, so the title crashes at init before any rendering. This merges upstream Marvisak/VIctory#175 — the D3D12 Agility SDK loader (exe exports
D3D12SDKVersion/D3D12SDKPath;cargo xtask agilitydownloads SDK 1.620.2 beside the executable) — which makes the fork launch on Windows 10. The merge is additive (onemain.rsconflict resolved keeping both thedata_dirandd3d12 sdkconfig lines).Verified on Windows 10 21H2 (19044.7846) / NVIDIA RTX 3080 10 GB / driver 621.24 (32.0.16.2124)
VICTORY_RELAY=2causes presentation jitter / a blank image on this config (frames presented out of order); default mode is correct. Worth a note for Win10/3080 users.VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024(no relay): 3–4 fps in the world, textures still present and stable — a good fast path that avoids the relay jitter.VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1): stays off — "not all of its programs have a host pipeline, missing 3 of 53", dropping ~400–1477 dispatches/frame. The refusals on this GPU: host pipeline refused0x80070057(programs asking for 64-lane waves on a 32-lane host),v_permlanex16_b32,v_cvt_f32_f64, divergent wave reductions, and lane-mask reads as data. These are the lever for shadow lighting on wave32 NVIDIA.No game files, keys or dumps are included. AI-assisted (Qwen Code); all measurements from local runs, visual confirmations by the user.