Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
384 commits
Select commit Hold shift + click to select a range
eedc085
d3d12: only title memory placed in place is held, not the runtime's a…
adrianmjim Nov 29, 2026
ba7c4b2
d3d12: an upload ahead that copied nothing leaves its texture to the …
adrianmjim Nov 29, 2026
b1ed220
d3d12: under memory pressure the send trim keeps spares that came bac…
adrianmjim Nov 29, 2026
8521020
d3d12: a plan's place in the compare's results is one function, teste…
adrianmjim Nov 29, 2026
41d8094
d3d12: a placed texture released and made anew counts its copy as mad…
adrianmjim Nov 29, 2026
8a061c1
d3d12: a send spare serves only a send of more than half of it, or on…
adrianmjim Nov 29, 2026
64f858f
d3d12: refused title memory goes back after the MEMORY lock, not unde…
adrianmjim Nov 29, 2026
25a7c17
d3d12: a list submitted again holds only the staging buffers still in…
adrianmjim Nov 29, 2026
19e7a1b
d3d12: a free the host refuses just after a hold went is still taken …
adrianmjim Nov 29, 2026
b5d2f71
d3d12: a video's plane a list copies itself is not taken for the prel…
adrianmjim Nov 29, 2026
3786957
d3d12: view-table entries a live descriptor slot names are never let go
adrianmjim Nov 29, 2026
b691f7b
d3d12: the title's VirtualFree glue is one function the runtime and t…
adrianmjim Nov 29, 2026
648355c
d3d12: a staging buffer made again for a detiling is not zeroed first
adrianmjim Nov 29, 2026
d17b3e2
d3d12: a section the runtime lets go of leaves its record in the view…
adrianmjim Nov 29, 2026
d481f3e
d3d12: the docs of the idle sweep say staging states are kept, not bu…
adrianmjim Nov 29, 2026
c472bce
d3d12: the title's release of a placeholder reservation the runtime s…
adrianmjim Nov 29, 2026
cc2758c
d3d12: the xmem tests that reserve top-down take turns
adrianmjim Nov 29, 2026
a72950e
Merge unified/landed-cells-gate into perf/unified-memory
adrianmjim Nov 29, 2026
b75c603
Merge unified/small-leaks into perf/unified-memory
adrianmjim Nov 29, 2026
38fbb2d
Merge unified/send-pool-trim into perf/unified-memory
adrianmjim Nov 29, 2026
c9be141
Merge unified/placed-textures into perf/unified-memory
adrianmjim Nov 29, 2026
35d673a
Merge unified/texture-staging-release into perf/unified-memory
adrianmjim Nov 29, 2026
d7b0dee
Merge unified/descriptor-views into perf/unified-memory
adrianmjim Nov 29, 2026
1539d4c
Merge unified/inplace-free into perf/unified-memory
adrianmjim Nov 29, 2026
1f55fd7
Merge unified/compare-ring into perf/unified-memory
adrianmjim Nov 29, 2026
e38d8a3
Merge unified/placement-bench into perf/unified-memory
adrianmjim Nov 29, 2026
e57dc53
d3d12: the title's physical pages come in sections of 16 MiB by default
adrianmjim Nov 29, 2026
f69eabd
d3d12: physical page numbers stay below 2^25, freed ones given out again
adrianmjim Nov 29, 2026
3f7fc4b
d3d12: large XMemAllocDefault blocks are write-watched reservations b…
adrianmjim Nov 29, 2026
b2c0118
d3d12: descriptor slots let go of buffers over title memory freed in …
adrianmjim Nov 29, 2026
10bb7ef
d3d12: a host copy's snapshot holds only the pieces of its declared r…
adrianmjim Nov 29, 2026
f17d056
d3d12: the title's CreateHeap heaps are write-watched xmem reservations
adrianmjim Nov 29, 2026
b1d17b4
d3d12: small sections of physical pages are made committed at their f…
adrianmjim Nov 29, 2026
682fab8
d3d12: the title's VirtualProtect of memory in place is made once its…
adrianmjim Nov 29, 2026
b6d3c75
d3d12: a value wait under the relay ends when the last flight that ma…
adrianmjim Nov 29, 2026
45236b5
d3d12: XMemGetWorkingSetStatistics tells the title its own use
adrianmjim Nov 29, 2026
4cbbb54
d3d12: a fixed-address reservation over a release kept for a heap doe…
adrianmjim Nov 29, 2026
1883e5e
d3d12: the title's blocking fence wait under the relay ends when its …
adrianmjim Nov 29, 2026
90eeaef
d3d12: a copy's pending ranges are searched, not walked
adrianmjim Nov 29, 2026
a4970cd
d3d12: what the title's CPU wrote into a card copy goes up straight o…
adrianmjim Nov 29, 2026
969b7e6
d3d12: freed physical pages are given out again, zeroed, and let go w…
adrianmjim Nov 29, 2026
7e32428
d3d12: a CPU buffer copy finds the card copies it writes by address
adrianmjim Nov 29, 2026
a224892
d3d12: the section commit-charge test measures in a process of its own
adrianmjim Nov 29, 2026
8b2c608
d3d12: small sections of physical pages are made committed only with …
adrianmjim Nov 29, 2026
a93532a
d3d12: renderer port 1 warns of LEONIDA_SECTION_MB only when it is set
adrianmjim Nov 29, 2026
26b8b55
d3d12: a value wait counts a flight's write to a copy in the card's m…
adrianmjim Nov 29, 2026
0835f8b
d3d12: a freed page still mapped keeps its bytes while a mapping call…
adrianmjim Nov 29, 2026
fe96d28
d3d12: the title-commit tests hold when another test reuses a freed a…
adrianmjim Nov 29, 2026
080abc2
d3d12: the title's VirtualFree holds no lock over the host's free
adrianmjim Nov 29, 2026
063f441
d3d12: a snapshot holds every declared part when its switch flips
adrianmjim Nov 29, 2026
b729220
d3d12: page numbers are tested round the space through the allocating…
adrianmjim Nov 29, 2026
53145b6
d3d12: the card-copy index test leaves no copies noted behind it
adrianmjim Nov 29, 2026
50fe8d1
d3d12: the runtime's reservations for the title are not logged as the…
adrianmjim Nov 29, 2026
7f18253
d3d12: a protection beside a window in place lets the window's heap go
adrianmjim Nov 29, 2026
bb44c86
d3d12: the log says heaps come from our allocator only when not watched
adrianmjim Nov 29, 2026
21d750d
d3d12: the straight-send device tests check what the design guarantee…
adrianmjim Nov 29, 2026
63e9d3d
d3d12: an allocation waits for the mapping calls only when freed page…
adrianmjim Nov 29, 2026
3aebaf4
d3d12: the docs say which freed physical pages the host takes back
adrianmjim Nov 29, 2026
0eded1c
d3d12: a write of ours at submission waits for straight sends in the …
adrianmjim Nov 29, 2026
0e41914
d3d12: the look for a straight send in the air before a write of ours…
adrianmjim Nov 29, 2026
71765e5
d3d12: slots over memory the title protects show it until the submiss…
adrianmjim Nov 29, 2026
a5052bf
d3d12: the frame line counts sends straight out of CPU sides and thei…
adrianmjim Nov 29, 2026
a7df17e
d3d12: execute the title gives memory in place is made at once
adrianmjim Nov 29, 2026
754ff7e
d3d12: the in-place line has no gap in the middle
adrianmjim Nov 29, 2026
5fae5e2
Merge unified/shadow-hot-paths into perf/unified-memory
adrianmjim Nov 29, 2026
7cc1e62
Merge unified/exact-waits into perf/unified-memory
adrianmjim Nov 29, 2026
6731f7f
Merge unified/card-one-copy into perf/unified-memory
adrianmjim Nov 29, 2026
9152079
Merge unified/inplace-blockers into perf/unified-memory
adrianmjim Nov 29, 2026
f846b65
Merge unified/page-pool-open into perf/unified-memory
adrianmjim Nov 29, 2026
480b32d
d3d12: leave the arena's refused reservation to D3D12-RT-FG-ARENA-VA-…
adrianmjim Nov 29, 2026
765f22b
Merge unified/physical-reuse into perf/unified-memory
adrianmjim Nov 29, 2026
e0d72ec
Merge unified/title-alloc-watch into perf/unified-memory
adrianmjim Nov 29, 2026
7831f86
d3d12: a resource release looks at one host-written entry, and a buff…
adrianmjim Nov 29, 2026
f4d27b2
d3d12: the sweep runs behind flights in the air, settling only for wh…
adrianmjim Nov 29, 2026
7527521
d3d12: diagnostics' per-range copy maps take a lock per thread set, n…
adrianmjim Nov 29, 2026
930f13f
d3d12: in place takes the place of a copy kept in the PC's memory alone
adrianmjim Nov 29, 2026
8e9d610
Merge origin/main into perf/unified-memory
adrianmjim Nov 29, 2026
e98eaa1
d3d12: the reason new guarded textures still start hot is written dow…
adrianmjim Nov 29, 2026
bbafe19
d3d12: freed pages of sections made at their first page are tested gi…
adrianmjim Nov 29, 2026
ade485b
d3d12: the log says whether the card's memory is open to the CPU (res…
adrianmjim Nov 29, 2026
2ed5141
d3d12: waits for landings look at the submission's steps without the …
adrianmjim Nov 29, 2026
26e0040
Merge unified/xmem-combined into perf/unified-memory
adrianmjim Nov 29, 2026
7169eac
d3d12: the line keeps what flights may write counted, one pass per fl…
adrianmjim Nov 29, 2026
8f094b8
d3d12: memory the runtime owns is not copied as title memory with in …
adrianmjim Nov 29, 2026
7475fa1
d3d12: landings merge flights' declared ranges by table, one look each
adrianmjim Nov 29, 2026
23e1e41
d3d12: title memory in a committed section of physical pages is read …
adrianmjim Nov 29, 2026
2732442
d3d12: what shaders wrote to card copies can land in the submission t…
adrianmjim Nov 29, 2026
4aeebcc
d3d12: small title buffers can have their card side in card memory th…
adrianmjim Nov 29, 2026
fc26f91
d3d12: a write-watched texture is detiled and copied only in the subr…
adrianmjim Nov 29, 2026
c34139c
d3d12: a write-watched texture can be detiled straight from title mem…
adrianmjim Nov 29, 2026
feae97d
d3d12: the placement benchmark's GPU upload lines are one line each
adrianmjim Nov 29, 2026
5fb6e08
d3d12: the line keeps what flights may write one way from its first f…
adrianmjim Nov 29, 2026
8066e5f
d3d12: a flight's ranges are joined before the line's lock only when …
adrianmjim Nov 29, 2026
6a531d0
d3d12: what keeps the sweep's settle is a pure function with a table …
adrianmjim Nov 29, 2026
6530f43
d3d12: the sweep's comments say it may run behind flights in the air
adrianmjim Nov 29, 2026
cc399ba
d3d12: a texture read-back is tiled into title memory straight out of…
adrianmjim Nov 29, 2026
8379f7e
d3d12: the line's test counters carry their docs inside thread_local!
adrianmjim Nov 29, 2026
e372460
d3d12: slots over a section placement let go of it when the title map…
adrianmjim Nov 29, 2026
439e70e
d3d12: memory by address finds a title buffer in place off a 64 KiB l…
adrianmjim Nov 29, 2026
02517c9
d3d12: the directory entries a writer sends up stay in the directory
adrianmjim Nov 29, 2026
8d39114
d3d12: the windows' order and a section placement racing a remap are …
adrianmjim Nov 29, 2026
a2149f5
d3d12: a landed fetch no longer sets off one fetch per landing for good
adrianmjim Nov 29, 2026
911ab21
d3d12: small copies go to card memory the CPU maps only once read oft…
adrianmjim Nov 29, 2026
33b9872
d3d12: a staging buffer marked to be copied with nothing detiled sinc…
adrianmjim Nov 29, 2026
4a5ef07
d3d12: the up-copy check leaves copies whose card side the CPU writes…
adrianmjim Nov 29, 2026
b560722
d3d12: a read-back buffer held by its landing goes to the pool when t…
adrianmjim Nov 29, 2026
abdf022
d3d12: a title free or protection takes no in-place lock while textur…
adrianmjim Nov 29, 2026
7382f20
d3d12: the BAR line does not say the software adapter has a resizable…
adrianmjim Nov 29, 2026
9f182ac
d3d12: the BAR line's device test passes where no PCI window is found
adrianmjim Nov 29, 2026
cd55512
Merge unified/hot-path-bookkeeping into perf/unified-memory
adrianmjim Nov 29, 2026
9ea4c0a
Merge unified/settle-and-line into perf/unified-memory
adrianmjim Nov 29, 2026
0ffc153
Merge unified/inplace-coverage into perf/unified-memory
adrianmjim Nov 29, 2026
b9c60bf
Merge unified/texture-detile-changed into perf/unified-memory
adrianmjim Nov 29, 2026
9c25817
Merge unified/rebar-paths into perf/unified-memory
adrianmjim Nov 29, 2026
ba34b0b
Merge unified/land-same-submission into perf/unified-memory
adrianmjim Nov 29, 2026
82722ab
d3d12: landing in the submission is LEONIDA_LAND_IN_SUBMISSION, apart…
adrianmjim Nov 29, 2026
ab0f52d
d3d12: leave the closed section's views record to D3D12-GPU-INPLACE-V…
adrianmjim Nov 29, 2026
27b6b65
d3d12: a commit into a release kept for a heap is refused, not taken …
adrianmjim Nov 29, 2026
645e337
d3d12: XMemVirtualQuery tells the protections and releases a heap def…
adrianmjim Nov 29, 2026
1bb36f8
d3d12: the card's compare hashes a piece once for every declared rang…
adrianmjim Nov 29, 2026
b6c5e0e
d3d12: a submission asks its lists' summaries made at close, not thei…
adrianmjim Nov 29, 2026
8d2c6d7
d3d12: submissions' sends are carved out of a ring of upload buffers
adrianmjim Nov 29, 2026
0f1245d
d3d12: the card's compare after a submission is timed on the card
adrianmjim Nov 29, 2026
468cc80
d3d12: a hold let go of is forgotten over the memory the host freed u…
adrianmjim Nov 29, 2026
19006b0
Merge unified/inplace-flake into perf/unified-memory
adrianmjim Nov 29, 2026
77ffb21
d3d12: title memory is opened in place by a thread of its own, not by…
adrianmjim Nov 29, 2026
2d48755
d3d12: the frame lines give the compare's pieces without stray spaces…
adrianmjim Nov 29, 2026
7a0b768
d3d12: a big title buffer's card copy can have title memory as its CP…
adrianmjim Nov 29, 2026
2652b76
d3d12: LEONIDA_LIST_FRONTS=check compares the kept fronts with the st…
adrianmjim Nov 29, 2026
b9b253a
d3d12: LEONIDA_CLOSE_SUMMARY=check compares both answers by one answe…
adrianmjim Nov 29, 2026
f378f9a
d3d12: a send past OUTSIZE in the air no longer sizes the send ring
adrianmjim Nov 29, 2026
126faf2
d3d12: the frame line counts only the send ring's open buffer as free
adrianmjim Nov 29, 2026
a2479dc
d3d12: memory given read-write back after a protection is opened in p…
adrianmjim Nov 29, 2026
76058f3
d3d12: a buffer copy of ours into title memory that was a copy's CPU …
adrianmjim Nov 29, 2026
c957e80
d3d12: title memory is a card copy's CPU side only while the title's …
adrianmjim Nov 29, 2026
70c65ba
d3d12: the opening of a card copy's title memory under the buffer tab…
adrianmjim Nov 29, 2026
96f2592
d3d12: a copy lists still hold takes the title memory in place at the…
adrianmjim Nov 29, 2026
1aa516c
d3d12: the wait of the title's frees and protections behind the opene…
adrianmjim Nov 29, 2026
6fbe43b
Merge unified/compare-cost into perf/unified-memory
adrianmjim Nov 29, 2026
dad5e0c
Merge unified/steps-at-close into perf/unified-memory
adrianmjim Nov 29, 2026
8aed4d2
Merge unified/send-ring into perf/unified-memory
adrianmjim Nov 29, 2026
2b2fd72
Merge unified/card-from-title into perf/unified-memory
adrianmjim Nov 29, 2026
c2edd26
Merge unified/inplace-async-open into perf/unified-memory
adrianmjim Nov 29, 2026
84476d9
d3d12: tests release title memory through the runtime's path and forg…
adrianmjim Nov 29, 2026
125de5d
d3d12: the send tests' title memory is released once through the runt…
adrianmjim Nov 29, 2026
b8f1957
d3d12: the opener tests release their memory through the runtime's pa…
adrianmjim Nov 29, 2026
8230835
Merge unified/suite-stable into perf/unified-memory
adrianmjim Nov 29, 2026
7cc8e18
d3d12: a second release of title memory kept for a heap is refused as…
adrianmjim Nov 29, 2026
7c9d254
d3d12: an allocation looks only at the freed runs it gives, longest f…
adrianmjim Nov 29, 2026
3499cf0
d3d12: the title's own VirtualAlloc, VirtualAllocEx and VirtualProtec…
adrianmjim Nov 29, 2026
2ed692a
d3d12: sampler entries of the view table go round the clock with thos…
adrianmjim Nov 29, 2026
9aaa894
d3d12: a card window of title memory can have the title memory as its…
adrianmjim Nov 29, 2026
0f01fb7
d3d12: XMemVirtualQuery tells a decommit kept under a heap as reserve…
adrianmjim Nov 29, 2026
763938a
d3d12: the reuse notes say an allocation still looks at every waiting…
adrianmjim Nov 29, 2026
ba7ec95
d3d12: the title's query of a decommit kept under a heap stays in its…
adrianmjim Nov 29, 2026
17e9781
d3d12: the title-alloc test takes its addresses back in one step, and…
adrianmjim Nov 29, 2026
efe8cd0
Merge unified/spare-sampler-bounds into perf/unified-memory
adrianmjim Nov 29, 2026
0caf013
Merge unified/card-from-title-windows into perf/unified-memory
adrianmjim Nov 29, 2026
4e75e37
Merge unified/inplace-title-alloc into perf/unified-memory
adrianmjim Nov 29, 2026
6737559
d3d12: the docs of card windows from title memory say a window is ope…
adrianmjim Nov 29, 2026
2dd2ddd
d3d12: findings say what the memory switches do in the running title …
adrianmjim Nov 29, 2026
3c59c50
d3d12: the card copies of placed textures go within seconds once the …
adrianmjim Nov 29, 2026
8ba66a4
d3d12: the refreshes that copy nothing are told so on the submitting …
adrianmjim Nov 29, 2026
ca6f10d
Merge origin/main into perf/unified-memory
adrianmjim Nov 29, 2026
59ff5cc
d3d12: the title's release of a whole allocation walks its regions once
adrianmjim Nov 29, 2026
548f1cf
d3d12: the pass ahead of a frame can look at the heap's written slots…
adrianmjim Nov 29, 2026
f336376
d3d12: a placed texture whose memory is still going when the sweep lo…
adrianmjim Nov 29, 2026
ffbc751
d3d12: a refresh whose end pages were written only beside its range i…
adrianmjim Nov 29, 2026
2bb32af
d3d12: a look ahead of the heap pass that panics gives the pass back …
adrianmjim Nov 29, 2026
f58d748
d3d12: the heap pass looks again at slots that showed nothing at the …
adrianmjim Nov 29, 2026
cf3959c
d3d12: the heap pre-look's docs say it needs the list ahead on its ow…
adrianmjim Nov 29, 2026
36db7b5
d3d12: the looks made first ask the clock after every look of a wide …
adrianmjim Nov 29, 2026
1ff3e32
d3d12: the docs of the looks by parts say that view memory's partial …
adrianmjim Nov 29, 2026
7db6d5c
Merge unified/placed-unmapped-release into perf/unified-memory
adrianmjim Nov 29, 2026
807c36e
Merge unified/heap-records-wait into perf/unified-memory
adrianmjim Nov 29, 2026
4f0ca14
Merge unified/refresh-nothing-fast into perf/unified-memory
adrianmjim Nov 29, 2026
34fba5b
d3d12: a submission's write-watch askings are one per write-watched a…
adrianmjim Nov 29, 2026
ee88a71
d3d12: the write-watch gap's comment says what an asking costs on thi…
adrianmjim Nov 29, 2026
6f49506
d3d12: a refresh's look at view memory it knows for such is no refuse…
adrianmjim Nov 29, 2026
bdf3768
d3d12: guarded view blocks across several views change protection a v…
adrianmjim Nov 29, 2026
c16a02f
d3d12: renderer port 6's frame line stays quiet with the port off
adrianmjim Nov 29, 2026
69a2fb3
d3d12: a submission's plan looks up each allocation once, those it ca…
adrianmjim Nov 29, 2026
8f5f02d
Merge unified/write-watch-ask into perf/unified-memory
adrianmjim Nov 29, 2026
208eaf7
d3d12: host.rs's tests and five groups live in host/
adrianmjim Nov 29, 2026
d7299da
d3d12: a bake draw with nothing to do no longer waits for the bake lock
adrianmjim Nov 30, 2026
4daa1f5
d3d12: the staging table's lock is held only to look up, put in or ta…
adrianmjim Nov 30, 2026
6d6b031
d3d12: an indirect execution's host signature is found without a lock
adrianmjim Nov 30, 2026
a65b4f9
d3d12: recording threads no longer wait for a heap's texture queue to…
adrianmjim Nov 30, 2026
f55aa00
d3d12: a bake draw does not pass the bake lock while another is at wo…
adrianmjim Nov 30, 2026
cb49887
d3d12: a marks reader that reads across an inbox take-out never says …
adrianmjim Nov 30, 2026
3313ac4
d3d12: a refused packed signature keeps its root signature
adrianmjim Nov 30, 2026
bd63d9f
d3d12: a texture's release waits for a staging state being made of it
adrianmjim Nov 30, 2026
91072a6
Merge unified/staging-lock-short
adrianmjim Nov 30, 2026
9b48bed
Merge unified/bake-lock-quick
adrianmjim Nov 30, 2026
c6b8b53
Merge unified/textures-queue-tabled-quick
adrianmjim Nov 30, 2026
032eedb
Merge unified/indirect-sig-lockfree
adrianmjim Nov 30, 2026
8164b31
d3d12: findings: the recording threads' locks measured in the running…
adrianmjim Nov 30, 2026
87d528f
leonida-shader: propagate LOADS across dominating write-free blocks (…
bobcatchris Nov 30, 2026
bb68c6e
leonida-shader: gate LOADS key() on Reads|Lanes and make diamond test…
bobcatchris Nov 30, 2026
903e373
leonida-shader: skip wave_base entry ticket barrier and LDS atomic fo…
bobcatchris Nov 30, 2026
656b2fd
d3d12: walks of another thread's stack stop where the unwinder would …
adrianmjim Nov 30, 2026
2d4c466
d3d12: the unwind check reads epilogues as the system unwinder does
adrianmjim Nov 30, 2026
8797592
d3d12: walks of another thread unwind with RtlVirtualUnwind2 inside i…
adrianmjim Nov 30, 2026
b4a6be0
d3d12: stack walks check a jump's target and keep image regions betwe…
adrianmjim Nov 30, 2026
8a8d3c8
Merge unified/sampler-unwind-fault
adrianmjim Nov 30, 2026
dab3714
d3d12: a present with submissions waiting behind it is not held for p…
adrianmjim Nov 30, 2026
8ca95f6
d3d12: the relay thread runs above normal, as the threads it waits for
adrianmjim Nov 30, 2026
ff4df02
d3d12: host lists take preludes made ahead on a thread of their own
adrianmjim Nov 30, 2026
2a495c6
d3d12: a priority's test shows a change of its switch back on reaches…
adrianmjim Nov 30, 2026
db310d8
d3d12: whether work waits behind a present is one named, tested count
adrianmjim Nov 30, 2026
ef8aad4
d3d12: the memory line counts prelude spares; the made-ahead test say…
adrianmjim Nov 30, 2026
1c1bd9e
d3d12: stale parts of the heap pass's spans are made again in one wal…
adrianmjim Nov 30, 2026
e2cf9b4
d3d12: the heap pass's line says how many slots show something, and w…
adrianmjim Nov 30, 2026
41a0129
Merge unified/heap-spans-one-walk
adrianmjim Nov 30, 2026
c4207cb
Merge unified/relay-priority
adrianmjim Nov 30, 2026
5a4e375
Merge unified/prelude-pool
adrianmjim Nov 30, 2026
1f55faf
Merge unified/smooth-yield-to-queued
adrianmjim Nov 30, 2026
3133ca4
d3d12: the relay's raised priority and presents not held for the line…
adrianmjim Nov 30, 2026
c0ffbe5
d3d12: findings: what the title's busiest thread waits for, and four …
adrianmjim Nov 30, 2026
74265c9
d3d12: our lists over copies in the card's memory are timed on the card
adrianmjim Nov 30, 2026
185a841
d3d12: a submission's compare can go in the call of its last lists (L…
adrianmjim Nov 30, 2026
de66085
fix(d3d12): guard biased raw twins against sub-dword offsets and 32-b…
zmasi Nov 30, 2026
52b38a6
d3d12: the own-times test counts at least one hash pass, as other tes…
adrianmjim Nov 30, 2026
397f1df
d3d12: batched clamp passes read their job tables from the card's memory
adrianmjim Nov 30, 2026
fe7c76d
Merge remote-tracking branch 'origin/main' into fix/d3d12-twin-bias-r…
zmasi Nov 30, 2026
fcff3c3
d3d12: the compare-join tests say whether the debug layer was there t…
adrianmjim Nov 30, 2026
7c94856
d3d12: the tests of batch tables in card memory check the pooled tabl…
adrianmjim Nov 30, 2026
80d08ca
Merge branch 'unified/batch-tables-in-card-memory' into perf/unified-…
adrianmjim Nov 30, 2026
856d757
Merge branch 'unified/time-our-card-lists' into perf/unified-memory
adrianmjim Nov 30, 2026
66fe99f
Merge branch 'unified/compare-in-last-ecl' into perf/unified-memory
adrianmjim Nov 30, 2026
151e11d
d3d12: our card lists are timed only with LEONIDA_CARD_OWN_TIMES=1
adrianmjim Nov 30, 2026
abd996d
d3d12: findings: the runtime's own work on the card, measured there, …
adrianmjim Nov 30, 2026
a62145d
d3d12: the look-ahead pass test takes its table slots in its own frame
adrianmjim Nov 30, 2026
3e82a26
Merge branch 'unified/look-ahead-test-stable' into perf/unified-memory
adrianmjim Nov 30, 2026
b6f3b77
d3d12: LEONIDA_LAND_IN_SUBMISSION is decided once per plan and LEONID…
adrianmjim Nov 30, 2026
af8ea87
d3d12: the in-place probe asks the card whether tiles map onto opened…
adrianmjim Nov 30, 2026
3567086
d3d12: the tiles probe is asked for, and the title's device is shown …
adrianmjim Nov 30, 2026
814afec
Merge branch 'unified/land-in-submission-per-plan' into perf/unified-…
adrianmjim Nov 30, 2026
b959a92
Merge branch 'unified/tiled-window-probe' into perf/unified-memory
adrianmjim Nov 30, 2026
8c8ab17
Merge pull request #2684 from bobcatchris/feat/d3d12-shader-opt-cross…
MoonEyes Nov 30, 2026
4da7792
Merge pull request #2685 from bobcatchris/feat/d3d12-shader-1d-wave-b…
MoonEyes Nov 30, 2026
8f41d7d
Merge pull request #2757 from zmasi/fix/d3d12-twin-bias-rdna3
MoonEyes Nov 30, 2026
27acee9
d3d12: findings: the paths that read title memory where it is, run in…
adrianmjim Nov 30, 2026
b0ee9c7
Merge remote-tracking branch 'origin/main' into perf/unified-memory
adrianmjim Nov 30, 2026
28f54a7
d3d12: evict_placed's recheck of the stamp is covered and its doc say…
adrianmjim Nov 30, 2026
6c7c795
Merge branch 'unified/evict-placed-recheck' into perf/unified-memory
adrianmjim Nov 30, 2026
56c7261
d3d12: what wrote a copy the up-copy check flags is told by submissio…
adrianmjim Nov 30, 2026
7c35799
d3d12: the undeclared trace names every declaration and the words a s…
adrianmjim Nov 30, 2026
456627e
Merge branch 'unified/undeclared-writer-trace' into perf/unified-memory
adrianmjim Nov 30, 2026
cb31c27
d3d12: the undeclared trace watches asked addresses, and what undoes …
adrianmjim Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion d3d12/apps/leonida/src/warm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ pub fn run(jobs: Option<usize>, limit: Option<usize>, again: bool, used: bool, t
let bad = std::fs::read_to_string(&bad_file).unwrap_or_default();
let bad: HashSet<&str> = bad.lines().filter_map(|l| l.split(' ').next()).collect();
let early = std::fs::read_to_string(dir.join("early-pipelines.txt")).unwrap_or_default();
let early: HashSet<&str> = early.lines().collect();
// A key, then the run that last drew with it (a list of an older build
// has the key alone).
let early: HashSet<&str> = early.lines().filter_map(|l| l.split(' ').next()).collect();
// Those earlier runs drew with first, the others in no order (by key).
let mut all: Vec<usize> = (0..keys.len())
.filter(|&n| {
Expand Down
2 changes: 1 addition & 1 deletion d3d12/crates/leonida-gpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mimalloc = ["dep:mimalloc"]
workspace = true

[target.'cfg(windows)'.dependencies]
windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Cryptography", "Win32_Security_WinTrust", "Win32_System_Diagnostics_Debug", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Kernel", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Performance", "Win32_System_ProcessStatus", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_Threading", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_WindowsAndMessaging"] }
windows-sys = { workspace = true, features = ["Win32_Devices_DeviceAndDriverInstallation", "Win32_Foundation", "Win32_Security", "Win32_Security_Cryptography", "Win32_Security_WinTrust", "Win32_System_Diagnostics_Debug", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Kernel", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Performance", "Win32_System_ProcessStatus", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_Threading", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_WindowsAndMessaging"] }
windows = { workspace = true, features = [
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D_Fxc",
Expand Down
221 changes: 187 additions & 34 deletions d3d12/crates/leonida-gpu/src/copystat.rs

Large diffs are not rendered by default.

119 changes: 115 additions & 4 deletions d3d12/crates/leonida-gpu/src/cores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,58 @@ fn helpers_raised() -> bool {
crate::toggled!("LEONIDA_HELPER_PRIORITY")
}

/// A helper's priority ([`helpers_raised`]). [`Self::keep`] is called before
/// each piece of work; it asks the system only when the switch has changed.
/// Whether the thread that lands flights (`leonida-relay`, `host::relay_worker`)
/// runs above normal, as the threads it waits for do (`LEONIDA_RELAY_PRIORITY=1`;
/// off unless set and not `0`; `LEONIDA_AB` can flip it while the title runs). That thread
/// sets every title fence (`fence::set`) once a flight's bytes are in title
/// memory, and the title's busiest thread spins on such a fence's value
/// (`monitorx`/`mwaitx`, then `Sleep`, on the address `fence::gpu_address`
/// gave it: 72 % of its samples in a 30-second profile in the world), so the
/// time from the card's end of a flight to the fence set is the frame's.
/// It was only kept on the fast cores, which asks nothing of a processor with
/// one kind of cores (this PC's 7600X), and ran at normal among some twenty
/// busy title threads on twelve logical processors.
///
/// Measured before (two timelines of five frames in the world, 171 of 172
/// fences set by it; the profile): gaps inside its landings with no wait and
/// no wake in them, 3.8 ms after its copy queue's wait returned, 5.2 ms before
/// a fetch, 2.9 ms right before a fence set; per frame the tails above the
/// medians (0.04-0.06 ms) of its gathers, its fetches' sends and its wake to
/// its first landing came to 3.3 and 0.8 ms; of its 975 samples in 30 s, 894
/// were waits (663 for the card, 175 for a flight), so the tails are its turn
/// to run, not its work. Above normal only, not higher: the pools of `land`
/// it hands pieces to run above normal themselves ([`helpers_raised`]), and
/// a relay above them could keep them from the cores its merge waits on.
/// Nothing it does, nor its order, changes: every merge, read-back and
/// write behind a flight still comes before the fence is set.
///
/// Off by default: in the title (2026-11-30, RX 7900 XT, one `LEONIDA_AB` run
/// of 67 phases of 7 s in the world, four switches crossed) raising it made
/// the median frame 1.6 % slower (s.e. 1.9 %), the submitting thread's work
/// 1.4 % (s.e. 1.2 %) and the card's idle time 6.4 % longer (s.e. 6.2 %):
/// nothing gained, and every reading on the side of a loss.
pub(crate) fn relay_raised() -> bool {
crate::asked!("LEONIDA_RELAY_PRIORITY")
}

/// A thread's priority, above normal while the switch it follows says so
/// ([`helpers_raised`] for the helpers, [`relay_raised`] for the relay).
/// [`Self::keep`] is called before each piece of work; it asks the system
/// only when the switch has changed.
pub(crate) struct Priority {
applied: Option<bool>,
raised: fn() -> bool,
}

impl Priority {
/// A helper's ([`helpers_raised`]).
pub(crate) fn new() -> Self {
let mut priority = Self { applied: None };
Self::following(helpers_raised)
}

/// One that follows `raised`, asked for now.
pub(crate) fn following(raised: fn() -> bool) -> Self {
let mut priority = Self { applied: None, raised };
priority.keep();
priority
}
Expand All @@ -135,7 +178,7 @@ impl Priority {
use windows_sys::Win32::System::Threading::{
GetCurrentThread, SetThreadPriority, THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_NORMAL,
};
let on = helpers_raised();
let on = (self.raised)();
if self.applied == Some(on) {
return;
}
Expand Down Expand Up @@ -171,4 +214,72 @@ mod tests {
.join()
.unwrap();
}

fn own_priority() -> i32 {
use windows_sys::Win32::System::Threading::{GetCurrentThread, GetThreadPriority};
// SAFETY: our own thread.
unsafe { GetThreadPriority(GetCurrentThread()) }
}

/// A priority that follows a switch is above normal while it is on and
/// normal while it is off, and is asked of the system again only when the
/// switch changes.
#[test]
fn a_priority_follows_its_switch() {
use std::sync::atomic::{AtomicBool, Ordering};
use windows_sys::Win32::System::Threading::{THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_NORMAL};
std::thread::spawn(|| {
let _raised = Priority::following(|| true);
assert_eq!(own_priority(), THREAD_PRIORITY_ABOVE_NORMAL);
})
.join()
.unwrap();
std::thread::spawn(|| {
let _normal = Priority::following(|| false);
assert_eq!(own_priority(), THREAD_PRIORITY_NORMAL);
})
.join()
.unwrap();
static ON: AtomicBool = AtomicBool::new(true);
std::thread::spawn(|| {
let mut priority = Priority::following(|| ON.load(Ordering::Relaxed));
assert_eq!((priority.applied, own_priority()), (Some(true), THREAD_PRIORITY_ABOVE_NORMAL));
ON.store(false, Ordering::Relaxed);
priority.keep();
assert_eq!((priority.applied, own_priority()), (Some(false), THREAD_PRIORITY_NORMAL));
// Unchanged: not asked again, so a priority set meanwhile stays.
// SAFETY: our own thread.
unsafe {
use windows_sys::Win32::System::Threading::{GetCurrentThread, SetThreadPriority};
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
}
priority.keep();
assert_eq!((priority.applied, own_priority()), (Some(false), THREAD_PRIORITY_ABOVE_NORMAL));
// Changed back on, from normal: the system is asked again.
// SAFETY: our own thread.
unsafe {
use windows_sys::Win32::System::Threading::{GetCurrentThread, SetThreadPriority};
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
}
ON.store(true, Ordering::Relaxed);
priority.keep();
assert_eq!((priority.applied, own_priority()), (Some(true), THREAD_PRIORITY_ABOVE_NORMAL));
})
.join()
.unwrap();
}

/// The thread that lands flights starts at the priority its switch asks
/// for: above normal when [`relay_raised`] (off by default), else normal.
#[test]
fn the_relay_starts_at_the_priority_its_switch_asks() {
use windows_sys::Win32::System::Threading::{THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_NORMAL};
std::thread::spawn(|| {
let _priority = crate::host::relay_thread_setup();
let want = if relay_raised() { THREAD_PRIORITY_ABOVE_NORMAL } else { THREAD_PRIORITY_NORMAL };
assert_eq!(own_priority(), want);
})
.join()
.unwrap();
}
}
Loading