gpu: a software adapter does not support the depth bounds test, whatever it answers #2823
Open
github-bot
wants to merge 3 commits from
github-bot/gh-2823 into main
AGit
pull from: github-bot/gh-2823
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
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
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2823
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2823"
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?
@fiestorra on GitHub · 2026-12-01 03:01 UTC · original
fiestorra:fix-depth-bounds-software→main· +48 −2 · 2 files · 3 commits · openA software adapter answers that it supports the depth bounds test and then does not gate the draw, so
depth_bounds()now says no for one. Eleven lines, and the test that guards on it skips where there is no card instead of failing there.How this was found: #2816's job ran for the first time on
windows-latestand failed in five minutes, on a test that passes on a machine with a GPU:And it reproduces here on the software adapter, which is what a runner without a card gets:
The query, and why it is not enough (
host.rs,depth_bounds):D3D12_OPTIONS2.DepthBoundsTestSupportedis true on WARP.OMSetDepthBoundsis then accepted and every fragment passes - the draw the test expects to be culled is not - so the feature query is right about the API surface and wrong about what the driver does with it. That is a software rasterizer's prerogative and not something to fix by trusting the query harder.The change:
adapter_ofwas already there (indirect.rs, the helperamd()and the NVIDIA check use) and becomespub(crate); the flag check is the onewarp_adapter()and three other call sites already use.Both arms, measured:
What this does not do: it does not make the rest of the GPU tests safe on a runner without a card. This one had a guard that happened to ask the wrong question; others may not have a guard at all, and #2816's job will find them one at a time. It does mean the depth bounds test neither hides on a real GPU nor lies on a software one.
AI-assisted: yes - DeepSeek v4.1 (flash), which reproduced it on WARP before changing anything.
Written with an AI assistant.
@fiestorra on GitHub · 2026-12-01 03:03 UTC · original
One clarification I want in the record, because I nearly wrote the wrong justification: this does not change what renders on a software adapter.
depth_bounds()has two production callers, not just the test:So before this change, on WARP, the runtime emitted
OMSetDepthBoundsand WARP ignored it - every fragment drawn. After, the runtime does not emit it - every fragment drawn. The picture is the same either way, and I am not claiming a rendering fix.What changes is that
depth_bounds()stops being wrong. It was returning "this host supports the test" when what it knew was "the device reportsDepthBoundsTestSupported", and on WARP those differ. The test is the place that difference became visible; the two production callers would go on being harmless no-ops.If a title depended on depth bounds for correctness, it would render wrong on WARP before and after - that is a software adapter's limitation, not something this can fix. What this does is stop the answer lying to anything that asks it next.
AI-assisted: yes - DeepSeek v4.1 (flash), which checked its own claim against the callers before making it.
Written with an AI assistant.
@fiestorra on GitHub · 2026-12-01 03:05 UTC · original
And what the second production caller does now, since that is the one with a message in it:
On a software adapter this branch now fires: the warning appears up to four times and the pipeline does not claim the state. That is the intended behaviour finally happening - the message has always said "the host GPU does not support", and until now a host that could not run the test answered that it could, so the warning never appeared on the one class of adapter it is about.
So the blast radius of the change, both places:
Three call sites, one answer, and the two that were silent were the ones that had something to say.
AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
@fiestorra on GitHub · 2026-12-01 03:18 UTC · original
done: green on every check.
And what it is worth, measured before the pipeline agreed: the test that failed on a card-less runner now skips there and still runs on the 4090.
Where this came from, so it is on the record: #2816's job ran for the first time and failed on this test in five minutes, on a machine with a GPU where it passes. A pull request that is not merged found a red that
maincould not see, and this is the second fix it produced.The first is #2815 (the asset policy). With both merged, and #2652 (the
xbox_presentflake),mainhas no known red in either layer - and #2816 can rebase onto that and its five-minute job is the thing that keeps it that way.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
@KelboLive on GitHub · 2026-12-01 05:24 UTC · original · reviewed
Verified both arms on this machine: with
LEONIDA_D3D12_WARP=1the test skips and passes on the head; on the RTX 4070 Ti SUPER it runs and passes; deleting the early return makes the WARP run fail exactly as reported (left: 255, right: 0,pipeline/host.rs:1793).The rule is the right level:
adapter_ofmatches the adapter by the device's LUID (indirect.rs:328-336), so the software flag cannot be applied to a hardware adapter, and it covers software adapters beyond WARP (Basic Render Driver). Vendor/device id would miss those; trustingD3D12_OPTIONS2is the thing that is wrong on WARP. Worth saying in the body that a hardware driver which reports the feature and ignores it is still trusted — only a behavioural probe would catch that, and it is not worth the cost for a CI-only failure.One real cost to fix before merge: the software check sits outside the
OnceLock(host.rs:5772-5777), so everydepth_bounds()call doesCreateDXGIFactory2+EnumAdapterByLuid+GetDesc1. I measured ~134 µs per call (~138 µs per warmdepth_bounds), anddraw::depth_boundsis called on everyOMSetDepthBoundsand every list replay (draw.rs:2780-2781). Before this PR it was a OnceLock load. Move the check insideBOUNDS.get_or_init, or cache the software flag in its ownOnceLock—host()is a process singleton (host.rs:1208-1217), so once per process is safe and matches the existing global cache. On WARP it is never cached at all today, because the early return skips theOnceLock.Minor: add a direct test of the rule on a software device — right now only the GPU test's skip catches a regression, and only in the shape where WARP is the device.
@fiestorra on GitHub · 2026-12-01 06:18 UTC · original
done: it merges onto today's
mainand both arms behave - the test skips on a software adapter and still runs on a card.main640b0d0df, this branch's one commit cherry-picked (base90c514437, no conflict),cargo 1.98.1:So on the merged tree the guard does what the branch claims: a runner without a card skips instead of failing, and a machine with one still exercises the depth bounds path.
Why this matters to the job that found it: #2816's first real run failed on exactly this test (
assertion left: 255, right: 0). With this merged, that red is gone from its suite, and the only one it would still see is the policy test - which #2815 fixes, also measured on the merged tree.The two together are what turns #2816 green: one for the WARP red, one for the policy red, and neither needs the other's file.
AI-assisted: yes - DeepSeek v4.1 (flash), both arms on the merged tree.
Written with an AI assistant.
@MoonEyes on GitHub · 2026-12-01 15:20 UTC · original
fc96e20b2: the adapter is asked insideget_or_init, so once, not at everyOMSetDepthBoundsand every replayed list (KelboLive measured about 134 µs a call). Onmaincd0c52fcf:cargo test -p leonida-gpu --lib631 passed, 0 failed.Pushed to your branch by MoonEyes (maintainer, the branch allows it), on top of your head, nothing rewritten. Say so if you would rather have it another way, and I take it out. The earlier verdicts are for the head before this one.
AI-assisted (Claude Code).
fc96e20b25tob60a7294a9@fiestorra on GitHub · 2026-12-01 21:37 UTC · original
Red on
d3d12 (windows-latest), and not this branch. The test that failed isdescriptor::tests::records_copi…(assertion failed: host.made(5)), and it is not the code this branch changes — which isdepth_boundsand the WARP adapter's support for it.It passes on a real card. Running every
descriptor::test on an RTX 4090 with this tree: 85 passed, 1 failed — and the one that fails here is a different test,descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in("copied as it was made"), which is a real failure ofmainreported in #2570.So the runner and this card disagree in opposite directions on the descriptor host, on two different tests, which points at the WARP path rather than at either PR. #2923 is the fix proposed for this class: the workspace tests share one WARP device across every core, and this crate flakes about one run in eight that way.
Written with an AI assistant.
@merzleckeier on GitHub · 2026-12-01 22:04 UTC · original
The current head resolves the adapter once across repeated depth-bounds queries.
I tested
b60a7294a9a94847ac721746a68d89edbba9fa94integrated onto mainc4ca5761508f136c5530482093bb3053b0bad4fain Wine 11.22 / VKD3D-Proton 3.1.0 on an RTX 4070 SUPER and AMD Raphael/RADV. Each row ran in a fresh process on both adapters withD3D12_OPTIONS2.DepthBoundsTestSupported == true. The probe counted entries toindirect::adapter_ofduring calls todepth_bounds().The fixture ORs
DXGI_ADAPTER_FLAG_SOFTWAREinto the successfully retrieved DXGI description of the same physical adapter. This isolates the classification branch. Native WARP was outside this run.The stock
depth_bounds_pipeline_loads_and_filters_drawstest also passed on both physical GPUs in both trees, with no printed skips. I included #2654 atf4ae7b9in both arms of that test for the Wine pipeline-library path.AI-assisted local testing, independently checked against the raw logs.
b60a7294a9to7adc427c3f@fiestorra on GitHub · 2026-12-01 23:43 UTC · original
The red d3d12 (windows-latest) was not this change: it was crash::tests::memory_at_names_what, in crates/leonida-loader, which this branch does not touch.
---- crash::tests::memory_at_names_what assertion left == right failed left: "read-write" right: "nothing mapped there"I could not make it fail here: six runs of cargo test -p leonida-loader --lib crash::tests on this machine, in parallel like CI, 19 passed, 0 failed, six times out of six. It needs a page to be unmapped and read back as unmapped, and a parallel test taking that address between the two is the shape of it.
The branch is rebased onto main
913b88b90(which also re-runs the jobs - gh run rerun needs admin rights I do not have), so this PR is current and its CI is fresh.If it goes red on the same test again, that test is worth fixing on its own: it is in the same class as #2923 (the crate's tests on one thread for the same reason) and it will keep colouring unrelated pull requests.
AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
@andrew-ai on GitHub · 2026-12-02 00:06 UTC · original
Verified
7adc427c3on Windows with the diagnostics build, using fresh processes for hardware and WARP. On RTX 5070 / 616.92, depth_bounds_pipeline_loads_and_filters_draws passed. A second hardware run with a temporary print after the final assertion confirmed both readbacks executed: depth 0.5 produced 0 outside [0.6, 1.0] and 255 inside [0.4, 0.6]. With LEONIDA_D3D12_WARP=1 the unmodified test explicitly printed “no host depth bounds support; skipped”. Both invocations show one passed in the Rust summary, but only the hardware run verified pixels. Codex-assisted.@imShangLi on GitHub · 2026-12-02 11:25 UTC · original
VERIFY-2823 — Linux, Fedora 45, Rust 1.98.1, cross-compiled for x86_64-pc-windows-gnu, Wine 11.21, no GPU device (only a VMware SVGA virtual adapter; Wine's D3D12 sees only the llvmpipe CPU device and the runtime still makes no host device), no game files
Verdict: PASS.
depth_bounds()is made honest for a software adapter: where it answered "the device reportsDepthBoundsTestSupported", which is true on WARP even though WARP does not gate the draw, it now answers no for an adapter withDXGI_ADAPTER_FLAG_SOFTWARE. The fix is at the root cause (the wrong answer, not the callers), it is confined to one function plus making an existing helperpub(crate), the software-flag test is the one five other call sites already use, the adapter is asked once (insideget_or_init), and on a real GPU the answer is unchanged — it still queries the feature. No test in the crate regresses: 703 tests on each side, 0 regressions; the only red→green is awatchflake.head
7adc427c3f4fe9e3cb7efabe5e0c169b820e924f("leonida-gpu: ask the adapter for the depth bounds once"), baseorigin/main=a917c54d6aff8c9ef5dda2d8ebf938cb5c693902, merge base913b88b9054de123a78fae0aea5ee24e10b7cb1d(134 commits behindmain). Two files, +13/−1:d3d12/crates/leonida-gpu/src/host.rsandd3d12/crates/leonida-gpu/src/indirect.rs.1. What it changes
Host::depth_bounds()(host.rs:6276-6307) answers "does the host GPU support the depth bounds test" and is used by three places:draw.rs:8077(emitsOMSetDepthBoundswhen it is true),pipeline/host.rs:888-902(claims the depth-bounds state on the pipeline when it is true, else warns "the host GPU does not support" up to four times), and the test's guard (pipeline/host.rs:1630).The old body queried
D3D12_FEATURE_D3D12_OPTIONS2and returnedDepthBoundsTestSupported. The new body, inside theOnceLock(so asked once per process), first answers false for a software adapter:and
indirect.rs:329makes the existingadapter_of(device)(which matches the device's adapter by LUID throughCreateDXGIFactory2+EnumAdapterByLuid)pub(crate). No other code changes.2. The claims, checked
The repository's own docs record no measured depth-bounds behaviour:
d3d12/docs/findings.mdandd3d12/docs/switches.mdhave nothing on it, and the port-status table ind3d12/docs/README-fxceless.mdlists depth bounds only as still "missing" from the port — so there is no repository measurement to quote for this, and the author's WARP measurement is the only one.depth_bounds()now says no for one." — The code change does exactly this. The premise (WARP reportsDepthBoundsTestSupportedtrue and does not gate) is the author's measured claim on WARP and is not something I can reproduce here; I checked the code structure, not the driver behaviour. TheD3D12_OPTIONS2.DepthBoundsTestSupportedquery is athost.rs:6292-6303and is unchanged — the software branch is added before it and short-circuits it.adapter_ofwas already there and becomespub(crate); the flag check is the onewarp_adapter()and three other call sites already use." — Confirmed.adapter_ofwasfn(private) atindirect.rs:329and is nowpub(crate); the exact expressiondesc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0(or== 0) is used athost.rs:1653(warp_adapter),indirect.rs:386,indirect.rs:1008,indirect.rs:4297andinplace.rs:1475— five call sites, so "three other" understates it.OMSetDepthBoundsand every replayed list comes here." — Confirmed.adapter_of(&self.device)is inside*BOUNDS.get_or_init(|| ...), so the DXGI factory + LUID enumeration runs once per process, not per call. This is the maintainer's edit (MoonEyes) on top of the author's original, which had the software check outsideget_or_init(i.e. per call); the head is the once-per-process version.draw.rs:8077previously emittedOMSetDepthBounds(a no-op WARP ignored) and now does not — the picture is the same.pipeline/host.rs:888-902previously tookg.depth_boundsas true and claimed the state; now it takes theelsebranch and warns (up to four times) and does not claim the state. The author's own comment in the PR thread makes the same point. So the change only makes the answer truthful; it is not a rendering fix and does not claim one.pipeline/host.rs:1627-1633: With the change, on a WARP adapterdepth_bounds()is false and the test prints "no host depth bounds support; skipped" instead of proceeding to the two-draw probe that failsleft: 255, right: 0. On a real carddepth_bounds()is the feature query and the test runs. This is exactly the author's measured both arms (WARP: skip; RTX 4090: runs in 0.88 s).3. What the tests do here
I cross-compiled
leonida-gpuforx86_64-pc-windows-gnuand ran the test binaries under Wine withpython3 tools/wine_red_green.py 2823 --crate leonida-gpu(from/home/shangli/oc-workspace/gta6). The pull request changes only source, so the verifier's red side is the merge base and the green side is the head — it checks that the source change does not redden any test that passed on the base.913b88b90(merge base)7adc427c(PR head)The tool printed "red then green", but its 1 red→green is a
watchflake, not this change:watch::tests::what_is_put_in_beside_the_guards_is_told_at_every_viewfailed on the base and passed on the head. The PR toucheshost.rs/indirect.rs;watch.rsis a different module, and the same threewatchtests that fail on the base fail identically on the head (holes_are_known_until_the_runtime_tells,no_mapping_is_lost_between_askers,what_is_left_alone_is_no_known_hole). So the real result is 0 regressions; the "red then green" verdict is the flakywatchguard-page machinery under Wine without a real GPU. 640 tests pass on both sides, 59 areignored.pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_drawsreportsokon both sides, but it returns atpipeline/host.rs:1628(let Some(host) = host() else { return; }) becausehost()isNoneon this machine. I confirmed this directly: Wine's D3D12 (DXVK 2.7.1) does find a Vulkan device —Found device: llvmpipe (LLVM 23.1.5, 256 bits), a CPU software device — butHost::create()still fails afterD3D12CreateDevice(the ignoreddump_buffer_view_descriptor_bytesprobe, which requires a device, panics with "an active D3D12 device" atlisted_raw_tests.rs:224), sohost()isNoneand the test returns beforedepth_bounds()is ever called. Running the test alone under Wine with--nocaptureprintedokin 0.05 s with no "no host depth bounds support; skipped" message — i.e. it did not reach the guard that message is in. So the skip-message half of the change is verified by reading the guard and by the author's WARP measurement, not by a run here.depth_bounds()is only reached with a liveHost, which this machine does not make. So the wine_red_green run confirms only that the change does not regress the device-free suite, not that it does what it claims.4. Any failure I saw and why it is not this PR
watchfailures (§3) fail on the merge base too and are environment failures of the guard-page/exception machinery under Wine without a real GPU; the PR touches none ofwatch.rs. The 1 red→green flake is the same class (a differentwatchtest than in the #2911 run, so the flakiness is not a fixed set).5. What I did not check
DepthBoundsTestSupported == trueand then not gating the draw. This machine has no hardware GPU and Wine's D3D12 makes no host device at all (see §3), so I could not measure either the red (left: 255, right: 0) or the green (skip) behaviour. The premise and both arms rest on the author's measurements (WARP and an RTX 4090, driver 621.24) and the commenters' (RTX 4070 Ti SUPER, RTX 5070/616.92, RTX 4070 SUPER + AMD RADV under Wine), which I read but did not reproduce.LEONIDA_D3D12_WARP=1path:warp_adapter()(host.rs:1647) requires the WARP adapter and refuses a non-software one; I did not run it under Wine.913b88b90, 134 commits behind today'smain(a917c54d). The red/green run is against the merge base, not today'smain; I did not check whether the change still applies cleanly tomain(the author's and commenters' runs say it merged cleanly onto themains of their times).cargo test --target x86_64-pc-windows-gnuunder Wine 11.21 on Fedora 45; the#[cfg(windows)]path is compiled, but a real Windows driver/ABI is not exercised.adapter_ofon a hardware card: I verified the expression and that it matches by LUID (indirect.rs:329-338), but did not observe it return a hardware adapter's description; theamd()/NVIDIA paths that also use it are unchanged and were not re-run on a card.leonida-hle,leonida-loader) and the repository's Python suite were not run; the change is confined toleonida-gpu.@MoonEyes on GitHub · 2026-12-02 18:28 UTC · original
Verification triage of #2823
Head
7adc427c3is already verified on this exact head: andrew-ai (Windows, diagnostics build) and imShangLi (VERIFY-2823). CI passes (6/6) and the PR merges cleanly. No new run here (Windows-only). The in-game run the maintainer asked for is not linked from this thread. Verdict: ready (already verified on this head).AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
@MoonEyes on GitHub · 2026-12-02 21:34 UTC · original
RUN (independent run on Windows, head
7adc427c3f4fe9e3cb7efabe5e0c169b820e924f, merged intomainb41763227aeed2d23c98af84bcbc1bddc7acdc90withgit merge --no-ff)Merge: clean, no conflict. The PR changes two files in
d3d12/crates/leonida-gpu/src/:host.rs(+12) andindirect.rs(adapter_ofbecomespub(crate)). No Python test is touched and no diagnostics-only code is added (the test it protects is built with--features diagnostics). Machine: RTX 4060, driver 610.88, Windows 11 10.0.26300, cargo release.Green
cargo test -p leonida-gpu --release --locked --lib: 703 passed, 0 failed, 59 ignored.--features diagnostics --lib depth_boundson the card: 3 passed.depth_bounds_pipeline_loads_and_filters_drawsran (0.34 s, no "skipped" line), so the real-GPU arm still draws and filters.LEONIDA_D3D12_WARP=1: 3 passed, and the test prints "no host SM 6.0 depth bounds support; skipped", i.e. the new early return is taken on the software adapter.Red
The PR adds no test. I mutated the new code (each run on WARP and on the card, then restored):
== 0)Why M1 survives here, measured with a temporary probe: with the check removed, the WARP run goes past the guards, compiles the shaders and draws, and passes. So the WARP on this machine (10.0.26300) gates the draw correctly, and the failure the PR describes (
left: 255, right: 0) does not reproduce here. I could not confirm the bug, and I could not make the fix observable either. M2 and M3 survive because the only test of this path accepts "skipped" as a pass, so nothing pins the software branch.Review
docs/switches.mddoes not exist in this tree and nothing needed regenerating.get_or_init, so the adapter is looked up once, not perOMSetDepthBounds. This is the later commit on the head, and it is the right place.adapter_ofmatches the adapter by the device's LUID, so the flag cannot come from a different adapter.draw.rs(OMSetDepthBounds) and the pipeline build path both go throughdepth_bounds(), so on a software adapter a pipeline asking for the test now takes the "host does not support it" warning branch. The PR thread already says this.issues/14, 1608 or 2570 link in the text I read; the thread cites #2816 and #2570 as context. Worth adding.d3d12 (windows-latest)runs noted there were other tests, not this change.Not covered
windows-latestrunner): not available here, so the fix itself is not confirmed.ubuntu/Wine arm was not run.Verdict
PARTIAL. The merge is clean, the lib suite and the depth bounds tests are green on the card and on WARP, and the change is small and correctly placed. But the PR has no test that fails without it, all three mutations survive, and the bug did not reproduce on this WARP, so the fix is not independently confirmed. In-game run still required (none posted on this head).
AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge.
@fiestorra on GitHub · 2026-12-02 22:10 UTC · original
Taken, and fixed in
854796496. You were right that nothing failed without the change: all three mutations survived. The decision is now two pure functions, and a unit test drives them:Host::depth_boundsreads the adapter flags and hands the query's answer todepth_bounds_answer, so the guard is testable without a WARP. Your three mutations, re-run against it:With the change: 644 passed, 1 failed, 59 ignored (the failure is this machine's
views_are_made_beside_the_heap_and_copied_in, unchanged onmain).One thing about my own rigour, since you measured mutations yourself: my first full-suite run after the controls showed a second failure in the new test, and it was mine — I restored the file with
Copy-Item, which preserves the backup's timestamp, so cargo reused the binary built from M3 and I read a stale mutant as a regression. Touching the file fixed it. A control that restores a file has to restore its build too.What the test still does not cover: the WARP behaviour itself. This card is not WARP, so the driver lie the change is about is unreproduced here; the test pins the decision, not the driver.
Written with an AI assistant.
@fiestorra on GitHub · 2026-12-02 22:52 UTC · original
The
UNSTABLEhere ismain's, not this pull request's:d3d12 (windows-latest)fails at Build on a line this branch does not touch —crates/leonida-lua/src/tests.rs:1089does.unwrap()onRuntime::new, which no longer returns aResultsince057cc94d8.main(16243cd6e) does not compile itsleonida-luatests at all, so every pull request fails that job, and a red check says nothing about this one. I confirmed it withcargo test -p leonida-luaonorigin/main: the same error, exit 101.The one-line fix is pushed to the fork as
fix-main-lua-test-unwrap(cf29393a1,46 passedafter it), with the finding in #2570 — this account cannot open pull requests.My evidence for this change stands: 644 passed, 1 failed, 59 ignored on the branch head, the failure being this machine's
views_are_made_beside_the_heap_and_copied_in, and the three mutations MoonEyes reported now fail the new unit test.Written with an AI assistant.
8547964960to1191462f8b@fiestorra on GitHub · 2026-12-02 23:35 UTC · original
Rebased onto the fixed
main(81efe4566), pushed as1191462f8. TheUNSTABLEwasmain's —leonida-lua's tests did not compile for a few hours (057cc94d8's.unwrap()onRuntime::new), so everyd3d12 (windows-latest)job failed at Build; #3244 fixed it witha22fa26d6.On the new base:
cargo test -p leonida-gpu --lib depth_bounds→ 4 passed, including the unit test that now kills MoonEyes' three surviving mutations.Written with an AI assistant.
@enlight3d on GitHub · 2026-12-03 00:54 UTC · original
RUN (in game, gate-style): head
854796496tested in a batch of nine pull requests: #2609 (3fbcacc4e), #2654 (f4ae7b922), #2686 (4ce795127), #2823 (854796496), #2841 (24ff8f24c), #2890 (262439781), #3154 (854fc3441), #2588 (598930e5b) and #3119 (6097c033c), merged in that order withgit merge --no-ffontomainf3865cae8. One conflict, in the credit table ofd3d12/README.mdwhen #2588 went in (both rows kept); no code conflict. Files touched by more than one of the nine:d3d12/docs/switches.md(#2686, #3119, #3154) andd3d12/README.md(#2588, #3119). Built withdiagnostics,mimalloc, targetx86_64-pc-windows-msvc. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300).Launcher defaults except
-PrecompileUsed, Series S settings,-NoDlss -NoFrameGen, standing at the save. On thismainthe launcher precompiles every recorded pipeline by default (88,671 here: a first warm-up with the plain defaults had made 9,000 of them after 660 s when it was stopped), so the runs use-PrecompileUsed(the 2,455 pipelines earlier runs drew with). A warm-up run first (#2686 changes the translator, so everything was translated again), then one run with the memory safety stop, ended 330 s after reaching the world:Warnings: only kinds that a run on the same
mainwith another pull request (#3128) printed too, in about the same numbers; no new kind. No pipeline refused other than the 29 "creation method that is not implemented" lines that run has as well. The last frame saved (8192) shows the world drawn normally.This pull request's own lines: on this card the depth bounds answer is unchanged (
host depth bounds support,supported=true): the change is for a software adapter only. Tested at head854796496; the current head1191462f8is the same three commits rebased onto a newermain(samegit patch-id).Verdict: PASS for the batch (a pass covers each of the nine; a failure would not have said which). Not covered here:
-RayTracing, DLSS and frame generation, other GPUs, Wine/Proton.AI-assisted: Claude Code (Claude Opus 5.5)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.