The line says where the pipeline came from since 7acf84d38, so the pin in
tests/test_chain_check.py failed on main. Only a compile counts as a build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without ray tracing the title's probe resolve leaves stale tiles of 16x16 where its probes found nothing,
and the light pass's last step kept the larger of those and its own estimate: a mosaic on faces and hair.
With `LEONIDA_AMBIENT_NEAR=1` near surfaces take the estimate, and past 100 m what was there comes back,
fully by 250 m, for the sky's light. After DoubleGhosty/cool_fox b0906d4 (NoLogicAlan's fix of its issue
#151, GPL-3.0), without that commit's other clamps (Leonida's passes cap what was there by the estimate
already). Off by default until a recorded tour shows faces and hair with and without it.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: type-checked; tours with and without it
to follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from KyleS98/VIctory-Neo e23accf, itself from readmet3xt-lab/foxhound 9b11fac5 ("Shaders on
NVIDIA: max/min/med3 and the legacy product in exact host forms", VICTORY_HOST_FLOAT), GPL-3.0, as
Leonida code.
The console's v_max/v_min (which order -0 below +0), v_med3 between two constants and the legacy
product (0 times anything is 0) were spelled out for every host but AMD's RDNA cards, in four to seven
operations each. On an NVIDIA host (`set_host_nvidia`, from the device's vendor) they are now the host's
FMax and FMin, a minimum of a maximum, and a product with one compare of its factors, as the RDNA forms
were already (`host_rdna` gives `host_float`'s bits there). The legacy product asks its factors whether
one is 0 even where they are bounded (`rdna::ZERO_SIGN`), so its zeros are the hardware's +0; Leonida's
legacy multiply-add keeps its spelled-out form there (its RDNA shortcut was checked on RDNA only).
`LEONIDA_HOST_FLOAT`: a set of the bits (1 max and min, 2 the legacy product, 4 med3, 16 the zero asked
of the factors); unset: all four; `0`: as before. Part of the translation: the shader cache keys on it.
The fork's measurements: on an RTX 4070 SUPER some programs ran several times slower in the spelled-out
forms (a gather of local lights 5.0 -> 1.2 ms, a tiled lighting pass 4.1 -> 0.2) depending on where the
system put memory, as a spilling program's would; on an RTX 3090 Ti 33.3 -> 33.9 frames a second.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64:
host_forms_give_what_the_spelled_out_ones_give on the card (13 forms, 169 cases each with zeros of both
signs, a subnormal, infinities and NaN: the same bits as the spelled-out forms), the legacy tests;
timed in a run of the game after this commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* runtime: make a missing return on some paths an error
MSVC has two codes for a function that reaches its closing brace: C4716 whenthere is no return at all, already an error by default, and C4715 when somepaths return and others do not, which is a warning at the default warning level(measured: cl /EHsc alone reports it, /W4 is not needed). A change in this treedropped a return out; from a function with early returns, so it was C4715, andthe build stayed green. A full Release build of this commit reports none, sothe flag costs nothing today.
* runtime: keep /we4715 out of the assembler command
merzleckeier measured it on Windows Server 2025: add_compile_options
(/we4715) puts the switch on ml64's command line too, and MASM answers
'warning A4018: invalid command-line option : /we4715' - the same reason the
/utf-8 line above this one carries a COMPILE_LANGUAGE filter. Reproduced here:
unfiltered, one A4018 line from abi_probe.asm; filtered, none, and the C++
half still reports error C4715 when a return is removed.
---------
Co-authored-by: fiestorra <fiestorra@users.noreply.github.com>
* scripts, tools: build llvm-mc 23.1.5 by default, so the pipeline library translates
LLVM 21.1.8's gfx1013 decoder cannot decode 840 of the 2,684 compute
programs in the pipeline library of 1.0.2.1: their listings carry 79,490
undecodable words and 8,310 exp invalid_target_N lines, the translator
refuses all of them as "fall-through into undecodable words", and the
shaders stage keeps 1,844 of 2,684. LLVM 21 does translate all 26,503
shaders of shaders.rpf; the library is what it loses.
The same bytes under llvm-mc 23.1.5 have no rejected word in those 840,
and 839 of them translate and pass spirv-val (the last wants s_sethalt,
which the translator does not implement, under either version). The 1,844
that already translated were re-disassembled too: 1,674 listings change
and all 1,674 still translate, the other 170 are byte-identical, so the
stage goes from 1,844/2,684 to 2,683/2,684.
The build helper now builds 23.1.5 by default. The docs that name the
minimum version (README, docs/design.md, docs/testing.md, docs/linux.md)
and the three user-facing messages that still said 21+ (make_game.py's
preflight, shader_disasm.py's probe error, mc_command.py's install hint)
now say 23+, with the tests that assert those texts updated.
AI-assisted (DeepSeek Harness).
Written with an AI assistant.
* docs: LLVM 23 is what the shaders stage needs, and a test pins the script's default
The control runs create_vulkan_device_standalone before it waits its 20 ms, so its TIMEOUT covers the whole device bring-up, exactly like the positive test above it (TIMEOUT 60). Under a parallel ctest that bring-up can pass 10 s, and CTest then kills the process: WILL_FAIL inverts an exit code but not a ***Timeout, so the negative control failed for a reason it does not control.
OLD-2970 / TEST-586
Co-authored-by: whoalin1 <207920491+whoalin1@users.noreply.github.com>
Co-authored-by: Gemini 4 Neon <noreply@google.com>
* d3d12: min/max samplers honour filterMinmaxImageComponentMapping (D3D-994)
Without VkPhysicalDeviceSamplerFilterMinmaxProperties::
filterMinmaxImageComponentMapping, a minimum/maximum reduction defines
only the R component of a sample; G, B and A are undefined. The AMD
Windows driver on Polaris (RX 580) reports singleComponentFormats = 1
and imageComponentMapping = 0, and returns exactly that: R is correct,
G/B/A vary.
The layer now records the property in VulkanDeviceInfo and logs once
when it creates a reduction sampler on a device without it. The
descriptor test compares R only on such devices, and all four channels
where the device maps every component.
* d3d12: say when the driver's pipeline cache stops keeping new pipelines (RT-PIPELINE-CACHE-GROWTH-STALL)
A driver can stop adding to a large VkPipelineCache with no error. On NVIDIA 610.88 a 1.23 GB or 1.35 GB cache
came back the same size to the byte after a 2 s compile, so the next run compiles the same pipelines again and
nothing says why. The runtime now takes the cache's size at creation and at each session save, counts the title's
pipeline builds that took at least 200 ms, and logs once when 16 or more compiled while the cache grew less than
64 KiB. pipeline_cache_store_test covers the decision; docs/d3d12_vulkan.md records the measurements.
* docs: rewrap the pipeline cache growth paragraph (RT-PIPELINE-CACHE-GROWTH-STALL)
* d3d12_xs: say so when LEONIDA_D3D12=vulkan is asked of a runtime built without the Vulkan device (RT-VULKAN-REQUESTED-NOT-BUILT)
A gta6rt configured without Vulkan headers is built without
LEONIDA_VULKAN_DEVICE. D3D12XboxCreateDevice then ignored
LEONIDA_D3D12=vulkan without a word and wrapped the host's D3D12 device,
so a run stopped somewhere else and read like a boot result.
It now prints one [rt] d3d12_xs line naming the cause and the configure
options. Which device is created does not change. The reading of the
variable moves to shims/d3d12_backend.h, used by both builds; new CPU-only
test d3d12_backend, registered outside the Vulkan-headers block.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* d3d12: frame-time percentiles and what stalls frames, in the log and on the panel (D3D12-FRAME-TIME-STATS)
The frame-rate line gives a mean over the last second or more, and the F3
panel only the longest frame, so a run with smooth frames and a few
multi-second stalls looks like a slow one, and the stalls do not show.
host/frametime.rs keeps every presented frame's time. With the frame-rate
line, every five seconds, it logs one line: the median, 95th and 99th
percentiles (nearest rank), the longest frame, how many took over 100 ms
and over a second, and beside them host pipelines queued and made a second,
waits for new memory to be resident per frame, and the commit the system has
left. The panel shows the last line's numbers and the pipeline wait per
frame. Pure parts are unit-tested.
* d3d12: frame-time panel lines fit long stalls, the first line counts from the first present (review)
- Panel: frame times of 10 s or more (the launcher's pipeline budget) made
the percentile line longer than 40 columns, and the panel cut it without
a sign ("MAX 10000" showed as "MAX 100"). Times from 10 s up are shown in
whole seconds ("10S"); the test covers 10 s, 100 s and 10 min.
- The first line's pipelines made a second and residency waits counted
everything since the process started: the meter now starts from the
totals at the first present.
- "queued" was queued or being made: the log says so, the panel says
PIPES PENDING.
- The nearest-rank test covers 95% of 100 frames, where a float ceil would
take the 96th.
* d3d12: a pipeline a frame waits for goes before those asked for earlier (D3D12-PIPELINE-WAIT-QUEUE)
A draw whose host pipeline is not made queues it at the back of the
requested list, and its frame then waits for it up to the frame's budget.
On the first visit to the world about 1,700 pipelines were queued at once,
562 of them took over a second each, and with the launcher's 10 s budget
every frame waited the whole budget for a pipeline a thousand others stood
before, then dropped its draws anyway: 0.35 fps for three and a half
minutes (RTX 3080, 8 workers).
A new queue state, AWAITED, sits between REQUESTED and MAKING. When a frame
starts waiting for a pipeline that is still in the queue, the entry moves
to the front of its list (passes over the screen in theirs), after those
awaited before it, so the next free worker makes it. It moves at most once,
is never claimed twice, and WAITING does not count it again; makes already
running are not interrupted. LEONIDA_PIPELINE_AWAIT_FIRST=0 keeps the order
asked.
Frames on a cold cache still wait up to the frame's budget: the waits now
succeed, so a frame may spend its budget on several pipelines it then draws
instead of one it drops. The budget setting bounds that, as before.
* ci: build and test the d3d12 Rust runtime on Windows (CI-D3D12-CARGO-TEST)
No workflow ran the d3d12/ workspace tests. This adds one on windows-latest for changes under d3d12/: build, then cargo test as the gate (no GPU, no game data). The xtask asset-policy test and clippy -D warnings both fail on main today (two sources over the 640 KiB limit; about 25 clippy findings), so they run as reports until fixed. cargo fmt is left out: it would reformat most of the tree under the open d3d12 pull requests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* d3d12: a frame's pipeline wait counts the queue lock its promotion waits for (review)
wait() started its timer after promote() took the queue's lock, so time
spent waiting for that lock came on top of the frame's budget: in a
synthetic contention test (queue held 240 ms, 80 ms budget) a frame waited
320 ms. The timer now starts before the promotion, so the lock delay is part
of the budget (240 ms in the same test, the lock holder's time itself).
Reported with the test by merzleckeier.
* ci: d3d12 workflow follows TheGeogeo's review
mods/** in the paths (leonida-lua's tests read mods/example_lua), a build with the features people run, the replay
test of leonida-gpu (diagnostics), a cache of Cargo's downloads, a limit on the test step. d3d12/.github/workflows/ci.yml
is removed: GitHub runs workflows only from the repository's root.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: skip the depth bounds test on the runner's software adapter until #2663
It is the only failure of the job, and it hides the crates after leonida-gpu and the replay test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Zilumz1 <221744236+Zilumz1@users.noreply.github.com>
Co-authored-by: Galaxy <jojomalrbx@gmail.com>
Co-authored-by: quartz-heron-58 <245169279+quartz-heron-58@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: OreoFR <29048345+OreoFR@users.noreply.github.com>
Co-authored-by: Galaxy <23423870+thegalaxydev@users.noreply.github.com>
Co-authored-by: TheGeogeo <57634077+TheGeogeo@users.noreply.github.com>
Co-authored-by: MoonEyes <14891700+MoonEyes@users.noreply.github.com>
readable() and writable() computed va + bytes (and BaseAddress +
RegionSize) unchecked. They run inside the vectored exception handler,
where a clzero with RAX near the top of the address space made the
debug build panic with an overflow (taking the process down) and let a
wrapped end pass the range check in release. A range that runs past the
top is now neither readable nor writable, and such a clzero is left to
fault as it would.
After ahmetbagci's fix in TaynanGT/Vice-Tay (c2f2b5b); its write_sites
half is already in #2664.
Co-Authored-By: ahmetbagci <6625856+ahmetbagci@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check_no_game_data.py read `--help` as a path and answered "cannot read --help", exit 2, in the tool every
contributor is told to run; it now prints the usage text it already carries and exits 0. play-linux.sh and
run_wine_session.sh print their usage before any environment check, where they used to answer with an error
(and play-linux.sh's no-argument case still prints the same usage, on stderr, exit 2).
run_game_wine.sh's one-line Usage line names the required --shaders, which its Inputs section already listed.
A test per script fails on main's copies and passes here.