Repository navigation
ci: build and test the d3d12 Rust runtime on Windows (CI-D3D12-CARGO-TEST) - #2648
Conversation
…-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.
…es (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.
…t 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>
CMakeLists: d3d12_backend_test (PR) and the Vulkan headers version check (main) both kept. Co-authored-by: quartz-heron-58 <245169279+quartz-heron-58@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d3d12_vulkan_device: report_pipeline_cache_growth() before main's over_save_limit check, note_pipeline_cache_size() before main's journal setup. Docs: main's paragraph, then the PR's growth-stall text without its old 256 MiB cap line. Co-authored-by: Galaxy <23423870+thegalaxydev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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.
…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.
…er (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.
runtime/test/vk_test_device.h: the PR's filterMinmaxImageComponentMapping query and main's shaderOutputViewportIndex feature were added at the same place; both are kept. Co-authored-by: Zilumz1 <221744236+Zilumz1@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
|
Independent retest of the first hosted failure on
Synthetic fixtures only. AI-assisted with OpenAI Codex. |
|
Checked what can be checked without So the pinned SHA is Structure, read: The gating is the part I would have argued for: Not verified: the measurements in the header (1441 pass, 58 ignored, ~4 min build, ~11 min tests) and the toolchain resolution - I have no Written with an AI assistant. |
|
I reproduced the pixel failure on a native MEASURED. Windows Server 2025 build 26100, Rust 1.98.1, DXC 1.9.2602.17. All 12 subprocesses reported depth-bounds support and successfully reloaded the pipeline library. Red bytes are outside/inside the bound.
For this CI fixture, setting AI-assisted with OpenAI Codex. |
|
Follow-up: the full native Windows workspace gate passes with the one-line fixture change. I ran your original GitHub merge
AI-assisted with OpenAI Codex. |
|
Opened #2663 ( AI-assisted. |
…its 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.
|
Structural verification on this machine, and the limits are stated below because this one cannot be run here at all - there is no 1. It applies. 2. The YAML parses, which is the one check a malformed workflow would fail: and 3. The things it refers to exist:
4. The gating design matches its header. Build and What I could not verify, and why it matters for this particular pull request: its header claims the workspace builds in about 4 minutes and its tests take about 11, with 1441 passing, 58 ignored and one failing (the asset-policy test, which the workflow excludes). None of those numbers can be checked here - no The first run of this workflow on this pull request is therefore also its verification - and, given #2648 exists to be that gate for everything under Written with an AI assistant. |
Current main after ProjectLeonida#2566; no new conflicts on top of the earlier carry merge. Co-authored-by: Zilumz1 <221744236+Zilumz1@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current main after ProjectLeonida#2566; no new conflicts on top of the earlier carry merge. Co-authored-by: quartz-heron-58 <245169279+quartz-heron-58@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current main after ProjectLeonida#2566; no new conflicts on top of the earlier carry merge. Co-authored-by: Galaxy <23423870+thegalaxydev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent timing while verifying PRs on this machine: the workspace compile, not the tests, dominates repeated runs. A shared For this workflow, caching
Measured on Windows 11 26200.9711, Ryzen 9 7950X3D, Rust 1.98.1 as pinned. AI-assisted: yes (opencode). |
main moved the frame meter's five-second lines into a function of their own that may run on another thread: the frame times are logged where the meter decides a five-second line is due, on the presenting thread, as before. The nearest-rank test's comment said 0.95 * 100 is not 95.0 in f64; it is: ranks are whole numbers so that no float can move one, and the case pins the rounding direction (review).
reprend ProjectLeonida#279: d3d12: min/max samplers honour filterMinmaxImageComponentMapping (D3D…
reprend ProjectLeonida#2173: d3d12_xs: say so when LEONIDA_D3D12=vulkan is asked of a runtime built without the Vulkan device (RT-VULKAN-REQUESTED-NOT-BUILT)
reprend ProjectLeonida#2062: d3d12: say when the driver's pipeline cache stops keeping new pipelines (RT-PIPELINE-CACHE-GROWTH-STALL)
…e-stats d3d12: frame-time percentiles and what stalls frames, in the log and on the panel (D3D12-FRAME-TIME-STATS)
…wait-queue d3d12: a pipeline a frame waits for goes before those asked for earlier (D3D12-PIPELINE-WAIT-QUEUE)
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>
…rojectLeonida#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>
aslan2142
left a comment
There was a problem hiding this comment.
Verified the effective diff against current main (compare/main...dcd93bea): adds .github/workflows/d3d12.yml and removes the unused nested d3d12/.github/workflows/ci.yml. Action SHAs are pinned, permissions are minimal (contents: read), jactionlint and d3d12 (windows-latest) both passed on this head, clean-room verified, and all CI checks are green. Merging.
(Note: now that #2681 and #2682 have landed on main, clippy can also be promoted to blocking in a small follow-up once verified green.)
(AI-assisted review.)
|
finding: this job is right, and it currently works around three reds that have fixes open - plus it will hit the Three workarounds, each pointing at a fix that already exists:
So the comments "make it blocking then" have an answer for two of the three, and both are measured rather than hoped for. And the one thing this job does not have, which matters more than any of them: A job that runs that crate once will be red about one run in eight for a reason nobody can attribute. The The shape that would keep both properties: exclude that crate from the parallel run and give it its own step on one thread, which is what #2816 does and what I would lift from it even if the rest of that pull request has been superseded by this one. - name: Tests (no GPU, no game data)
run: cargo test --workspace --exclude xtask --exclude leonida-gpu --locked -- --skip depth_bounds_pipeline_loads
- name: Tests (leonida-gpu, one thread)
run: cargo test -p leonida-gpu --lib --locked -- --test-threads=1AI-assisted: yes - DeepSeek v4.1 (flash), which measured the flake 24 times today and read this workflow's three workarounds against the three open fixes. Written with an AI assistant. |
Claimed in the coordination issue as:
CI-D3D12-CARGO-TEST(#2570)What and why
No workflow runs the tests of the D3D12 runtime (
d3d12/, Rust:leonida.exeand its crates).launcher.yml,xma2-decoder.ymland the bcpack tool inci.ymlare the only cargo jobs, so a change that breaks ad3d12/test reachesmainunseen. Many open pull requests touchd3d12/right now.This adds
.github/workflows/d3d12.yml, modelled onlauncher.yml: on pushes tomainand pull requests that touchd3d12/**(and on demand), onewindows-latestjob:cargo build --workspace --all-targets --locked, toolchain fromd3d12/rust-toolchain.toml(1.98.1) through the runner's own rustup.cargo test --workspace --exclude xtask --locked, no GPU, no game data.cargo test -p xtask, which fails onmaintoday because two sources are over its 640 KiB limit (crates/leonida-gpu/src/host.rs672,926 bytes,crates/leonida-shader/src/emit/lower.rs709,418 bytes).cargo clippy --workspace --all-targets -- -D warnings, which fails onmainwith about 25 findings inleonida-loader,leonida-lua,leonida-menu,leonida-shaderandleonida-formats.cargo fmt --checkis left out: it would reformat about 190 files, colliding with the opend3d12/pull requests.The two report steps use
continue-on-errorso the job is useful from day one; each has a comment saying when to make it blocking. Windows only, becauseleonida-gpudoes not build on macOS today (reported by oreofr's agent); Linux can follow #2577.Tested
Locally on
main060c47160, Windows 11, toolchain fromd3d12/rust-toolchain.toml, CPU only:cargo test --workspace --no-run --locked: builds in 233 s.cargo test --workspace --locked: 661 s; 1441 passed, 58 ignored, 1 failed (xtaskpolicy::tests::repository_passes_policy, the two oversized files above). Excludingxtask, nothing fails.cargo clippy --workspace --all-targets --locked -- -D warnings: fails onmain(findings listed above).jactionlintchecks its syntax.GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code