38cc6ae244af2bb2e8bb4ceede5bf9cc7dbede3b
5668
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
38cc6ae244 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
ec6f1a1109 |
RUNTIME 2313: DeviceRecovered's announced cost states the pooled ICB records RUNTIME 2311 loses; device-leg tests count lazy shadows and size depth heaps by the query
Three fixes from the device legs at |
||
|
|
05d5da5ba6 |
Re-bless the authored compile census at pin 93
The census at
|
||
|
|
b89241fafa |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
22fa0997b1 |
RUNTIME 2312: A write-only argument-buffer use of a texture whose writes Metal drops names none of its image
What. A command that makes a texture resident whose writes Metal drops (metal::format::writes_dropped: the 4:2:2 formats, the subsampled and packed two-plane YCbCr ones) names no use of it where its binding plan's heap holds it at no element (no WriteSource::HeapEntry of its token): every heap storage array holds such a texture as its neutral (bind::heap's Fit::Dropped), and a kernel that only writes it declares no sampled array, so its function reaches none of the texture's image (binding.rs, resident_uses_into; the storage-only test holds_write_shadow becomes heap_holds, by class access or any). Why. A kernel that only wrote a YCBCR8_420_2P texture through an argument buffer (useResource WRITE) named the texture's image as a written use. That use matched the texture's converted shadow, so the command's shadow planning made and recorded the planes' conversion (ShadowCopies::prepare -> YCbCrConversion::make), and on a device that converts 4:2:0 itself (Iris Xe: the consumer's pin 92 Iris leg, writes_through_argument_buffers_of_two_plane_ ycbcr_textures_are_the_slots) that first conversion announced ycbcr-filter-not-exact though nothing read the texture: relayed in default mode, fatal in strict mode. The write itself was dropped, as Metal drops it. 4:4:4 textures already named only their write shadow. Now such a command converts nothing and announces nothing; a command whose function reads the texture through the argument buffer (a sampled array holds it) converts it and announces the device's conversion as before. Test: runtime_lane::ycbcr_argument_writes::a_kernel_that_only_writes_a_held_ 420_texture_converts_none_of_its_planes (lavapipe and GPU lanes): resident WRITE and READ|WRITE, the write-only kernel records no conversion (ycbcr_refreshes + ycbcr_whole_conversions), announces no ycbcr-filter-not-exact and leaves the planes' bytes; a kernel reading it through the argument buffer records one conversion and announces the notice where the device converted the texture itself. lavapipe converts 4:2:0 through Metal's arithmetic, so there the conversion count is the check that fails without the fix. docs/API.md's catalogue entry and ycbcr.rs's writes bullet say so. Verified (lane ycbcrnote, at 12dbbcc67e on |
||
|
|
4aacef045b |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
dfda37628d |
RUNTIME 2311: ICB records lie in pooled memory where a held pointer import taxes every submission
What: DevicePolicy gains indirect_records (IndirectRecordsPolicy, a runtime
choice no profile carries). Under the default, Untaxed, an indirect command
buffer's records and overflow slots take fresh pages of the runtime's own
(a pointer import held for the buffer's life) only where the device's import
tax check has not found that a held pointer import costs every submission, or
has not answered; where it has (RADV, ANV on i915), they lie in pooled
host-visible memory as the runtime's other buffers do. Under Carried, which
exact_answers() selects, they lie in fresh pages wherever the device imports
host pointers, as before, so a recovery keeps them. A recovery of a taxed
device under the default loses pooled records and rewrites them as a new
buffer's (carry.rs's existing pooled path); the device-recovered notice
already counts such buffers ("N indirect command buffers, M of them whose
records were lost"), as on a device without pointer imports and for
device-local records on discrete GPUs. No new Degradation kind.
Why: on a Radeon 780M (RADV, Mesa 26.2.6, Linux 7.3.3) beside a guest game
whose ICB records were the process's only pointer imports (3 buffers, 19.6 MB),
the submission thread had 5 windows of 65-140 ms in 12 s in which every
amdgpu_cs_ioctl waited in mmu_interval_read_begin or returned EAGAIN (373 of
the run's 382 failed calls, retried at once by libdrm). RADV lists every
imported memory in every CS, amdgpu re-faults every userptr page each CS and
adds the CS fence to every listed BO, so a page migration of one of those
pages (kcompactd, khugepaged, and the runtime's own block making in direct
compaction) waits in amdgpu_hmm_invalidate_gfx for all the process's GPU work
in flight while every submission waits behind it. With no userptr BO listed,
compaction migrates pages without waiting on any fence.
Docs: the FAST-PATHS ledger row (default, switch, the recovery cost, the
measured chain), API.md's device-recovered text, HOWTO's residency section,
fresh_pages.rs, indirect_command_buffer.rs and carry.rs, the conformance
crate's Policy::Exact list. API: signatures blessed, api_surface row,
REFUSALS.md regenerated.
Tests: tests::icb_records_policy (Linux, cpu_icd/gpu): the import tax forced
Holds/Fails; under Untaxed+Holds the records lie in pooled memory, no fresh
pages made, a recovery moves them and its notice counts 1 lost; under
Untaxed+Fails and Carried+Holds in the runtime's own pages, kept, 0 lost. The
translator's fast_paths names the choice, checks it keys no profile and that
exact_answers() takes Carried. icb_carry_race's own-pages cases run on a
Carried device (device_recovery::carried_device), so they assert the carry of
own pages whatever the device's verdict.
RUNTIME_VERSION moves: where records lie and what a recovery keeps change on taxed devices.
New public items: metal2vulkan::device::IndirectRecordsPolicy { Untaxed, Carried } and
DevicePolicy::indirect_records.
Verified, msi m3-max-30127 at cba1ec585a (the fix plus a test-only fix: DevicePolicy is
non-exhaustive, so the tests set the field on a copy):
- clippy -D warnings --all-targets --all-features: metal2vulkan + runtime plain 0, runtime
--cfg m2v_cpu_icd 0;
- translator tests 49/49 (fast_paths with the new choice, its no-profile key and exact_answers
tests, api_surface, api_signatures);
- runtime under cpu_icd on llvmpipe 34/34: icb_records_policy, icb_carry_race, icb_records_home,
indirect_command_buffer*, device_recovery_every_kind, device_recovery_carry.
ICB-RECORDS lines:
- Untaxed with the tax forced Holds: records not in own pages, 0 fresh-page buffers, the
carry moved them, notice "1 of them whose records were lost";
- Untaxed with the tax forced Fails: own pages, 2 fresh-page buffers, kept;
- Carried with the tax forced Holds: own pages, 2, kept.
Workload proof owed: reims's traced loaded-desktop walk on the 780M (per-CS get_user_pages 0, no
-EAGAIN windows).
|
||
|
|
483b4650d1 |
fixed_index_draws example: a frame of indexed draws whose indices a dispatch before each draw writes
What a GL-on-Metal layer's frames cost the GPU where a compute dispatch before each draw fixes up that draw's index buffer (each dispatch writing a Private buffer of its own, in serial compute encoders of 256 dispatches, then render passes of 26 indexed draws, 4 passes a command buffer), beside the same frame with the indices written once before (prefixed) and the compute encoders alone (dispatches). The defaults follow a GL benchmark's per-second counts on the runtime (about 470 compute encoders of 256 dispatches, 4,650 passes of 26 draws, 1,270 command buffers). The kernel and the draw's functions are a new owned MSL fixture, fixtures/public/examples/fixed_indices.metal, compiled by regen-air-fixtures --dir examples. Release measurement on an RTX 5080 Laptop GPU (b5080 entry glfix-framesplit-124152; GPU busy per frame, union of command-buffer spans, median of 60 frames; a frame of 1280 draws): - fixed: 0.526 ms; - prefixed: 0.404 ms; - compute encoders alone: 0.116 ms (0.09 us a dispatch). fixed minus prefixed equals the dispatches' own time, so the compute-to-render transitions and the extra command buffers cost about 0.006 ms a frame. No runtime source changes; the runtime pin moves alone. Verified: msi m3-max-30123 at 195f2073fd: - runtime crate clippy -D warnings --all-targets --all-features, plain and --cfg m2v_cpu_icd: 0; - release build: 0; - a lavapipe run of all three shapes: the index check passed after each. |
||
|
|
fe38b678dc |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
ce54ad8b25 |
RUNTIME 2310: an unshared commit on its way goes before another queue's batch whose room came after it
A scheduler pass that found another queue's batch's room let it go while an unshared queue's commit there, taken in, waited only for the runtime: its host step (handed to the steps' thread in the same pass), its submission checks, or a shared event's value whose signal was already submitted and had not landed. Order::next refused the unshared head and sent the other batch; the unshared command buffer then waited for that whole batch on the GPU. In reims's traced walk ld91 (um870 Radeon 780M, guest compositor beside gameload) another queue's batch went in while a compositor's command buffer so waited ahead of 33 of the 46 frames answered more than a refresh late: 20 at its host step (e.g. take 1794684425.009: gameload #19392 committed -3.0, submitted +2.6, inside WS #19398's commit +2.3 -> submit +2.8), 13 waiting for the landing of its other unshared queue's signal. The rule (unshared_hold.rs, "Commits on their way"): each unshared commit carries its place among those posted on its VkQueue (SlotShare::posted_unshared now answers it). Each look collects the unshared heads on their way (on_its_way: binary semaphores ready, every event value reached or reached by a submitted signal, held only for its host step with no pipeline making pending, or for its checks) that wait behind no earlier commit (is_behind), and a batch whose room came is held (behind_commits) while one posted before its noted count leads its line so. The step's end, the checks or the landing wake the scheduler's thread, whose next pass sends the unshared one first. Each look asks again: a head waiting for anything else (a value nothing submitted reaches, a binary semaphore, a making, a decode, a rebind) or behind an earlier commit (the held batch's own included) holds nothing, so neither waits for the other. Other threads' passes leave such batches to the scheduler's thread (first_for_the_thread widened to heads on their way), which they wake. Counted in the existing WorkCounts::heads_held_for_unshared_commits (doc widened). No switch, no public item, no Degradation kind. Docs: unshared_hold.rs, FAST-PATHS unshared-isolation row, API.md. Tests: unshared_hold unit test of behind_commits with places on their way; queue_share_device (lavapipe), each leg by the scheduler's pass and a committing thread's: an_unshared_head_at_its_host_step_goes_before_work_whose_room_came_after_its_commit, an_unshared_head_waiting_for_a_signal_to_land_goes_before_work_whose_room_came_after, an_unshared_head_behind_an_earlier_commit_of_the_held_queue_holds_nothing, an_unshared_head_waiting_for_a_value_nothing_submitted_reaches_holds_nothing. RUNTIME_VERSION moves: what a run submits, and in what order, changes. Verified (msi lavapipe): - m3-max-30046 at 71c8bf7337 (the rule plus a test-only fix), runtime crate, --all-features --all-targets -D warnings: - clippy plain and --cfg m2v_cpu_icd: 0; - 103/103 tests: unshared_hold, queue_share, queue_share_device, scheduler, scheduler_held_wakes, scheduler_wakes, inbox, waiter_submits, commit_and_submit, hold_sites, dispatch_pending, queue_limits_device, stall. - New tests, each run once through the scheduler's pass and once through a committing thread's: - at its host step: the other buffer began 0.168 / 0.199 ms after the unshared one; - waiting for a signal to land: 0.183 / 0.206 ms after; - behind an earlier commit: holds nothing; - waiting for an unreached value: holds nothing. The RV2303 tests still pass. - Negative controls: - m3-max-30021, rule off: both "goes before" tests fail (the other buffer began 1.519 ms before the unshared one); - m3-max-30036, the two no-hold exclusions removed: both no-hold tests time out at 20 s. - Test-only fix in this change: RV2303's committing-thread test held its scheduler thread with an application batch that now correctly waits behind the stepping unshared dispatch. Its holder is now a command buffer on another unshared queue, which nothing holds back. |
||
|
|
bfb51bc5c2 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
e453efbf0a |
RUNTIME 2309: a texture whose rows are in place makes its shadow at the first reach of its image
A device-gap texture over a buffer (its image refused for a reason that leaves its rows in place: format, pitch, placement, source, dma-buf) was a shadow made at new_texture: its VkImage, memory and views, its notice and shadow-log line, and its slot in the texture table and every heap set. A slot whose function only reads, writes or asks its size binds the rows in place, so a texture only ever bound that way paid for a shadow no command used (reims's gbs91 on the 780M: hundreds of such textures, 8 to 52 MB each). Now such a texture (rows in place, no pending in-place verdict, not over a heap's buffer) is made with its shadow left unmade (texture/lazy_shadow.rs): the storage accessor makes it at the first reach, once, under a lock, with the making's notice, log line and counts, then places its slot (its resource ID reads the neutral until then). Paths that must not make it read the recipe instead (rows binding, placement and heap-set writes, CPU copies, blits on the bytes, shape and plan questions, logging). The reaches that make it: a slot that binds the image (before the command's copies are planned from its uses), use_resource, a pass's attachment, an execution of commands inheriting the bindings, a view, its VkImage handed out. An out-of-memory making fails the reaching call, as new_texture did. WorkCounts::shadows_left_unmade and shadows_made_at_use count both halves; docs/API.md says when the shadowed-texture notice is given. Not in scope: two kinds still make their shadow at new_texture. A texture waiting on its pages' in-place verdict may move in place. A texture over a heap's buffer is made resident by use_heap through a path that checks the shadow. RUNTIME_VERSION moves because the run's announcements change. The shadowed-texture notice and the shadow-log line come at the making, and a texture only ever bound through its rows gives neither. A resource-ID read of an unmade texture gets the neutral. No new Degradation kind. No FAST-PATHS row: the copy work follows uses, not the shadow's existence (an unbound shadow was copied 0 times per commit before and after), so no accuracy is traded. The saving is the making: the VkImage, its memory, views and heap-set slots. Test: tests::texel_rows_device::a_shadow_is_made_at_the_first_reach_of_its_image, on a copied buffer, since over the pages lavapipe lays the rows in place. Three cases: - a written-only texture: shadows_left_unmade +1, none made, shadowed_textures 0, shadow_copies 0, texels inverted in the pages; - a rows write then a sample in one command buffer: made at the sample, copies > 0, pixels equal to a device-own texture's; - use_resource: made at the call. joined_residency's helper asserts shadows_bytes() where it asserted the shadow at new_texture. Verified, msi m3-max-30024 at 088a73d3b7: - clippy -D warnings, runtime crate, all targets and features: plain and --cfg m2v_cpu_icd exit 0; - lavapipe 206/206: texel_rows, shadow*, read_twin*, joined_residency, padding/kept_padding, exported_*, first_host_texture, surface_shapes, attached_read*, copied_device, fresh_pages, texture::*; - translator api_signatures, api_surface and fast_paths: 47/47; - the negative control in the same job (lazy = false): the test fails at "Copy: left unmade", (0,0,1) against (1,0,0). |
||
|
|
9972bec765 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
160837e4e0 |
Rebound draws gather shadow uses that differ from the kept draw's instead of stopping
A draw rebound that was not carried in went on only where its uses of shadowed
textures (ShadowUse::used_as: the shadow, writes, area, own-pixel read bounds)
equalled its kept draw's, since it gathered nothing into its instance. Another
shadow at a changed slot, or own-pixel bounds that follow a restated scissor,
stopped it, and the draw took every step. That is the largest rebind stop in the
780M desktop walk (draws_rebind_stopped_arguments_shadows 62,642 of 98,870
stops; Launchpad 24.1k, Mission Control 26.6k).
Now such a draw gathers its own shadow uses into its instance as every step
does (shadow::join, through InstanceShadows::add, or InstanceShadows::join for
a narrowed draw), as a carried draw already did, and keeps them as the uses the
next draw rebound compares with. It still stops where it uses some and its kept
draw used none, or the other way: Kept::again follows that. A new check stops a
draw that reads a color's copy after a barrier inside its instance (counted
_checks): every step splits there or weighs the spare, and only the shadow stop
kept such draws out before. The debug rebound check compares a ninth part, the
draw's shadow uses against its every step's.
kept_shadowed_draws: the kept frame's commands recorded (every kind) and copies
equal the every-step frame's; its second-target and scissor draws rebound
instead of stopping; a lane of draws of other arguments (base instance
alternating) rebinds every draw after the first; a lane across a barrier stops
at the new check, with the split and texels of every step.
Also: examples/draw_costs gains a "backdrops" shape (every compositor draw reads its pass's colour
at its own pixel under its own scissor), which the A/B below uses.
No new WorkCounts field or Degradation kind. No RUNTIME_VERSION bump: the commands, copies and
pixels are those every step records. The runtime pin moves alone.
Verified (msi lavapipe):
- Base repro m3-max-29949: the kept frame had as_before 2, rebound 0, stopped 2.
- kept_shadowed_draws, 4 lanes. Each compares the kept frame with an every-step frame on pixels,
copy counts with copied texels, and the recorded command map. At the tip:
- plain lane: stops 2 -> 0;
- other-arguments lane: _arguments_shadows 2 -> 0;
- a lane where the rebound draws are the last to use a shadow: _shadows 3 -> 0;
- barrier lane: _checks 1, with 1 split.
- Negative control m3-max-30008, by hand:
- restoring the stop fails 3 lanes (_shadows 2/2/3);
- removing the gather fails 3 lanes on copied texels (1124 vs 2048) and on the last-use lane
(copies 1 vs 2, texels 525 vs 1313).
- Release A/B m3-max-29983/30002:
- base
|
||
|
|
15eab80f10 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
818ebc942d |
A render encoder that split carries its kept draw: the Split check holds pieces alone
carry_ends refused to carry the kept draw of an encoder whose pass split into instances (a reader of a colour after a barrier over the targets). The check came in with the first carry commit ( |
||
|
|
6353690110 |
Re-bless the golden hashes and the authored compile census at SEMANTICS 2114
SEMANTICS 2114 ( |
||
|
|
5c9d222e05 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
e0744825a5 |
A replayed draw walks its plan's heap members and its resident uses once, not at each draw
A plan's descriptor writes and uses number one for each resource its heap
reaches (every texture an encoder made resident, in each heap array), and a
draw's uses begin with those of everything its encoder made resident. Three
per-draw checks walked them at every draw, though their answers are fixed for
the plan or for the resident uses' identity, so a host step's replay of an
indirect command buffer paid every resident texture at every command:
- binding::binds_own_zeros (every write of the plan) is now a fact of the plan,
worked out as its pipeline state settles it (PlanFacts::own_zeros);
- the read-twin slot proofs (read_only_slot / read_only_buffer_slot, a walk of
the plan's uses and writes for each slot) are worked out once for the plan,
the first time a draw asks on a device with read twins, and kept in its facts
(binding::TwinProofs, which replaces TwinSlots::of with TwinProofs::slots); a
command's own uses name no slot (debug-asserted), so the proofs are the
plan's alone. A dispatch works its out per dispatch, as before; a test's
device that binds twins unproven proves them at each command;
- EncoderCore::note_draw's check for a write of a read twin walks the uses of
what the encoder made resident once for their identity (ResidentPrefix,
process-unique; the same uses wherever it is) and the draw's own uses past
them at each draw (refuses_twin_write_past).
render.rs and render/draw_again/rebound.rs change one statement each at their
call sites (facts.twins().slots, facts.own_zeros()).
Test: tests::resident_uses's
draws_walk_their_plan_and_resident_uses_once_however_many_textures_are_resident
counts, on a device with a read twin, the plan walks and twin-write checks of
each draw with 0 and 64 more textures made resident: the first draw walks
more with more, every later draw the same and nothing of its plan.
Also: examples/icb_reads gains a gpu-step shape (`icb_reads --only gpu-step --heap-textures H
[--no-twin] --runs 9`), a host-stepped execution of textured draws a kernel writes, reading its
textures through a material argument buffer over a heap. It prints host_step_ns_per_command.
No RUNTIME_VERSION bump: the same commands and answers, worked out fewer times. The pin moves
alone. No new Degradation kind or WorkCounts field; the walk counters are test-only.
Verified:
- msi m3-max-29962 at be9eff60d2 (runtime crate, --all-features --all-targets, -D warnings):
- clippy plain, --cfg m2v_cpu_icd and --cfg m2v_gpu: 0;
- rustdoc: 0;
- 134/134 touched tests on lavapipe: resident_uses, draw_again, read_twin_device, twin_reads,
twin_flights, shadow_twins, host_step_neutrals, icb_carry_race, icb_records_home,
indirect_command_buffer and its device suite, kept_heap_uses, carried_draws,
neutral_zeros_shared.
- Negative control by hand (m3-max-29957): the count test fails. Per draw, 147 plan entries walked
and 11 uses checked with 0 extra textures, against 531 and 75 with 64.
- Release A/B (m3-max-29960, msi lavapipe):
- base 5608c77dbb md5 65c9a10d, tip 0aae380fcc (this fix before its clean rebase) md5 197ac4e6;
- own target dirs, P-cores, 3 interleaved rounds, 8192 commands a step, medians of 9.
Host-step ns per replayed command, base -> tip:
- H=8: twin 3851 -> 3839, no twin 3866 -> 3811;
- H=512: twin 4676 -> 3881, no twin 4268 -> 3864;
- H=2048: twin 7533 -> 3991, no twin 5845 -> 3981.
At the tip the cost is flat in H.
|
||
|
|
042d11378b |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
88f577d11c |
A split keeps the encoder's kept draws: re-homed into the instance after it
A draw that recorded into a later render pass instance after a split (a read of a color attachment's texture after a barrier over the render targets, the walk's reader) kept nothing, and a draw that keeps nothing forgets every kept draw its encoder set aside: each later draw of the pass's other states took every step again. A draw recorded into an instance recorded inline after a split (render/inline_splits.rs) was never kept either (draws_unkept_other). What changed: - render.rs: `split_alone`, set where a draw keeps nothing only because it began a later instance after a split (no continuation, no stand-in's arrival), of the shape, views and formats of the instance before, its other steps a plain draw's. Then `rehome_aside` keeps the kept draws set aside with other states' bind states into that instance, but those that read the pass's colors other than through snapshots of their own, readers through snapshots, draws carried in and not drawn since, and those whose `Under` (moves, residency, sampler slots, rebinds, aliases) differs, which it lets go. - draw_again.rs: `Kept::rehomed_into` marks a kept draw re-homed (`rehomed`): after draws of other states, under a render state of another stamp, through no record, so its next draw is rebound. - rebound.rs: a re-homed draw's uses are made whole and its shadowed textures' uses gathered into its new instance where it uses them as its kept draw did, as a carried draw's are. - A plain draw into an instance recorded inline after a split is now kept (`plain` no longer requires no room). A kept draw's next draw there is always rebound (draw_again's room guard), and its recording goes into the room (`record_rebound`), recorded at the group's end through the pass's record as every step's; `settled` stays None there. - The debug check compares `rehomed` as the every step it takes keeps it. New WorkCounts field: kept_draws_rehomed. No new Degradation kind. Test: tests/split_keeps.rs, kept_draws_set_aside_are_rebound_past_a_split (A sampling, B adding, a barrier, a reader of the target that splits, A and B of other bindings, B twice again with no call between): 2 kept draws re-homed, the draws after the split rebound (drawn_alone(4)), none unlike or stopped, no draws_unkept_other, the same commands, state commands and pixels as every draw taking every step, and the pixels of the draws after the split those of what they bound. tests/draw_again.rs: `run_into` (a run into a given target) split out of `run_on`; `checks_ended` and `drawn_alone` shared. No RUNTIME_VERSION bump: the commands, state commands and pixels are those every step records. The runtime pin moves alone. Verified on msi (lavapipe): - m3-max-29952 at 15ba7cf939: clippy -D warnings, plain and --cfg m2v_cpu_icd, exit 0; 143 of 144 tests in 35 touched modules passed (draw_again, inline_splits, inline_continues, carried_draws, kept_*, snapshot_reader_*, attached_read_*, learned_coverage, leading_snapshots, shadow_runs and others). The one failure was the new test. Its first draw ran before any fragment buffer was bound, so that draw's rebind stopped, which is correct. The test now binds fragment buffer 0 first, as the walk does. - m3-max-29958 at e8daf89d87 (test code only since 15ba7cf939): clippy --cfg m2v_cpu_icd exit 0; split_keeps passes. - In debug, the re-homed draw and the draw in the room take the every-step check and pass it. |
||
|
|
f07887b354 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
41bac06524 |
RUNTIME 2308: no explicit DRM_FORMAT_MOD_LINEAR plane at a row pitch NVIDIA's shaders misread
On NVIDIA's proprietary driver, a DRM_FORMAT_MOD_LINEAR image with an explicit plane at a row
pitch that is no multiple of 32 bytes is made, and vkGetImageSubresourceLayout reports that pitch
back, but its shaders read the rows at another pitch. Measured case: 64 x 64 BGRA8Unorm at rows
272 bytes apart is read by a kernel at 256 and copied out by a blit at 272. Rows 288, 320, 384 and
1024 apart read right.
Measured on:
- the RTX 5080 Laptop GPU (615.71.09): the sweep over every multiple of 16 bytes to 1024;
- the RTX 3090 (620.70.06).
Both over host pages and over the device's own memory.
Vulkan makes the implementation validate an explicit plane layout and refuse one it cannot use
(VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT), so no documented rule explains the
misread: it is a driver defect. It caused the 5080's wrong texels on development. A texture in
place over host pages, at rows padded 16 bytes past their texels, read other rows through the
pitched route; a read twin at rows 272 apart was one such texture.
The change:
- RuntimeDriverDefect::ExplicitPlanePitchMisread, on every NVIDIA GPU and release until a probe
finds a clean one.
- Device::explicit_plane_pitch refuses such a plane at a row pitch that is no multiple of 32 where
the device has the defect. It does so in both makers of an explicit plane: pitched_image (host
allocations and the device's own memory) and explicit_plane_image (dma-bufs). The texture then
takes its shadow (Refusal::Pitch; the shadowed-texture notice names the pitch), or texel rows
for a slot that only reads.
- The bound is the measurement, not the driver's own linear alignment. The driver's own linear
images lay rows at multiples of 128, and keying on that would shadow 288 and 320, which read
right.
- A cfg(test) switch, DeviceShared::explicit_plane_pitch_misread_forced, stands in for the defect
on a driver that reads such planes right (lavapipe).
- docs: a FAST-PATHS known gap (NVIDIA's pitch, with both measurements); api_signatures.tsv +1.
REFUSALS.md is unchanged.
No new Degradation kind or WorkCounts field. RUNTIME_VERSION moves because in-place routes change
on NVIDIA, and the linear-alignment records are keyed on it.
Tests:
- textures_at_padded_rows_read_their_bytes: 64 x 64 BGRA8Unorm at 256, 272, 288, 320, 384 and
1024, over host pages and the device's own memory, each read by a kernel and by a blit. No
pitched image at 272 where the defect applies.
- The same test under the forced defect: on lavapipe, 272 moves off the pitched image and reads
right, while 288 stays pitched.
- driver_defects lists the new defect.
- The padded-rows sweep tests, and the shadow log test's twin at padded rows.
Verified:
- msi m3-max-29913 at 7a64d31930:
- clippy -D warnings, all targets and features: plain, --cfg m2v_gpu and --cfg m2v_cpu_icd all
exit 0;
- lavapipe read_twin_device, driver_defects, in_place_check and shadow_causes_device: 43/43;
- api_signatures, api_surface and fast_paths: 47/47.
- Negative control (rule disabled): the forced test fails with pitched 1 at 272.
- RTX 5080 at 39d564abc4 (archive md5 dd1f3982, b5080 entry roip2-fixarch-5080-112137):
read_twin_device 20/20. That includes the shadow log test that failed before: its twin at 272
now takes the twin's shadow.
- The RTX 3090 run of the same archive (m3-max-29951) is queued; its result follows in the lane.
|
||
|
|
b0ed7c6c24 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
1db01c30be |
Compute encoders park their core's box and bind state between group members; command buffers reuse record-list storage
== Compute encoders park their core's box and bind state, with its memo, in the command buffer for the next A command buffer of one-dispatch compute encoders (dispatch_chain's encoders shape) cost the host about twice a serial encoder of the same dispatches: on msi lavapipe (release, |
||
|
|
60088bcf3a |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
e4747b174b |
handle_entry_flags: name FLAG_YCBCR_WRITES without a link to the private item
Rustdoc at |
||
|
|
8dd9d3af55 |
Refusals name what they saw: an unknown ABI key's string or shape, a stage-size refusal's weight and bound
- Every Abi(UnknownKey) that named no key now carries what the reader found: the unknown string (an argument's role or attribute, a visible function's key, a node's tag, a compile option, a signature kind, a module flag), cut at 64 bytes, or, where there is no string, the operand's shape in LLVM spelling. The detail is a crate-private field of InputError (`saw`), printed by Display and Debug; it lives there and not in Location because a Location field grew the translator's Error past clippy's result_large_err. No public item or refusal kind changes; REFUSALS.md regenerated unchanged. - The ANV stage-size refusal (Feature::StageSize, DriverDefect) names the module's entry weight and the bound it passed in its symbol, which Display prints: "entry weight N, past the bound B". The bounds and the refusal are unchanged; the FAST-PATHS known-gap row says so. Why: a consumer's log of a GL-on-Metal kernel refused as UnknownKey at an argument with key None and of two kernels refused for stage size could say neither which key nor how far past the bound; one rerun at the pin carrying this names both. Translation output unchanged: no SEMANTICS or RUNTIME bump. Verified (msi, m3-max-29879 at 2ddbda8ecf): clippy air + translator 0; metal2vulkan-air 567 passed incl. abi::tests::an_unknown_key_names_what_it_read (a synthetic node per site, whole location, seen detail and Display); metal2vulkan a_kernel_past_the_stage_bound_keeps_the_widest_pin_or_is_refused (symbol and Display name weight and bound past each defect's bound), error::tests and engine_handles compute tests 10 passed, llvm-as present (no SKIPPED). |
||
|
|
198f7a3606 |
walk_costs: a WALK-MOVED line of every work count a shape's frames moved
The WALK-COUNTS list names 24 counts and none of the reasons a draw took every step, a kept draw was let go or a rebind stopped (kept_draws_let_go_*, draws_unkept_*, draws_rebind_stopped_arguments_*, draws_carry_stopped_*, stage_tables_read_whole_*, ...). Each shape now also prints every count its timed frames moved, a frame, through video_frames::moved_per_frame, which reads WorkCounts' Debug, so no hand list goes stale. Validation only; a measurement, no check changes. Verification: msi lavapipe job (clippy --cfg m2v_cpu_icd, walk_costs run). Verified (msi lavapipe, m3-max-29866): clippy validation --cfg m2v_cpu_icd 0; walk_costs 1 passed, all 4 shapes printed WALK-COST, WALK-COUNTS and WALK-MOVED. |
||
|
|
8e992466f7 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
2960070096 |
SEMANTICS 2114 / RUNTIME 2307: write() through an argument buffer to a two-plane YCbCr texture stores or drops as the slot write does
An argument buffer's texture2d<float|half, write> of a two-plane YCbCr texture died at dispatch (its storage heap member was refused). Metal stores through a handle exactly what it stores through a slot (the M3 Max under macOS 27.0.1, measured by the consumer): nothing of YCBCR8_420_2P, both planes of the unpacked 4:4:4 formats byte for byte the slot's. - bind::heap: a storage class holds a texture whose writes Metal drops (metal::format::writes_dropped) as its neutral (Fit::Dropped), and a 4:4:4 texture whose writes Metal stores (ycbcr_writes_stored) through the R32G32B32A32_SFLOAT view of its write shadow; its table entry carries FLAG_YCBCR_WRITES (bit 15). A stage that reads the storage class (new RuntimeFact::HeapStorageReads, a PlanTimeCheck) refuses either texture it reaches there, Format / NotImplemented, as a slot that reads one is refused. - memory::handles: the search carries the flag into handle bit 29 (HANDLE_YCBCR_WRITES) under the stage's new SpecKey::HeapYCbCrWrites, a u32 constant the plan gives from the command's members (1 where a member it names is such a texture, usage writing). At 0 the carry mask, the element mask and the write's test are spec-constant folds, so a command naming no such texture runs the pipeline it ran before (the predicted bindings name none). - lower::texture: a float/half 4-lane 2D heap write selects (rgb, 1.0) where the handle carries the flag: the mark the write-back kernel reads (nonzero), in place of any member conversion. - runtime: the write shadow's image is MUTABLE_FORMAT with an R32G32B32A32_SFLOAT view where the device stores that format; the heap's float storage element is that view; a command making such a texture resident for writing names the shadow in its uses (its copies clear the marks and encode the marked texels into the planes), and the texture's own image only where it reads it too. Tests: src/tests/engine_heap_ycbcr_writes.rs (interpreter run at the constant's 0 and 1, plan values and one variant for every command naming no shadowed texture, the storage-read refusal); runtime_lane::ycbcr_argument_writes (500/503/507/523/527/542/545 through an argument buffer against the slot's bytes, and the pipeline count). REFUSALS.md regenerated; api_signatures blessed: two new variants of #[non_exhaustive] enums, nothing breaks for a consumer. Metal (M3 Max, macOS 27.0.1, m3-max-29643): argument-buffer writes are byte-identical to slot writes for 500/503/507/523/527. Verified (msi lavapipe, --cfg m2v_cpu_icd): m3-max-29859 clippy translator/runtime/validation 0, runtime 243/243, lavapipe lanes 75/75, translator 246/247 (a word bound the mark raised, fixed in ce01da189e); m3-max-29865 at ce01da189e clippy 0, translator 4/4, lavapipe 2/2: argument-buffer writes byte-equal to slot writes for all 7 formats (alpha-0 writes, so an unmarked write stores nothing); pipelines 1 after RGBA8/RGBA16Float/500 commands, 2 after the first 503 and still 2 after a second. |
||
|
|
15fc7f62a5 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
7f36b6ee36 |
draw_again: a carry sets aside up to seven other pipeline states, not three
Doc only: the module docs' carried bullet still said three, from before live_bind::SET_ASIDE became 7 (RUNTIME 2267). Verified by reading live_bind.rs (const SET_ASIDE: usize = 7) and render/carried.rs's docs. Comment only; the runtime-sources pin moves with it. |
||
|
|
de69a4a218 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
73b97e1e0c |
A draw after scissor rectangles alone restates by them alone
A render-state call drew one fresh stamp, so a kept draw's next draw after set_scissor_rect(s) ran restate_kept in full: the route and DrawSettings again (compared by value), the pipeline clone, the fragment tests, the depth/stencil descriptor, the shape-memo lookup and clone, and two FixedState compares, only to take new Vulkan scissors, which none of those read. Compositor shapes and the walk set a scissor before nearly every draw. What changed: - The encoder's render-state stamp is now a pair (`Stated`): `set`, drawn afresh by every render-state call, and `beyond_scissors`, drawn afresh by every one but set_scissor_rect(s) (`log_restating_scissors`). - `Kept::restates_by_scissors`: whether the kept draw's route meets every condition a restate asks (no failing state, no hidden depth/stencil, no restart strip, provoking vertex as-is or native), set where every step keeps the draw and where a full restate succeeds, so the debug Kept comparison holds. - A draw whose kept draw's stamps differ in `set` alone, of such a route, takes the encoder's scissors into its kept recording's draw state (as a draw that finds its state in the shape memo takes them) and derives nothing else; every other restate is unchanged. New WorkCounts field: draws_restated_scissors (counted at each such restate, a debug check turn's too). No new Degradation kind. Test: draws_after_scissor_rectangles_alone_take_them_alone (runtime tests/draw_again.rs): 8 draws again after scissor sets alone restate by them alone, rebound, with the same commands, state commands and pixels as every step; a viewport set before one draw takes the full restate, still rebound. In debug builds every second rebound draw takes every step and compares the draw state the restate left. Verification follows on msi (lavapipe, potluck). Recorded commands are unchanged (the draws rebound record the same commands, state commands and pixels as every step), so RUNTIME_VERSION stays and the runtime-sources pin alone moves. Verified (msi, lavapipe): m3-max-29822 clippy plain and --cfg m2v_cpu_icd 0, 103/103 of 20 touched modules incl. draw_again::draws_after_scissor_rectangles_alone_take_them_alone; negative controls m3-max-29825: fast path off reads 0 against 8; stale scissors trip the debug rebound check. Release A/B m3-max-29845 (7 interleaved rounds, medians a draw): compositor 57,172 -> 55,820 instructions, 8.81 -> 8.64 us (1216 of 2237 restates by scissors alone); pass17 33,003 -> 30,783, 4.48 -> 4.18 us. |
||
|
|
c28a0e0523 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
948b5e37fb |
RUNTIME 2306: a texture over a bit-24 buffer that no image lies over reads a shadow of its read twin, not of the copy
A no-copy buffer of Metal's private option bit 24 is a copy of its pages off macOS, beside a read twin over the pages in place. A slot that only reads a texture over such a buffer binds the texture's read twin, but only where the twin's texture lies in place over the twin's bytes. Where it did not (RADV lays no DRM_FORMAT_MOD_LINEAR plane whose rows or first byte are off a multiple of 256: a window server's 48x48 textures at rows of 192 bytes, its 128x128 ones at rows of 512 from 32 bytes in), the twin's texture was made as a shadow and dropped. The slot then bound the program's texture, itself a shadow of the copy for the same reason, so its command buffer used the copy and its commit compared the whole copy with the pages. Workload reason (reims's appwalk17 desktop walks, numbers only): twin textures not in place 780M 362, RTX 3090 304, Iris Xe 1; copies compared 52,537 (2,897 MB), 43,384 (2,138 MB) and 331 (35 MB); the Iris compared in one walk step only, the one that made its one twin not in place. Copies compared plus twin slot reads come to about the same total on all three (56,775, 52,277, 54,233): every such read that missed a twin read the copy. Now the twin's texture is kept as a shadow of the twin's bytes where the program's texture is a shadow too, and the slots that only read the texture bind it under the same proof as before. The program's texture lists it beside its own shadow (shadow::texture_copies, held weakly), so draws, rebound draws, dispatches and resident textures copy it in from the pages in place at its first use in each command buffer, where they copied the texture's own shadow in from the copy (a shadow of a copy of Shared memory never stands). Where the pages carry a log of their writes only the changed rows move. The command buffer names the twin's and the shadow image's keys, never the copy's, so its commit compares nothing. No store reaches the pages: the twin's one GPU access is the copy in's read, the shadow is the runtime's own image no call returns, the slots only read it, and a copy back would write the twin's key, which every encoder refuses. Discrete devices take it too: their copy lies in system memory (MemoryClass::Shared), as the pages do, so the shadow's copy in crossed the bus before and crosses it now; what goes is the CPU's comparison. Cost: an image of the texture's size per such texture while it lives. - WorkCounts::read_twin_texture_shadows (new field). No new Degradation kind. - The shadow log's twin line says whether the twin's shadow serves the read slots. - cfg(test) DeviceShared::linear_pitch_rule_forced: RADV's LINEAR plane rule at Device::unplaced. - Tests (read_twin_device): the two shapes sampled by a draw and the 128x128 one read by a kernel through the twin's shadow (compares 0, a CPU write read next, a fill read back through the copy, pages kept); over logged pages the second command buffer copies nothing in and a told write moves its rows alone. The screen-sized texture lavapipe lays no image of now reads its twin's shadow too. - Docs: read_twin.rs, shadow_log.rs, API.md and the FAST-PATHS row on bit-24 memory; api_signatures.tsv (+1). Verified (msi lavapipe, m3-max-29778 at 69f0a567b1): clippy plain and --cfg m2v_cpu_icd 0; read_twin_device, copied_device, copied:: units, texel_rows_device, dirty_pages_device and waited_reads 73/73; api_signatures and fast_paths 35/35. With RADV's LINEAR rule forced (offset and pitch multiples of 256): 48x48 at pitch 192 and 128x128 at pitch 512 offset 32 sampled by a draw and read by a kernel: twin slot reads +1, compares 0, texels the pages', a CPU write read in the next command buffer; a fill in the same command buffer reads back through the copy with one compare, pages kept; over a dirty log an unchanged twin copies 0 bytes. Negative control (serves cut back to in-place only): the 3 new tests fail, the commit compares the copy. |
||
|
|
607f2d430a |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
7325cef772 |
Spare command pools: take before making, in sections too, each pool up to 32 of a level
A command buffer whose pools handed out every VkCommandBuffer of a level they held now takes the spare holding the most of that level from its first hand-out on (before: only past 16 handed out, making the rest in its first pool), and inside a section of the exit guard (the scheduler's barrier command buffers, a host step's recording) it takes a spare whose command buffers need no reset (before: no spare at all). Where no spare holds one, it makes it in its last pool, up to POOL_HOLDS (32) of the level there, past which it takes a pool for more (a spare holding none of the level, or a new pool). HELD stays the hard bound; idle sheds and recent-uses frees are unchanged; no new switch. Why: under command buffers of fenced one-dispatch compute encoders split into parts (a guest's fluid simulation's shape), the barriers' command buffers, made in sections, were 64% of the allocations and the first-pool makes 34%; the pools grew past what was in use at once to HELD, and each give-back shed the oldest pool whole, which the next takers made again (45,914 made over 30 rounds of 200, about 1,250 a round, on lavapipe). On RADV each made VkCommandBuffer is a new buffer object with cleared pages. New WorkCounts field: command_buffers_made (vkAllocateCommandBuffers' count), POOLED in the conformance cost table. Tests: tests::spares unit tests take `settled` and a new one checks a section takes only a spare that needs no reset; the device test of a small and a large command buffer now asserts none is made where the spares hold them; tests::spares_parts (device): fenced command buffers 16 in flight make none once warm and hold at most the in-use bound; a load that falls sheds down. No answer, refusal or recorded command changes (only which VkCommandBuffers the spares hand out), so RUNTIME_VERSION stays 2305 and the runtime-sources pin alone moves. A/B (msi lavapipe release, m3-max-29720, spares_compute_parts: 200 command buffers a round of 2-120 fenced one-dispatch encoders, 48 in flight, rounds 6-30, two interleaved runs): command_buffers_made 1,498/1,448 a round -> 8.8/4.3; spare_command_buffers_shed 1,460/1,447 -> 0; spares held pinned at HELD -> 3,251/3,263; committing thread CPU per command buffer -7%/-6%, scheduler -4%/-8%, queue waiters -12%/-9%, free thread to 0; anonymous RSS at round 30 187/190 -> 71/74 MiB. Control (sections take no spare): 2,189/2,305 made a round, fails the steady test. Verified (m3-max-29776 at 2a5db4d65e, msi): clippy runtime+conformance plain and --cfg m2v_cpu_icd 0; tests::spares and spares_parts 26/26; conformance cost 0; signatures 0. |
||
|
|
26b8d7b4d1 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
9fa1fe4a7a |
SEMANTICS 2113 / RUNTIME 2305: write() and render into the _sRGB two-plane 4:4:4 twins (523, 527) store what Metal stores
write() (kernel and fragment) into YCBCR8_444_2P_sRGB (523) and YCBCR10_444_2P_sRGB (527) over a surface plane, and such a texture as a render attachment, were refused (the encoding unknown). Metal's bytes, measured on an M3 Max (macOS 27.0.1; 8 colours, kernel write, fragment write and Clear+Store over 444v/x444 surfaces), fit one reading exactly: each channel is sRGB-encoded first, then converted as the non-sRGB twins 503/507 convert (here BT.601 video range). Metal's own paths differ by one code on one 10-bit luma (kernel 696, pass 697). - metal::format: ycbcr_writes_stored and ycbcr_renders take 523/527; the 4:2:0 and 4:2:2 sRGB twins stay refused (unmeasured). - bind::ycbcr_write: one shape word, SRGB: per channel the pass's half (pass only), then lower::arith::pack::srgb_encode (the device's Pow), then the existing grid step and rows. The device's float curve is the conversion we implement (no sRGB view can store a matrix combination of encoded channels); no PrecisionNote: any difference is within Metal's own one-code spread. - A pass that Loads a twin is refused at its start, and a pipeline that blends into one at its attachment, both NotImplemented(Format) (Metal's load and blend of the twins unmeasured). REFUSALS.md regenerated (Format sites 124 -> 125). - CPU references ycbcr_write/ycbcr_store encode the twins by the same f32 steps. Verified (msi, lavapipe, m3-max-29687 at db17bcce16): clippy (metal2vulkan, runtime, validation, --cfg m2v_cpu_icd) 0; translator tests 13/13 (reference and interpreter give Metal's eight colours for 523/527); lavapipe 14/14 (lane ycbcr_srgb_twins: both planes against Metal's table for kernel, fragment and Clear+Store, one code allowed on the 10-bit luma only; load and blend refusals; the 503/507/542/545 tests unchanged). Negative control (SRGB word forced to 0, m3-max-29701): the CPU test and the kernel, fragment and pass tests fail on grey, (0.2,0.6,0.9) and (0.9,0.3,0.1). |
||
|
|
6a9a05ccad |
Tests: pin 91's three failures and the tile fixture, test-only
- tile_pending: tile_state resolves its fixture through metal2vulkan_devtools::engine_dir() (the run-time CARGO_MANIFEST_DIR, else the build's), as heap_border_texels and a8_over_buffers do, so a carried archive finds it. - render_merged_executions: a rebind of a shadowed target's bytes encodes again the named encoders and the rest of their fold group (RUNTIME 2302: the pass joins the writer's compute encoder's group, and a rebind encodes a group whole); rebound_run reads the group from encoders_folded. Rows and pixels unchanged. - compile/tests.rs: the earlier-derived-debug test drops SEMANTICS 2112's empty texel_rows. - property_reads: rounds go on until each thread has landed inside a submission, bounded by 30 s instead of 8 rounds; the window is a 0.05-0.2 ms submission and the full suite's load closed it for 8 rounds at both |
||
|
|
d2c72548cd |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
be62103f73 |
One state lock per encoder open and one per end
A compute encoder opened after another took its command buffer's state lock
7 times as it opened and 3 times as it ended (a debug count on lavapipe):
the protection check, settle_end's three takes, the open itself,
enter_predication and inherited_residency; end_predication,
note_scheduled_work and the end itself. About 17 ns each under perf, 118 ns
of a folded dispatch's open and 55 of its end on msi.
- EncoderCore::open checks the protection options (compute and render),
settles the last render encoder's end where one waits (CommandBuffer::
settled: the three takes only where something is there, else the lock it
holds), and runs the kind's own state work as a closure under its lock:
compute's enter_predication and State::inheriting, blit's protection
options.
- end_with_replay notes the scheduled work and, for a compute encoder whose
command buffer has no predication record, its unit's work under its own
lock. Captures::unpredicated tracks that: false at open where the command
buffer has a record, cleared by the encoder's own record, false for an
encoding again, so those keep end_predication's lock.
Tests: tests::encoder_state_locks (debug, device): a compute encoder and a
blit encoder opened after a compute encoder lock once at open and once at
end.
No behaviour changes (what a run answers, records and submits is the same), so RUNTIME_VERSION
stays 2304 and the runtime-sources pin alone moves.
Verified (msi, lavapipe): tests::encoder_state_locks 1 lock at open and 1 at end for compute and
blit (negative control with the base sources: compute 7/3, blit 5/2); touched runtime suites
156/156 (render_fold 13, encoder_fold 22, ...); validation predication and protection_options
18/18; clippy plain, m2v_gpu and m2v_cpu_icd 0; rustdoc 0. Release A/B (base
|
||
|
|
7f01a06014 |
queue_share: the quiet unshared queue's test makes again a run whose first long one's completion let the second go
Pin 91's lavapipe suite ( |
||
|
|
0c3c24ec0e |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
933b4e774d |
SEMANTICS 2112 / RUNTIME 2304: a texture no image can lie over is read and written in place through a texel buffer of its rows
A texture over a buffer is Metal's linear layout: texel (x, y) at offset + y * bytesPerRow + x * bpp. Where the device refuses the image route over the buffer's pages (a texture over pages that need more than one dma-buf, a LINEAR plane at a refused pitch or offset) but the buffer is in place, a slot whose function only reads (read, not sample or gather), writes or asks the size of that texture now binds a storage (or uniform) texel buffer view over the buffer's bytes, addressed as rows (the row pitch in texels and the size from a push field), instead of a shadow image copied in and out. The texel buffer view's format converts as the image's would: the device's own conversion, no note. - Translator: a structural fact of the slot (its uses are read/write/size only, proven in lowering), a push field and a variant key, after the YCbCr in-place variant's machinery. - Runtime: the planner takes the rows variant where the image route is refused for a stated reason; the tracker sees the slot's writes as writes of the buffer's bytes (rows only, the bytes between rows untouched); a buffer with a read twin takes no rows (its twin texture stays the shadow of its truth). Sample and gather uses, levels past the first, arrays, 3D and compressed formats stay shadows. - WorkCounts: texel_rows_textures, texel_rows_bound. No new Degradation kind, no precision note. - Docs: API.md variant section, FAST-PATHS known gap narrowed, the shadow log's rows line. Workload reason (consumer's 780M diagnostic, numbers only): of the device-gap shadows in three compute workloads, half the textures are only written by their kernels (1.67 G texels per pass), the other half only sampled; the written half takes this route. Verified (msi, lavapipe): texel_rows and read_twin tests 28/28 at f848389cfc (m3-max-29579): over a copy that lavapipe refuses as an image (pitch 272), no shadow copy, rows bound, texels inverted in the pages, gap bytes kept, a sample in the same and the next command buffer read the rows' writes; RGBA8Unorm 1024 codes read / 1024 floats stored and RGBA16Float 65536 / 65536 bit for bit against the image route. Clippy plain, --cfg m2v_cpu_icd and --cfg m2v_gpu 0; rustdoc 0 (m3-max-29541 at 532be1f473, route code unchanged since). Negative control (the row word swapped for the width word): 6 of 13 tests fail. Release first dispatch of a new state on lavapipe: base 4.12 ms cold / 0.98 warm, rows 2.80 / 1.56 (the rows side also commits over a copied buffer). |
||
|
|
6b6c9a002f |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
2818c1fcd0 |
RUNTIME 2303: a committing or waiting thread's pass leaves other queues' batches behind an unshared head it cannot send
A thread about to block (Scheduler::submit_before_waiting) or one that just committed with
commit_and_submit (Scheduler::submit_at_commit) takes the inbox in and submits only the batches
that need nothing of the scheduler's thread (submit_plain_ready, plain_ready). take_in counts
the unshared commit taken, so RUNTIME 2300's gate in plain() lets other queues' batches through;
Order::next puts the unshared queue's head first but skips any head `ready` refuses and goes on
to the next. So where that head is ready for the scheduler's own look but not plain for this
pass (a submission or scheduled handler for a waiting thread, a host step already recorded, a
switch of storage forms riding on it), another queue's batch on its VkQueue whose room had come
was submitted ahead of it, where the scheduler's pass sends the unshared one first
("Heads put first").
The rule: such a pass notes the VkQueue of an unshared head it leaves that the scheduler's look
would find ready (first_for_the_thread: nothing of submit_ready's holds, every event value
reached), and leaves the other queues' batches held back there to the scheduler's thread too
(left_behind_unshared), which its caller already wakes for what it left: that thread's next pass
sends the unshared one first and them next. Bound: one wake and one pass of that thread. An
unshared head not ready for that thread either holds nothing, as its own pass lets the batch go
then. submit_ready's five holds move into holds_back(), shared by both, with the same order and
the same counts; CommandBufferShared::held_back_on() factors what held_for_unshared and
unshared_commits both tested. No switch, no counter, no public item, no Degradation kind.
Not covered, a known limit now written in unshared_hold.rs ("Deferred commits"): a commit left
to the lowering thread under RenderLoweringPolicy::Worker; counting it posted at the call would
hold other queues' batches through the lowering backlog, leaving the GPU idle.
Tests (queue_share_device, lavapipe): a waiting thread's pass with the scheduler's thread held in
a submission handler (waiter_submits::Held, now shared) takes in an application's fill and an
unshared fill with a scheduled handler; a committing thread's pass (commit_and_submit, default
Grouped completion: the fill goes alone where the device groups) takes in an application's fill
while the unshared queue's dispatch waits with its host step recorded (the pool's making held,
the steps' thread held at new trace points Step and Stepped while the scheduler's thread is held
in a submission handler). Each asserts that the pass ran and that the unshared one began first.
Docs: unshared_hold.rs ("Passes of other threads", "Deferred commits"), FAST-PATHS unshared
isolation row, submit_plain_ready.
Verified (msi lavapipe, m3-max-29578 at 258953844d): clippy plain and --cfg m2v_cpu_icd 0;
91/91 of unshared_hold, queue_share, queue_share_device, scheduler, scheduler_held_wakes,
scheduler_wakes, inbox, waiter_submits, commit_and_submit, hold_sites, dispatch_pending.
Both new tests: passes 1, batches the pass submitted 0, the other queue's buffer began
0.100/0.108 ms after the unshared one. Negative control m3-max-29586 (rule off): both fail,
the pass submitted 1 and the other buffer began 0.35/0.34 ms before the unshared one.
|
||
|
|
2216540a68 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |