ci: a job that runs the d3d12 workspace's tests #2816
Closed
leonida/mandy
fiestorra wants to merge 0 commits from
ci-d3d12-rust-checks into main
pull from: ci-d3d12-rust-checks
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2816
Loading…
Reference in a new issue
No description provided.
Delete branch "ci-d3d12-rust-checks"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
No workflow runs
cargo testond3d12/. This adds the job. It is a draft because it depends on #2815 and will be red on its own until that merges.What runs what today:
d3d12/is thirteen crates and 1,000+ tests, and its asset-policy test fails onmainb7a1be296without anyone seeing it. That is the failure #2815 fixes: two Rust source files are measured as data and exceed a 640 KiB limit.The job:
windows-latest, cached~/.cargoandd3d12/target,cargo test --workspace --locked, paths ond3d12/**and the workflow itself.Two checks that are deliberately not in it, measured tonight:
d3d12/cargo fmt --all -- --checkd3d12/rustfmt.tomlexists and the code does not follow it.cargo fmt --allrewrites 190 filescargo clippy --workspace --all-targets -- -D warningsNeither belongs here. A 190-file formatting diff would conflict with every open branch and could not be reviewed, and holding 115 warnings is its own pass. Both are named in the workflow's header so the next person knows they are missing on purpose, not by oversight.
Measured on this machine, warm, after #2815's change:
cargo test --workspace --lockedis 7 minutes from cold and exit 0.AI-assisted: yes - DeepSeek v4.1 (flash), which installed Rust here tonight and ran the workspace both ways.
Written with an AI assistant.
A note that strengthens the "why no
fmt" in the header, because I checked whether the workspace is breaking a rule and it is not.d3d12/rustfmt.tomlexists (max_width = 100,use_field_init_shorthand = true), andcargo fmt --allrewrites 190 files - so the config is not applied. But nothing in the repository requires it:So
d3d12/is not failing a documented rule - it has a config file that was never run over the tree. That makes the missing check a preference, not a compliance gap, and it is another reason not to put a 190-file reformat in a CI pull request: there is no rule it would be enforcing.If the maintainers want it, the order is:
cargo fmt --allas its own pull request (mechanical,cargo test --workspaceunchanged), then addcargo fmt --all -- --checkto this workflow. Both are one line each once the first has landed.If they do not, removing
d3d12/rustfmt.tomlsays the same thing without a 190-file diff.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
finding: the workspace baseline this job will run against is now one failure, and it is the one #2815 fixes.
maind921489d1(after #2820 and #2795 merged),cargo 1.98.1:That is the whole list. Before #2820, the same command also failed
host::refresh_tests::only_what_differs_goes_upinleonida-gpu; that one is gone, and what is left ismainfailing its own asset policy on two source files over 640 KiB -leonida-gpu/src/host.rsandleonida-shader/src/emit/lower.rs- which is this draft's dependency on #2815 and nothing else.So the order to land these is one way, not two: #2815 first (it makes the policy pass), then un-draft this one - its job is
cargo test --workspace, and until #2815 lands that job is red onmainitself, not on anything a contributor did. A contributor who opens this pull request against today'smainwould see it red for a reason that is not in its diff, which is worth a line in its description.And one thing this baseline settles: #2816 does not need
cargo fmtorclippy -D warningsto be useful. Both are absent on purpose - no document in the repository requires formatting ford3d12/, andclippyreports 115 warnings and 0 errors - and a job that only runscargo test --workspacewould have caught the red that sat onmainall day, which is the whole argument for it.AI-assisted: yes - DeepSeek v4.1 (flash), one run of the workspace on the merged
main.Written with an AI assistant.
finding: my own workflow had a real defect and I have fixed it: it installed
stablewhiled3d12/rust-toolchain.tomlpins1.98.1.The file this repository already has:
And what my job did:
What that means in practice: the action installs the runner's latest stable; then
cargo, run fromd3d12/, has rustup read the pinned file and fetch1.98.1during the job. So the tests would have run on the right compiler - the repository's pin wins - but after a download nobody asked for, and with aInstall Ruststep that installs a toolchain the build never uses. Two versions on the runner, one of them decoration, and the log would show a download at the firstcargocall that looks like a network problem.The fix,
f4de60f5b:Validated, not assumed:
yaml.safe_loadon the changed file givesruns-on: windows-latest,steps: 4,toolchain: ['1.98.1'],run: ['cargo test --workspace --locked'].The cost of the duplicated number is real and I am not hiding it:
1.98.1now lives in two places, and the comment says so. The alternative - dropping the install step and letting rustup read the file - removes the duplication but pays the download every cache miss, which is worse for a job whose whole value is that it is cheap enough to run on every pull request.And how I got here, since it is the same mistake this repository keeps producing: I had been checking this job's green status, not its content. The step said
stableand I read it as "installs Rust". It took reading the workflow against the toolchain file the repository pins - a diff between two files I had both seen.AI-assisted: yes - DeepSeek v4.1 (flash), which broke the YAML once fixing it and says so.
Written with an AI assistant.
finding:
jactionlintwas failing on this pull request and is now green: the job used tags, and every other workflow in this repository pins commits.I had been reading this workflow's checks as "green until #2815 lands" and missed that one of them was red for a reason inside the file.
jactionlint(jdx/jactionlint,.github/workflows/jactionlint.yml) checks syntax, expressions, shellcheck,dependabot.yml, pinned actions, permissions, timeouts and concurrency - and "pinned actions" is the one I failed, becauseactions/checkout@v4andactions/cache@v4are tags that can be moved.What the repository already does, and what I now copy:
So both of those commits were already in the tree and I used tags anyway. The third action,
dtolnay/rust-toolchain, is not used anywhere here, and it publishes only a movingv1tag - no per-version tags - so it is pinned atv1's commit and the version comes from thewith: toolchain:input, which is how that action resolves a ref that is not a toolchain name:Result on this head (
5a380ba68):And the answer to the question this comment is really about: the repository has a workflow linter that would have told me this in one line, and I did not run it or read its output for hours. The same shape as everything else today: I was reading the colour of the checks, not what each one checks.
AI-assisted: yes - DeepSeek v4.1 (flash), which broke the YAML twice before this and pinned the wrong action version once.
Written with an AI assistant.
finding: the job ran for the first time and found a red that is not the policy test:
depth_bounds_pipeline_loads_and_filters_drawsfails onwindows-latestand passes here. That makes two blockers for this pull request, and the second one is nobody's fix yet.The job, 5 minutes,
windows-latest, head5a380ba68:And the same suite on this machine,
main90c514437, is589 passed; 0 failed; 53 ignored.Why that matters:
588 passedhere means the policy test PASSED on this branch - it predates the two oversized files, soxtaskis green in this job. So the red is entirely this GPU test, and it is red because the runner has no card.The test already tries to skip, and the guard is not enough:
depth_bounds()asks the device forD3D12_FEATURE_D3D12_OPTIONS2and readsDepthBoundsTestSupported(host.rs:5765). On a software adapter that answers yes and then does not gate the draw: the test renders, expects the fragment outside[0.6, 1.0]to be culled and reads back255instead of0. So the feature query is right about the API surface and wrong about what the driver does with it - which is exactly what a software rasterizer can be.What I would do about it, and it is the repo's call, not mine:
host()should returnNonefor a software adapter - the test's other guards all key off "can this host do it", andDepthBoundsTestSupportedis not the question for WARP - or the job should name the GPU tests it cannot run instead of running them. What I would NOT do is--skip pipeline::host::in the job: that would hide the whole module's coverage on the only machine that ever runs it.So this pull request needs two things before it can go green, and only one of them is mine: #2815 for the policy test on the rebased branch, and a decision about a GPU test on a runner with no GPU. The job finding this on its first run is the argument for it, and also the reason it cannot be un-drafted today.
AI-assisted: yes - DeepSeek v4.1 (flash), which read the failed step's log rather than its colour.
Written with an AI assistant.
Rebased onto
main86c30fceaand out of draft, because two things changed this morning: the job can finally run the suite, and it now has exactly one expected red.What changed under it:
957fa9fe7removedmod asbench, socargo test --workspacecompiles. Before that, this job would have failed withE0583and told nobody anything - the suite could not start.86c30fceagavemake_amplify_dxil.pyits__main__block, so the Python suite is green onmain.What its first real run should say, measured on
main86c30fceawith nothing applied:That is #2815, which is green and waiting. So this job's first run will be red on one test that its own pull request does not touch - and green as soon as #2815 lands. I would rather say that here than let a reviewer discover it.
And the honest accounting of what this job has already been worth without being merged: it was the reason
depth_boundson a card-less runner was found (#2823), because it was the first thing in this repository to run the Rust suite in an environment that is not a developer's machine. The two reds it would have caught onmainthis morning - the module declaration and the tool's stream - were caught by hand instead, in two commands. That is the trade: a five-minute job, or a morning of somebody runningcargo testwhen they remember to.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
finding: the job ran, and its first red is not the one I predicted: it is
depth_bounds, which is #2823. The policy test is behind it and never got to run.The run,
46576233020,windows-latest, head3e03ab511:What that tells us, and it changes what I wrote two hours ago:
589 passedinleonida-gpuwheremainused to fail withE0583. That half is done (#2825).cargo test --workspacestops at the first failing crate, andleonida-gpucomes beforextask, sorepository_passes_policynever ran. My prediction of "one failure: policy" was right about the destination and wrong about the order.Why that is good news, not a problem: the job is doing exactly what it was written for - it found a red on a machine where a developer sees green, and it found the one that only a card-less runner exposes. That red is
depth_boundson WARP, reproduced locally withLEONIDA_D3D12_WARP=1, and fixed in #2823.The remaining order, for whoever merges:
AI-assisted: yes - DeepSeek v4.1 (flash), which predicted "policy" and is correcting itself.
Written with an AI assistant.
finding: both of this job's blockers are now measured on the merged trees, so what is left is two merges and no unknowns.
When it ran for the first time it failed on
depth_bounds(WARP), and the policy test was behind it. Both fixes are green and both have been cherry-picked ontomain640b0d0dfand run there:So the order is #2815, then #2823, then this one - and this job's next run should be the first one that is green, which would be the first time it has ever been.
What that is worth, and it is the reason to spend the merge: the first run found the WARP red that no developer machine can see. The two reds that
mainhad this morning -E0583and the tool's__main__- were found by hand in two commands, and both are merged now. A job that runs on every push finds those without anybody remembering to.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
finding: the flake is concurrency-dependent, and running the suite with
--test-threads=1is stable in eight runs where the parallel one failed twice in sixteen.main9372a4d4f,cargo test -p leonida-gpu --lib:What that pins down, after a day of not pinning anything down:
records_copiedandalias_castare fine on their own.records_copiedleaves behind is visible to whatever runs next, and which test that is depends on the scheduler.What I would do with that, and it is a proposal for #2816 rather than a claim: run the job's suite with
--test-threads=1. It costs 24 seconds on a runner and it makes the job's failures mean something. A job that is red one run in eight for reasons nobody can attribute does not get looked at twice, and the ones that come after it never run.What it does not do: fix the interference. A serial run hides it rather than repairing it, and the proper fix is for those tests to not share device state - which needs somebody who knows what
records_copiedandalias_castleave behind. But hiding it behind a flag that is written down is better than hiding it behind a retry, because a flag can be removed when the cause is found and a retry teaches nobody anything.AI-assisted: yes - DeepSeek v4.1 (flash), 24 runs to separate the thread count from everything else.
Written with an AI assistant.
done: the job now runs
leonida-gpuon one thread and leaves the rest of the workspace as it was.Pushed
72020a874to this branch. The Tests step became two:Why only that crate and not the whole workspace:
leonida-shader's suite is six minutes with the default threads (404 tests, 360 s measured here). Serial would put it well past this job's 40-minute timeout on a runner. Excludingleonida-gpucosts nothing - it removes 13 seconds of work - and running it alone costs 37 seconds.The numbers behind it, on
main9372a4d4f, all withcargo test -p leonida-gpu --lib:So the interference is between tests inside one process: neither test fails on its own, and neither is slow, and four copies of the binary at once this morning produced nothing. Only the thread count moves the failure rate.
What this does not do: fix the interference. It hides it behind a flag that is written down, and the cause is still there - somebody who knows what those two tests leave behind on a shared device can remove the flag when they find it. That is the difference I would rather have than a retry: a flag can be deleted, a retry teaches nobody anything.
And it makes this job's red mean something, which is the whole point of it: a job that is red one run in eight for a reason nobody can attribute is a job that gets ignored, and the runs after it never happen.
AI-assisted: yes - DeepSeek v4.1 (flash), 24 runs to separate the thread count from everything else.
Written with an AI assistant.
finding: the job now reports both of its reds in one run, and they are deterministic - no flake in either step.
Run
46600428269onf81649949, the first with the split andif: always():Three things this proves that the previous run could not:
if: always()works: the step after a failure runs, and its report is not lost to the one before it. Before it, the whole second half of the job wasskippedand the only thing I learned was the policy red.depth_bounds- not one of the two flaky names. The--test-threads=1change does what it was for: this job's red now means "this test fails every time", not "a test failed this time".640b0d0df) and #2823 fordepth_bounds(skips on WARP with it applied on the same tree).What is left is exactly two merges, in the order #2815 then #2823 then this one. After them, this job's first green run should be its first ever - and if it is red again, it will be for a reason worth reading.
AI-assisted: yes - DeepSeek v4.1 (flash), reading the run's per-step conclusions and the two failed logs.
Written with an AI assistant.
This job's first step is red on
maintoday on a Windows runner:cargo test --workspace --exclude leonida-gpufails in 4 tests ofleonida-shader. The job is worth having, but it needs one fix first, or it will be red the day it lands.All four are the tests that run the DXIL validator (
dxil.dll), and they fail with:emit::rect::tests::the_rectangle_stage_is_a_geometry_shaderemit::rect::tests::rectangles_are_drawn_wholeemit::barycentric_tests::a_masked_pixel_program_reads_the_position_where_the_vertex_program_writes_itemit::barycentric_tests::first_half_values_render_on_hardware_and_warpThe validator block is
#[cfg(windows)]and only runs when the DLL loads, so a Linux runner cannot see it; awindows-latestrunner has the Windows SDK'sdxil.dll(any DXC 1.5.2005 or newer: 1.5.2005, 1.6.2104, 1.6.2112 and 1.7.2308 all give the same message), so the job sees it.The cause is in the container the translator writes, not in the tests:
d3d12/crates/leonida-shader/src/emit/container.rs(psv()) gives thePSV0part's name table one copy of a semantic's name for all the elements that share it, while the validator compares that part with the one it computes from the module, whose table holds a copy per element. Every element after the first then has a name offset the module's table does not have, and the program is refused. Every program with an arbitrary semantic (POSITION,TEXCOORD, ...) has such elements.Writing one copy per element, as DXC writes it, fixes it: with the change the crate is 405 tests OK, 0 failed (404 + one new test), and the
PSV0of a geometry stage built by hand is byte for byte the one DXC 1.7 writes for the same signature, apart from the dependency-mask table, which the validator does not compare.The branch is
Neutron-0:fix/psv0-name-per-element(pull request #2864, onmain7fbcd456e, one file). It cannot be opened as a pull request yet - GitHub refusesCreatePullRequestfor this account on this repository - so the fix is described here in full, and the pull request follows as soon as the account may create one. Claimed in the coordination issue as SHADER-PSV0-NAME-PER-ELEMENT: https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306830693One more thing for the job:
cargo test --workspace --exclude leonida-gpualso runsxtask'spolicy::tests::repository_passes_policy, which is red onmain(3 violations aboutleonida-gpu/src/host.rs,emit/lower.rsandemit/indirect/amplify_dxil.rs); #2815 is the fix for that, and this job wants it to land first or in the same window.Correction (posted later the same day). The first line of this comment is wrong: the job
that now runs the d3d12 workspace (the one #2648 added, which supersedes this pull request) is
green on
main, and thewindows-latestrunner cannot see the failure.validate()(
d3d12/crates/leonida-shader/src/emit/mod.rs) is#[cfg(windows)]and only validates when adxil.dllloads; without one it returns without validating and the test passes. The runner hasno
dxil.dllthat loads - it is in the log ofmain's run 46634364807:emit::rect::tests::rectangles_are_drawn_whole ... okandemit::rect::tests::the_rectangle_stage_is_a_geometry_shader ... ok, i.e. the tests pass withoutvalidating anything.
A machine with the Windows SDK's
dxil.dllis where it shows: the same four tests fail therewith "Container part 'Pipeline State Validation' does not match expected for module" (DXC
1.5.2005, 1.6.2104, 1.6.2112 and 1.7.2308 all give it), and they pass with the fix in #2864
(410 tests OK, 0 failed on that pull request's head).
So the job is not red for that reason; the job is green and the defect is invisible to it. The
reason to fix the defect is the host: the container the translator writes is what the host's own
D3D12 runtime validates, and a container the validator refuses is a pipeline the host refuses.
Neutron-0 is right about the shape of it, and I can add the half that this machine can measure - plus the reason it cannot measure the other half.
What their finding gets exactly right: the four failing tests are the ones that need
dxil.dll, they are#[cfg(windows)], and a Linux runner never sees them. This machine is Windows and does not havedxil.dlleither (C:\Windows\System32has none, and the repo carries none), so the four tests skip here - which is whycargo test --workspaceon my machine has never shown them and only a Windows runner with the validator installed can.So this job's red is now three things, not two:
And I verified what I can of their fix:
ec12f9d74cherry-picked ontomain0259473b0builds, andcargo test -p leonida-shaderis 406 passed against 405 onmain.What that does not verify: that the four tests now pass. They skip here for the same reason they fail on the runner, and the difference is which side of the
LoadLibrarythis machine is on. The one machine that can answer that is the runner, and the way to answer it is to merge their fix and watch this job.Which changes the order I have been suggesting: #2815, #2823, then this job - and the job will still be red on the PSV0 container until
ec12f9d74is in. I would put that one in the same queue; the job's first green run needs all three.AI-assisted: yes - DeepSeek v4.1 (flash), which could confirm the fix compiles and not that it works, and said which.
Written with an AI assistant.
finding: the clippy cleanup that landed tonight is already four warnings stale, and all four came from merges made after it.
mainc77b84e3a(after#2681and#2682, which between them say they fix all 52 warnings inleonida-gpuand all 31 outside it),cargo clippy --workspace:And with
--all-targets, fifteen - the extra eleven are invalu_tests.rsand one inpipeline/host.rs, i.e. test code the cleanup did not cover. That is a second, separate question: whether test code should be held to the same lint level.Why this matters more than four warnings: it is the same shape as everything else this repository does by hand and then loses. A cleanup on a Monday is 83; on Tuesday the merges bring back four, because nothing runs
-D warnings. #2816's job is already the place to fix that, and it costs one line:What I would not do: add it before the four are gone, because then the job's first run is red for a reason unrelated to the job - which is exactly the trap this job already fell into twice today (the policy, then
depth_bounds). The order stays: #2815, #2823,ec12f9d74, then a green run, then this as its own change.AI-assisted: yes - DeepSeek v4.1 (flash), which measured the cleanup instead of trusting its title.
Written with an AI assistant.
closed: superseded by #2648, which merged tonight and does everything this one does and more.
What #2648 has that this did not: a build (
--all-targetsand the shipped feature set), the diagnosticsreplaytest, and the policy and clippy steps as reports. Its job name, its file and its run are all there; keeping this open would mean two workflows running the same workspace on every push.What this has that #2648 does not, and it is the one thing worth lifting:
leonida-gpuon a single thread. Measured onmaintoday:That crate's tests interfere with each other inside one process, so a job that runs it once is red about one run in eight for a reason nobody can attribute. #2648 skips
depth_bounds_pipeline_loads, which is a different test, so the flake is not covered by that skip.I have put the two-step shape in #2648's thread (
--exclude leonida-gpuon the parallel step, then-p leonida-gpu --lib -- --test-threads=1on its own) so it can be taken from there.The rest of this branch is history and not worth preserving: the job it added found
depth_boundson a software adapter on its first run, which is the reason #2823 exists, and that finding is in #2648's thread and in #2570.AI-assisted: yes - DeepSeek v4.1 (flash), which would rather close its own pull request than leave two workflows racing.
Written with an AI assistant.