d3d12: LEONIDA_EXP_NO_PIXELS empties the scissors at each draw; what the pixels cost (D3D12-NO-PIXELS-PER-DRAW) #3164
Open
Lanworm wants to merge 6 commits from
upstream-pr/3164 into main
pull from: upstream-pr/3164
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
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.
Reference
ProjectLeonida/mandy!3164
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3164"
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?
Imported from ubiquitarianism/leonida. Originally posted by Lanworm on 2026-12-02T15:48:29Z.
Claimed in the coordination issue as: D3D12-NO-PIXELS-PER-DRAW (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7350934809)
What and why
LEONIDA_EXP_NO_PIXELSis a diagnostics-only timing switch forLEONIDA_AB: it should leave the title's draws without pixels, so a phase's card time against the next one's is what the pixels cost. Until now it emptied the scissors insidedraw::scissors, i.e. only where a scissor was set. In the game it changed neither the picture nor the card's time, although new counters showed every scissor set in its phases being emptied, and a GPU test shows the driver honours an empty scissor.This PR:
draw.rs:State::no_pixelsempties the scissors right before each of the title's graphics draws (DrawInstanced, DrawIndexedInstanced, direct and amplified DispatchMesh, non-dispatch ExecuteIndirect), andState::pixels_backputs the title's back right after it, the wayLEONIDA_EXP_MESH_ONE_PIXELalready does for mesh draws. A draw before the title set any scissor in the list is left alone (it has none to take back).set_scissorsnow stores the rects and calls the newapply_scissors, whichmesh_scissoralso uses to restore; somesh_scissornow restores the widened rects underLEONIDA_SCISSOR_TEST=fulltoo (only when both experiments are set). With the switch off, and in non-diagnostics builds, every path sets the same scissors as before.ab.rs: the A/B counters line getsgraphics_drawsanddraws_without_pixels.tests/scissor.rs: a GPU test of the driver, not of the port: a full-target triangle under an empty, one-pixel and whole-target scissor, on the default adapter and WARP (0, 1 and 64 of 64 pixels). It shows the earlier no-effect result was not the driver.docs/findings.md: the measurement below.docs/switches.md: the two changed rows.The measurement (RTX 5060 Ti, i5-12400F, Series X as the F1 menu had saved it (the title's own upscaler from a render scale of 0.6667, no DLSS), no generated frames, standing,
LEONIDA_GPU_TIMING=1,LEONIDA_AB=4,LEONIDA_EXP_NO_PIXELS, 42 adjacent pairs of phases):draws_without_pixelsequalsgraphics_draws(about 4,900 a frame).The 14 ms is a difference rather than an exact share: it includes depth and blending, and anything the title derives from depth saw other input. Cheaper pixel shading can therefore take at most about a fifth off the card.
Tested
cargo test -p leonida-gpu --features diagnostics --locked: lib 777 passed,--test scissorpassed.cargo test -p leonida-gpu --locked --lib: 696 passed.cargo check -p leonida-gpu --locked, with and withoutdiagnostics.cargo clippy --all-targetsshows no new warnings in the changed code.python -I tests/test_d3d12_switches.pyandpython -m unittest discover -s tests -p "test_docs_*.py"pass.python -I scripts/check_no_game_data.pyon every changed file passes.python -I scripts/red_green.py nopixels-diagnosticsgivesverdict: no red(697 pass on both sides). This is expected: the only new test checks the driver, which is the same without the change. The change itself was confirmed in the game, by the counters above and by the card time and picture changing in ON phases, which they did not before.GPUs tested: NVIDIA GeForce RTX 5060 Ti, Windows 11 Pro 26200, plus WARP (the GPU test).
AI-assisted: yes. Claude Code with Claude Opus 5.5 wrote the code and the texts. The reviewer was also Claude Opus 5.5. The measurements were run in the game by the submitter.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Edited 2026-12-03: the run's profile corrected. The F1 menu had saved Series X before the run (the title's own upscaler from a render scale of 0.6667, no DLSS), not Series S with DLSS as first written; the numbers are unchanged.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T16:34:42Z.
Verified here: it applies on the current
mainand its integration test passes.The test is the right shape for the switch:
LEONIDA_EXP_NO_PIXELSempties each draw's scissor, and the test checks that a scissor leaves only its own pixels - which is what has to be true before the timing it produces means anything.What that does not say: the timings. The whole point of the switch is to measure what the pixels cost, and the number it produces has to come from a run of the title with and without it - this machine can measure neither, so I am not vouching for the finding it is meant to produce, only that the mechanism it rests on is tested.
For the merge: the checks show
BLOCKEDand the documentation files are in the change, sod3d12_switches.py --checkis worth a run before the review - it is the one check that catches a switch table that no longer matches the code.AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:18:11Z.
Verification of #3164 (third party, code review on Linux; not built: Windows-only
leonida-gpu)1065952da5fb0f12c354d8782568132c22c836ed(5 files:ab.rs,draw.rs, newtests/scissor.rs,findings.md,switches.md; +326/-17).3c106eb2f.git merge-tree --write-tree origin/main pr/3164againstmain45dc41f95is clean(21 commits behind).
python -I scripts/check_no_game_data.pyon the 5 files (on the merge): exit 0.Review
mainemptied scissors only insidedraw::scissors, that is, only when the title set one. Draws thatran under scissors set earlier kept their pixels, so the A/B phase measured nothing. The fix empties the title's
scissors right before each graphics draw and puts them back right after (
State::no_pixels/pixels_back,draw.rs:5344-5372). It is applied at every title draw site: direct, mesh, indirect (kind != DISPATCH) andthe three other draw paths. This fixes the cause rather than adding another special case to
scissors().draw.rs:5391-5403) and the indirect site (:6905-6930). There is no?orreturnbetween the two calls, so a list never keeps empty scissors. The ordering withmesh_scissor(LEONIDA_EXP_MESH_ONE_PIXEL) is right: one-pixel scissor, emptied, title's scissors back,then
mesh_scissor(false).#[cfg(feature = "diagnostics")]. Release builds compileno_pixelstofalse, andpixels_back(.., false)is a branch. In diagnostics builds each draw does one relaxed atomic addand one
ab::pick.self.scissors.is_empty()). The newgraphics_draws/draws_without_pixelscounters in the A/B line show how much is missed. That is the rightinstrument, per AGENTS.md "check the instrument".
tests/scissor.rstests the driver, not the port. Its own header says it "cannot fail on the port's side", sothere is no red/green for the
draw.rschange. The counters and thefindings.mdrun are the evidence. Thatis acceptable for a diagnostics-only timing switch, and the body is honest about it.
Process
Windows at this head.
Verdict: ready (not built here). It only needs the fork CI approved.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T20:43:58Z.
Ran natively on Windows 11, head
1065952damerged into currentmain(b41763227, clean merge).MoonEyes read the code and fiestorra ran the scissor test, so here I only add what the thread doesn't have yet. That means the suite on the merge, a driver probe of what an empty scissor leaves besides pixels, the debug layer and the switches check.
Suite (measured)
cargo test -p leonida-gpu --features diagnostics, libtests/replay.rstests/scissor.rscargo test -p leonida-gpu --libwithout diagnosticscargo clippy -p leonida-gpu --all-targets, with / without diagnosticstests/scissor.rscopied ontomainpasses there too. That's expected because it tests the driver and not the port, so there's no red/green to get.python -I tools/d3d12_switches.py --check d3d12/docs/switches.mdpasses on the merge, which answers fiestorra's point.test_d3d12_switches.pypasses andcheck_no_game_data.pyon the 5 files exits 0.test_docs_python_depserrors here (f-string SyntaxError) onmainas well, so it isn't from this PR.What an empty scissor leaves (measured with a throwaway test, not pushed)
The test draws a full-target triangle into an 8x8 target through VS, GS, stream-out and PS, with depth and stencil writes on. VS, GS and PS each add to a root UAV, and occlusion, pipeline statistics and SO statistics queries wrap the draw.
DrawInstancedandExecuteIndirectwith a DRAW signature gave the same numbers. The card and WARP matched too, apart from the two cells marked WARP.I also ran a plain pipeline with no UAV, GS or stream-out, in case the driver skips vertex work once nothing can reach the rasterizer. It doesn't. VSInvocations is still 3 under the empty scissor on both adapters. So for VS/GS pipelines the PR's claim holds. Shading, depth, stencil, colour writes, PS UAV writes and occlusion counts all drop to zero, and everything before the rasterizer still runs. Mesh pipelines aren't covered because the probe only had FXC.
Debug layer (measured once, ID3D12InfoQueue present on both devices)
There are no errors. Each draw under an empty scissor gives one warning, ID 695, saying viewport 0 is non-empty while its scissor is empty.
Host::log_messagesdrains the queue at every submit and turns each message into atracing::warn. So withLEONIDA_D3D12_DEBUG=1and this switch on, the log would get up to one line per emptied draw, unless the info queue's own message limit caps it first. I didn't run the port under the debug layer, so that part is read. Muting ID 695 while the switch is inLEONIDA_ABwould be cheap, or one line in switches.md would do.Code (read)
On the title's runtime path, every host
DrawInstanced,DrawIndexedInstanced,DispatchMeshandExecuteIndirectis one of the five wrapped sites indraw.rs. The other hits are the port's own passes (compose, trainer overlay,record_plane_pass), the startup dispatch probeask_wide, tests and benches, and the capture player inreplay/play.rs. The title's list has noExecuteBundlehandler, so there's no bundle path to cover. All title scissors go throughset_scissors. Clears with rects ignore scissors in D3D12, so clears keep their cost in ON phases and aren't part of the 14 ms.MoonEyes checked the mesh and indirect sites for early exits. The other three (
DrawInstanced,DrawIndexedInstanced, amplified mesh) have nothing betweenno_pixelsandpixels_backeither. After a list cutreplay()sets the title's scissors again, and the next draw empties them again, so I don't see a way for the original scissors to leak back into an ON draw.With the switch off it reads the same as
main, except for the case the body already names.mesh_scissornow restores widened rects whenLEONIDA_SCISSOR_TEST=fulland mesh mode 2 are both set.LEONIDA_MESH_TEST=scissorworks withoutdiagnostics, so that one combination changes in normal builds too.The A/B counters fit the claim.
graphics_drawscounts calls, so anExecuteIndirectof N records counts once and the 4,900 a frame are calls, not records. ON phases also add twoRSSetScissorRectsper draw that OFF phases don't have, so the card-busy delta is if anything slightly low, and the frame median carries some extra submit-thread work.Conflicts (measured with
git merge-tree)Out of the 36 open PRs touching
draw.rs,ab.rs,findings.mdorswitches.md, only #2958 gets a new conflict from this one. It's indraw.rsat theDrawIndexedInstancedsite, on adjacent lines, and keeping both sides fixes it. The others that conflict already conflict withmainin the same files.Not checked: the in-game timings, mesh-shader pipelines under an empty scissor, a port-level test that each title draw really gets emptied or that switch-off is identical (both only read), the port itself under WARP or the debug layer (the probe made its own devices), a release build.
GPUs tested: an NVIDIA card (default adapter, hardware) and WARP (software adapter). The debug layer was confirmed on both for one probe run.
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-02T21:01:22Z.
RUN (in-game RTX 3090 300 s stress gate, 14-PR combined batch) — PASS covering exact head
1065952da5fb0f12c354d8782568132c22c836ed.git merge --no-ffontomainb41763227(diagnostics,dlss,mimalloc,exe_sha16 = c47eeb717f761d9d; changed-file clean-room scan exit0; workspace test targets compiled).14PRs):#3200d1a91afd1,#319880a627bb1,#319193b47ac9d,#3189c182fc392,#3176ae0075d9a,#3168337388052,#31641065952da,#3146ebc0253ff,#312464600ef0c,#3069311d33a40,#30318df1bfce7,#3029e49404808,#3054ff53fd8b9,#3010d645712a3.610.88, Series X profile,2560x1440,-NoFrameGen,scripts/game-gate.ps1(301.3 sin world,LEONIDA_EXP_NO_PIXELSoff/default) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (GATE CONTROL moved=2.51 m,max_from_ctrl=5,053.9 m).c47eeb717f761d9d)mainb41763227baseline (cf499737bf684f6a)clean,0reasons,0warnings)clean,0reasons,0warnings)301.3 s(4,504frames)305.6 s0/0/00/0/020.10 FPS/69.76 ms19.13 FPS/74.01 ms8,048/5.222 s7,983/2.358 sVerdict: PASS for the 300 s default-off in-game stability gate on
1065952da. (We also plan a dedicatedLEONIDA_AB=10,LEONIDA_EXP_NO_PIXELSRTX 3090 measurement next.)(AI-assisted verification:
gemini-4-neon+gpt-6.2-astra.)Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T23:54:02Z.
VERIFY-3164 — Windows nativo: la suite pasa, y el arreglo no tiene test porque el camino está tras un interruptor apagado
1065952da—draw.rs(two code lines + doc),tests/scissor.rs(comments)Ran at the head
The change, and it is a real bug:
pixels_offusedself.scissors.len().clamp(1, EMPTY.len())— so an empty scissor list became one empty scissor, i.e. it emptied a scissor that does not exist — and now it is.min(...)with a!self.scissors.is_empty()guard, so a draw before the title set any scissor is left alone.My control, which did not bite, and why: I put both lines back (
clamp(1, ...), no guard) and the suite stayed green. Because the whole path is insideif crate::ab::pick("LEONIDA_EXP_NO_PIXELS") == Some(true)— an experiment switch that is off unless someone sets it, and no test in the crate sets it.So, honestly:
red not constructiblefrom here. The fix is right by reading —clamp(1, ..)on an empty slice is exactly the "take back what was never set" bug — but the suite cannot fail on it, and a change that no test can reach is a change that a later edit can undo silently.And the second half of the commit is a test whose comments say more than most:
tests/scissor.rsis "a check of the driver, not of the port" — "a test of it cannot fail on the port's side". Writing that down is what keeps the test from being trusted for the wrong thing, which is a bigger service than the code line.What I could not test
LEONIDA_EXP_NO_PIXELSpath: it needs a D3D12 device and a title's scissor list.pixels_offwith the switch forced on (anab::pickseam), which would make this fix reachable by the suite.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by Lanworm on 2026-12-03T07:47:29Z.
Thanks to everyone who verified this.
e4dfc90answers the three points raised:State::no_pixelssets are now chosen by a small pure function,no_pixel_scissors(title, on)indraw.rs, covered byno_pixel_tests::no_pixels_empties_the_titles_scissors_only. It checks: as many empty scissors as the title set, at most 16; none when the title set none; none when the switch is off. I put the old choice back (on.then(|| &EMPTY[..title.clamp(1, 16)]), no guard) and the test fails:left: Some([RECT { 0, 0, 0, 0 }]),right: None. It passes with the change. This was done by reverting that one line by hand:red_green.pycannot build the new test againstmain, where the function does not exist.LEONIDA_EXP_NO_PIXELSis named inLEONIDA_AB, the host's info queue now gets a storage deny filter forD3D12_MESSAGE_ID_DRAW_EMPTY_SCISSOR_RECTANGLE(695). This is diagnostics builds only. It compiles and the suite passes; I have not run the port underLEONIDA_D3D12_DEBUG=1to see the log stay quiet.graphics_drawsdoc andfindings.mdnow say these are calls: an indirect execution of several records counts once.Tests on the head (RTX 5060 Ti, Windows 11):
cargo test -p leonida-gpu --features diagnostics --locked --lib: 778 passed.--test scissor: passed.test_d3d12_switches.pyandcheck_no_game_data.pyon the changed files: pass.@EdenBendheim, thanks for the gate run; an
LEONIDA_AB=10,LEONIDA_EXP_NO_PIXELSnumber from a 3090 would be a useful second point next to the 5060 Ti one.AI-assisted: yes (Claude Code, Claude Opus 5.5; reviewed by a separate Claude Opus 5.5 agent).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T08:00:06Z.
RUN (in game, one pull request), its head merged with
git merge --no-ffonto maind9b618f10: #3164e4dfc9012. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this pull request, on the head above. If it changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised.LEONIDA_EXP_NO_PIXELSis an experiment switch that is off by default and was left off, so this run covers the default path only. This run is at the low end of tonight's range on this machine (13.3 to 17.4 fps); one run cannot say whether that is the change or the scene.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T08:04:38Z.
Rechecked
e4dfc901merged ontomaind9b618f1. The Windows MSVC diagnostics build under Wine 11.22 ran the draw suite with 28 passes and three existing ignores, includingno_pixels_empties_the_titles_scissors_only. A scratch control restored the original lower clamp insideno_pixel_scissorsand kept the new test. It failed on the zero-scissor case:Some([RECT { 0, 0, 0, 0 }])instead ofNone. The debug-layer filter compiled in the diagnostics build. The execution check here covered the scissor regression.I also paired this head with #3291
6b0ee46band the stricter catalog check from #3270. The combination merges cleanly and the tracked page passes all 21 catalog tests with 685 names and 646 descriptions. AI-assisted with OpenAI Codex.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.