The profiler walks the stacks of suspended threads with RtlVirtualUnwind,
and a bad RIP or RSP in a sample made it read unmapped memory: the game
crashed after about 4 minutes of VICTORY_PROFILE. With
VICTORY_UNWIND_CHECKS on (the default), each step first checks that RIP
is in executable image memory, that the unwind records and the stack span
they describe are readable and inside the thread's stack, that the PC is
not on an epilogue instruction, and that RSP grows. A record it cannot
bound ends the walk. The leaf rule is kept for the first frame only, also
in our own VirtualAlloc'd stubs. VICTORY_UNWIND_CHECKS=0 gives the old
walk; the switch is read once, before title code runs.
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check printed "POLICY VIOLATION" on stdout and returned Ok, so the
command exited 0 on exactly the configuration it exists to refuse, and
a script running `victory config || exit 1` went on. Each violation now
goes to stderr and the command ends with an error, as the commands that
would use the path already do. The resolved values still print first.
Fixes#301.
select_version took only a provider named 4.1.2 and failed otherwise, so
-Fsr4K could not start on a card AMD's SDK offers no FSR 4 for. It now
takes 4.1.2 where there is one and the newest 3.1.x otherwise, and the log
says when 3.1 stands in. With neither, the run stops before the title
starts, names what was offered and says to run without -Fsr4K.
The check after context creation compares against the provider that was
asked for, rather than against 4.1.2.
Tested on an RTX 4070 (Windows 11, Rust 1.98.1) with AMD's signed
amd_fidelityfx_upscaler_dx12.dll 4.1.2.4555 (SDK v2.4.0):
- before: tests/fidelityfx.rs fails, "no FSR 4.1.2 provider for this
adapter (available: 3.1.6, 2.3.4)"
- after: provider 3.1.6, context made, two frames dispatched
- cargo test -p victory-hle --lib fidelityfx: 5 passed
Not run against the title: FSR 3.1's picture in the game is not checked.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every host pipeline's root signature carries the directly indexed heap
flags (0x400, 0x800). A D3D12 runtime that does not know them, such as
Windows 10's in-box one, refuses each with "Unsupported bit-flag set";
the card and driver play no part, since serializing is the runtime's.
- At device creation, an empty root signature with both flags is
serialized once; if the runtime refuses it, one error says that every
host pipeline will be refused and why, instead of only one warning per
pipeline as in #168's log.
- The title's own root signatures go to the same host serializer
(`d3d12_xs!D3D12SerializeRootSignature` and its versioned form). A
refusal there was passed back to the title in silence: a failure and
no blob, which the console's serializer would not return. It is now
logged with the flags and the host's reason. The error out pointer is
nulled before the host's call, so the blob read is the host's.
Tests: the runtime refuses an unknown flag with the text seen in #168,
and serializes the directly indexed flags exactly when the device
reports shader model 6.6; through the title's entry point, an unknown
flag gives E_INVALIDARG, no blob and the host's reason.
(cherry picked from commit 963abe387e)
translate --warm took 4 threads when --jobs was not given, while the
flag's help says every logical core and the two other paths of
translate.rs (translate, shaders) do that. The three paths now take
their count from one function, which keeps the at-least-one the warm-up
path already had.
Use the library-loaded pipeline and valid descriptor bindings. Enable an always-pass depth comparison with writes disabled so WARP exercises the same strict bounds assertions. Fixes#314.
Co-authored-by: Codex <noreply@openai.com>
Keep the launcher default tied to the diagnostic profile and document explicit overrides for a diagnostics-enabled release build. Fixes#283.
Co-authored-by: Codex <noreply@openai.com>
Use one positive-count parser for translate, shaders, and warm. Exercise all four modes at the real CLI. Fixes#311.
Co-authored-by: Codex <noreply@openai.com>
The HUD (VICTORY_PANEL=1) took each core's busy share as
(ni - pi).clamp(0, nt - pt). On a Ryzen 7 7700 a core's kernel+user
counter stepped back between two reads, clamp(0, negative) panicked on
the submitting thread, and the run ended (host GPU failure). The share is
now a small function: no time passed or a step back reads 0, with tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The clean-up pass that gives one instruction for one value (REUSE) merged
a dx.op.getDimensions with an equal one above it. On an RX 9070 (RDNA4,
amdxc64 32.0.32029.2010) the driver's compiler then crashes making the
pipeline (an access violation, always at the same instruction) for 29 of
the title's compute programs, all ped *:CS_RaytracingResolve; the
runtime leaves them out. Keeping getDimensions out of REUSE alone makes
all 29 pipelines; an RDNA2 iGPU makes them either way.
312 programs translate differently, so TRANSLATOR_VERSION goes to 2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add explicit type annotations to std::mem::transmute in victory-loader/src/descriptor_sites.rs and victory-gpu/src/host/panel.rs (clippy::missing_transmute_annotations)
- Remove unnecessary &mut borrow in victory-gpu/src/watch.rs (clippy::unnecessary_mut_passed)
- Remove unused diagnostics-only Staging::size field in victory-gpu/src/texture.rs (dead_code under --all-features)
Trim whitespace and report invalid values when resolving the host-wave override and its alias before either translate mode. Related to #282.
Co-authored-by: Codex <noreply@openai.com>
Four hardware tests make pipelines that declare WaveSize(32). A GCN card
such as Polaris runs 64-lane waves only, so the driver refuses them with
E_INVALIDARG and the tests fail instead of being skipped, as wave64_tests
and permlane_tests already do for such hosts.
Host::runs_wave32 asks OPTIONS1 for the wave range, the same query
translation_caps makes. run_cases_on and whole_wave_f64_sum_and_cvt_f32_f64
skip a refused pipeline only on a host without 32-lane waves, so a refusal
on a host that has them still fails. partial_dispatch_with_a_cross_half_wave_op_runs_in_32_lane_waves
skips its 32-lane pipeline on such a host, like its neighbour does.
On an RX 580 (driver 31.0.21925.1001, waves of 64 to 64 lanes):
victory-shader went from 298 passed / 4 failed to 302 passed / 0 failed.
views_are_made_beside_the_heap_and_copied_in failed on an AMD card (RX 6600):
it took the bytes of a slot in the heap shaders see to be those made
beside it. Descriptors are the driver's own. On AMD (RX 6600) a copy
into that heap changes them (they name the slot they are in), and the
first 32 bytes of the slot do not change for another view at all. On WARP
they point to an object made anew each time, so a view made again in
place has other bytes.
A copy now passes if it holds the bytes made beside the heap (WARP,
NVIDIA) or those of the same view made in place (AMD), for the raw view
and for the null one after it. With put() made to do nothing, the test
still fails on both the RX 6600 and WARP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a477ca9a7e3ab1ca1e7c96c39694a610edd0ce42)