e453efbf0aab4107aea4f18866b16ff00a80eccf
5657
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
d8666d430f |
RUNTIME 2302: render encoders record into the VkCommandBuffer of the encoders before them
A render encoder took a VkCommandBuffer of its own at every open, so a compute, render and blit step began 2.71 and submitted 4 VkCommandBuffers per step (dispatch_chain renders, lavapipe). A render encoder with a log of its calls now takes part in the encoder fold: - One whose pass records at its end (draws in a secondary) joins the group before it; one whose first instance records inline joins none and may lead a group. - No barrier records inside a pass: a joined render encoder records one barrier from everything of the group's earlier encoders (FoldOrder::everything) at its open, counted in command_barriers. - Color groups, rasterization-rate maps and a depth attachment out of GENERAL take no group; segments, fence updates and Overwrites end the group after the encoder. Logless devices keep one VkCommandBuffer per render encoder. - A folded member's layout moves go before its group's first part (GroupPlaces). - A check splits a group with a render member at its pass's submission (as RUNTIME 2297 does for blits). - A group's order is built as its second encoder joins, not as its first ends. A/B (lavapipe, dispatch_chain, per step, base vs tip): renders 2.71 -> 1.35 VkCommandBuffers begun, 4 -> 2 submitted, GPU 119.5 -> 97.7 us; renders-apart 3.71 -> 1.00, 4 -> about 0, 143.6 -> 94.6 us; passes unchanged in buffers, the encoder's open about 250-480 ns more on the host (the group an inline pass begins), the whole pass within the host's noise. Tests: tests::render_fold (device), tests::held_depth, shadow_runs' rebind expectation (a rebind encodes a group whole). Docs: encoder_fold.rs, API.md, FAST-PATHS known gap and ANV row. Verified (msi, lavapipe): the full runtime suite 2683/2684 at c502efba29, the one failure the race test fixed in ca5042567b; clippy plain and --cfg m2v_cpu_icd, rustdoc, fast_paths 0. Negative control (the explicit order removed, renderfold-negctl): the hazard tests fail on their barrier counts; lavapipe shows no wrong texel because it completes each command as it runs, so the texel proof is a GPU that overlaps work. |
||
|
|
a91629c1a6 |
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. |
||
|
|
ca5042567b |
encoder_fold: the race test waits for the check's failure to be noted, not for its call
a_check_that_fails_a_submission_before_its_group_is_split_keeps_it_failed let the commit's encodings again go once the check closure signalled from inside its call. The scheduler notes the failure (State::fail_submission, which marks the encoders unrunnable) only after the closure returns, so the encodings again could build their units and splice the blit's in between: the full lavapipe runtime suite at the render fold's tip (m3-max-29520) counted 4 encoded again against 3. The blit still ran nothing there (the failure, noted after the splice, cleared its part), so this is the test's race, not the product's. The test now holds the turn until the command buffer's failure is noted (failure_noted, a test-only reading of State::failure, set under the state lock after the encoders are marked), then lets the encodings again go. Verified (msi lavapipe): encoder_fold 22/22; clippy 0 (--cfg m2v_cpu_icd and plain); control m3-max-29567 (unrunnable marks removed) fails the test (4 vs 3). |
||
|
|
1a44a6d198 |
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. |
||
|
|
51e506adde |
RUNTIME 2301: an encoder holds once per command buffer what the encoder before it held
Each one-dispatch encoder of a folded group took its own references to every
object its command buffer already held (state, variant objects, the made
pipeline, the argument table's objects: about 7 Arc clones and a boxed holds
entry), and the completion thread then dropped those entries one per state
lock. A folded dispatch cost about twice a serial one on the host.
Now an encoder the program opens starts from what its command buffer's last
ended encoder held lately (16 addresses at most) and holds none of those
again. Encoders recorded apart (segments, encodings again, captures) start
empty and hold everything they name. Only complete_rest removes a command
buffer's retained entries (part completion clears only the SubmittedHolds
counters; failures and re-encodes add entries), so a seeded address names an
object the command buffer holds until it completes, across parts. Release
order is unchanged. Also a cheaper hand-on of the recent addresses at an
encoder's end.
Tests: tests::held_lately (8 encoders over the same objects give 1 holds
entry; an object an earlier part holds lives until the later part completes;
a seeded encoder re-encoded apart after commit_failed Set{1} keeps its
objects alive and writes its output) and a tests::retained unit test.
Negative control (the seed ignored): all four fail (8 vs 1 entries, 3 vs 2,
2 vs 1, 8 holds vs 0).
Verified (msi lavapipe, release, frame pointers, base
|
||
|
|
4c97bf0af1 |
queue_share: the active hold's test asserts the 2 ms budget only while the queue is active
an_unshared_queue_s_command_buffer_goes_ahead_of_other_queues_held_work asserted that no head was let go under the 16 ms idle budget. The 2 ms budget holds only while the unshared queue's last commit is less than unshared_hold::ACTIVE (50 ms) old; then the 16 ms one does, as for a quiet queue. In the checks job m3-max-29383 on a loaded msi, lavapipe ran the '30 ms' long command buffers in 149, 161 and 50 ms: the unshared one was committed at 1.4 ms, the queue went quiet at 51.4 ms, and the second was let go at 148.8 ms, the first's expected end (164.8 ms) less 16 ms, under the idle budget, as unshared_hold.rs specifies. The test now records when the queue went quiet (its last commit as the runtime noted it, plus ACTIVE) and asserts what the runtime bounds: a second let go while the queue was active went no more than 5 ms before the 2 ms budget lets it (the first's end, or 2 ms before its expected end, whichever is first; the 16 ms budget is about 16 ms early), and a head was let go under the idle budget only where one was let go once the queue was quiet. Verified (msi lavapipe): the old form fails under 192 nice-19 burners (m3-max-29431: 'none let go under the idle budget' 1); the new form passes under the same load and unloaded (m3-max-29462); clippy -D warnings (runtime) 0 under --cfg m2v_cpu_icd and plain. |
||
|
|
8b20339b4b |
draw_reads and dispatch_chain: commit-to-completion time beside the GPU time
Examples only (neither is a consumer's example). Both now also print, for the runtime's shapes, the median time from the commit to the command buffer's completion on the host: draw_reads as wall_us_per_draw, dispatch_chain as wall_us_per_dispatch. That time also holds the GPU work the runtime records before the command buffer's own, such as host calls' staged copies (command_buffer/submit.rs), which the command buffer's GPU time does not show. draw_reads also takes --idle MS, which leaves the device idle that long before each run's encoding, and prints each run's encoding time (encode_ms, median and most): on a GPU that powers down when idle (the RTX 5080 laptop GPU after about 20 s) an encoding that waits for it to wake shows there. These are the figures the arena mirror experiments were judged by; the mirror itself was dropped (its A/Bs on the 3090 and 5080 left a measured shape slower in every form). Verified: msi build and clippy follow. Verified: msi m3-max-29465: release build of both examples 0; clippy -p metal2vulkan-runtime --all-targets --all-features -D warnings 0. |
||
|
|
3310061de3 |
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. |
||
|
|
76cef9e9af |
Shadow log: a dispatch's first use of a shadowed texture, and a read twin not in place, with its reason
The shadow log (METAL2VULKAN_LOG_SHADOWS, default off) named a shadowed texture's first draw only, so a texture bound only by kernels never said whether its function fetches, samples or writes it; and a read twin whose texture is not in place was counted (read_twin_textures_not_in_place) with no reason anywhere. A consumer's runs need both to size the texel-buffer route for shadows: whether the kernels over 600 list_limit shadows read or sample them, and why 233 twins are not in place. - shadow_log::dispatched: the first dispatch that binds a shadowed texture names it as the draw line does (one line per texture, whichever command bound it first); the draw and dispatch lines share first_binds and samplers_named, which now takes a pipeline's modules and layout. - shadow_log::twin_not_in_place: one line per texture whose read twin is not in place, naming the texture, its buffer, offset and pitch, and why: the twin's placement (asked again only with the log on) where its making made a shadow, or the making's error. The twin's making now runs under the call make_twin_texture, so its own shadow line is told apart from the program's. - Off, nothing changes: enabled() is read once. A test-only switch turns the log on in a device test's process. Verified: the msi job (build, clippy -D warnings all features and targets, read_twin_device on lavapipe) reported with the tip; the_shadow_log_names_a_twin_not_in_place_and_a_dispatch_s_first_read asserts a line per twin not in place and the dispatch line exactly where the texture is a shadow. Diagnostic only: both lines print only under METAL2VULKAN_LOG_SHADOWS; no product path changes. Verified: msi m3-max-29434 at the tip: clippy -D warnings (metal2vulkan + runtime, all targets and features, --cfg m2v_cpu_icd) 0; read_twin_device 15/15 incl. the_shadow_log_names_a_twin_not_in_place_and_a_dispatch_s_first_read. |
||
|
|
5d33e0c74a |
Device replay tests write the header's binding counts, as the runtime does
SEMANTICS 2111 (
|
||
|
|
c1f0176651 |
Host-step lane tests expect the staged-records notice where a host step staged records
Since RUNTIME 2294 (
|