gpu: a software adapter does not support the depth bounds test, whatever it answers #2823
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2823:github-pr/2823" git switch "github-pr/2823"
Open
leonida/mandy
fiestorra wants to merge 3 commits from
github-pr/2823 into main
pull from: github-pr/2823
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/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!2823
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.A 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.
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.
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.
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.
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.
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).
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.
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.
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.
Verified 7adc427c3 on 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.
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.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
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.
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.
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 aResultsince 057cc94d8.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.
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.
RUN (in game, gate-style): head 854796496 tested 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 with
git 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 head 854796496; the current head 1191462f8 is 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)