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.
An OpenCL-mode kernel declares each image1d_t / image1d_array_t slot as the 2D texture of
height 1 Apple's OpenCL binds (canon::opencl::entry, canon::opencl_1d). A real 1D or 1D array
texture is a VK_IMAGE_TYPE_1D image, which takes only 1D views (Table 18,
VUID-VkImageViewCreateInfo-subResourceRange-01021), and a 1D view cannot sit in the slot's
Dim 2D descriptor (VUID-vkCmdDispatch-viewType-07752). So the binder wrote the declared 2D
type's neutral (PlanDiagnostic::IncompatibleBinding) and every read answered zero, outside
both measured answers (Radeon Pro 5300M: the 1D values; UHD 630: layer 0 of the array).
Now a per-slot variant keyed by the bound texture's type:
- air: Entry::open_cl_1d_images records the texture indices of an OpenCL-mode kernel's 1D
images; SpecRequest::open_cl_lines names those a 1D texture is bound for, whose parameter
keeps its texture1d type (opencl::entry) and whose operations stay 1D (opencl_1d::expand
skips a call whose texture operand is that parameter).
- The kernel states RuntimeFact::OpenClLineTexture { slot } (Mechanism::Variant) per 1D image,
in the base and the variant alike; nothing else states it.
- The compute plan puts such a slot in VariantKey::open_cl_lines where the shape binds a
Type1D (Type1DArray) texture at a 1D (array) image read by the kernel
(bind::plan::slots::open_cl_line_variant). VariantKey::lowering_inputs carries it to
LoweringInputs::open_cl_lines, the specialized-entry cache key and SpecRequest. The variant's
interface states the slot Type1D / Type1DArray, so its plan binds the 1D view and states the
same key. The answer is the 5300M's.
With the set empty (Apple's 2D bindings) canon, the SPIR-V and the VariantKey are as before;
the base artifact gains only the OpenClLineTexture facts. The reflection still states the 2D
types. No runtime source changes.
Tests: canon::tests::opencl::opencl_1d_images_bound_to_1d_textures_keep_their_1d_operations,
engine_opencl_mode::an_opencl_mode_kernel_reads_real_1d_textures_through_its_variant and
a_plain_2d_texture_slot_given_a_1d_texture_binds_the_neutral; the runtime's
opencl_mode_1d_images_read_real_1d_textures (the repro).
SEMANTICS_VERSION 2133. api_signatures blessed (5 records); REFUSALS unchanged; docs/API.md's
OpenCL images paragraph.
Also e1aba1ad67 (the repro test), 9f3b309b65 and 8f2677c0ae (compile fixes: an Idx import; every SpecRequest literal names open_cl_lines).
Verified in the lane at 8f2677c0ae: lavapipe (m3-max-35393) OpenCL-mode runtime tests 19/19, the
new opencl_mode_1d_images_read_real_1d_textures among them (it failed at e1aba1ad67, m3-max-35348:
[0,0,0,0] for [10,11,12,13]); the 2D height-1 read and write tests pass at both. air OpenCL tests
9/9 (m3-max-35386). Still running when landed: the translator's engine_opencl_mode and api tests,
clippy x3, rustdoc, executor parity (runtime_lane::executions, runtime_run), the probe comparing
the guest 2D path's SPIR-V, facts and plan at base and tip, the PHOENIX run.
RUNTIME 2425 because the runtime's variant choice moves (bind::plan::slots); no runtime source
changed. New Degradation kinds: none.
A scoped thread's start and join measured 22 to 33 us at the median on
the Ryzen 7 7840HS (PIPELINE-MAKE-THREAD, job m3-max-35318), and the
14.6 MB metallib's make 8.1 to 9.3 ms with the overlap against 14.9 to
15.5 ms without it, under a load average of 8.9 on 16 threads.
The metallib's container check takes a function's module to declare
exactly one entry point; the examples fixture declares five, and the
state's creation was refused (ContainerMismatch). The engine fixture
store_const is one kernel.
Library::from_metallib and Library::parse made a metallib in two full
passes over its bytes, one after the other: the parse checks each
function's HASH against the SHA-256 of its bitcode, then the library
takes the SHA-256 of the whole file as its content hash. On the walk's
CPU (Ryzen 7 7840HS) a make costs 0.92 ms per MB (14.6 MB in 13.5 ms),
about half of it each pass, and a guest waits for its library's make:
the walk's largest library took 121 ms at each workload pass's start.
From 1 MiB on, a metallib that is no universal file has its whole-file
SHA-256 computed on one std::thread::scope thread while the parse runs
its checks, so the two passes overlap. The content hash, the library
and the error a refused library answers are the inline path's: the
parse is the same call, its error comes back first and unchanged, and
a hash thread that cannot start or panics leaves the hash to the
inline computation after the parse. Below 1 MiB, and for a universal
file (whose content is the AIR slice only the parse finds), the path
is exactly the old one. The threshold's source is in HASHED_BESIDE's
doc: about 0.45 ms per MB spared against a thread's start and join.
Checks: tests::library_hash_beside (translator) counts the parses that
hashed beside (a test-only per-thread count, which stays at 0 without
the change) and compares a 2 MB metallib's library, field for field
and whole, with the inline path's over the same bytes (the same
metallib as a universal file's AIR slice), and a refused one's error
with the inline refusal's; tests::library_hash_records (runtime, a
device test) compares the two libraries and a state's pipeline record
from each, byte for byte.
PIPELINE-MAKE-LIBRARY prints each size's median make per MB, and
PIPELINE-MAKE-THREAD what starting and joining a scoped thread costs the
calling thread: the two figures a large library's content hash computed
beside its parse is weighed by. The profiler target goes: perf is not
permitted inside the cluster's jobs, so nothing ran it.
PIPELINE-MAKE-RECORD times what a pipeline record costs a creation where
the device has a hook: the descriptor's clone, its encoding, its reading
back and the comparison with the descriptor (medians of 256).
PIPELINE-MAKE times what a guest's pipeline compile makes on the calling
thread: the function with its constant values, the compute state, the
six properties a reply reads, and the release, for states that take back
a released variant's objects (kept) and states made while their twin
lives (live), with a pipeline record hook that only counts and without
one. PIPELINE-MAKE-LIBRARY times new_library_with_data of metallibs of
1, 256 and 2048 functions and the lookup of the last function by name.
pipeline_make_profile is a profiler target over the same makings.
The compute creation bench's kernels and helpers are shared with it.
Ignored tests; run in release under m2v_gpu or m2v_cpu_icd.
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.
What: the runtime's uniform_residual_form sets every twin's RangeAtBindOffset to 0, as it does
beside a residual read, also where the twin's stage reads under the key another word the binder
writes for it (residual::reads_other_words, from the interface's PushPlacements): a field placed in
its push range or its ArgumentTable, but a slot's SlotBindOffset residual where the key sets its
RangeAtBindOffset, and the DispatchRegion words where the key leaves the stage's MultiRegion 0 on a
variant that does not run a flat grid (a flat grid's one region reads them whatever MultiRegion
says). A root table's or execution status's address, a replay's region record, a slot's guest
base, a texture's levels and every other placed field count wherever placed. keyed_regions passes
the variant's flat_grid; the render callers pass false (render stages have no twins).
Why: RUNTIME 2419 kept a twin's key wherever no other RangeAtBindOffset of the key was 0, so a
kernel with a twinned constant view that also reads a root table's address (a pointer through an
argument buffer, dispatch_chain --binds ptr), or a multi-region region (dispatchThreads' edge
regions and group-count splits, tile and partial-threadgroup plans), or a flat grid's region kept
reading the twin at its bind offset while its thread payload stays long: the 2419 mechanism (ANV,
Mesa 26.2.6, Iris Xe RPL-P: moved arm 154.0 us through the twin against 143.1 us through the
uniform view, job m3-max-34864), whose cost is the stage's push reads (job m3-max-34063).
dispatch_chain --binds 4 reads thread_position_in_grid but dispatches threadgroups with
MultiRegion 0, so its measured twin gain (102.1 against 142.8 us) is kept.
Runtime only: no translation output, plan or artifact moves (the executor and the execution
record's plan check compare plans and artifacts, which the runtime's region keys are not), and no
creation key. Only dispatch keys of a kernel with a twin and such a word move, on the Iris profile
alone.
Docs: residual.rs's module docs and functions, keyed_regions, the workaround's profile doc and
docs/API.md section 5.
Tests: general_form's a_twin_takes_0_where_its_stage_reads_another_word (the twin zeroed where its
kernel reads another word, kept where it reads none, another stage's word ignored) and
a_stage_reads_its_region_under_multi_region_and_every_other_word_it_places (reads_other_words'
cases: MultiRegion 0 and 1, a flat grid, a residual held or not, an unkeyed residual, a root
table's address, another stage's field).
Verified in the lane (m3-max-35286, msi, at def6a68f94; each step's own exit code): clippy
-p metal2vulkan-runtime --all-targets --all-features -D warnings 0; tests::general_form 6/6;
lavapipe runtime_lane::executions + candidate::engine::runtime_run 34/34 (executor parity).
Still running when landed: clippy m2v_gpu and m2v_cpu_icd, rustdoc, the Iris A/B (a twinned
constant view beside a root table address / multi-region region, --binds 4 as control).
New Degradation kinds: none.
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.
A compute encoder kept one bind state, its last dispatch's: a dispatch of
another pipeline state than the one before read its table whole, found its
shape again and instantiated its commands again, though its own state's
previous dispatch had planned and instantiated the same. A guest's compute
workloads switch kernel at every dispatch, about one dispatch a compute
encoder (walk counts: 356,723 dispatches, 369,091 instantiations, 226 as
before, planned as before 90%).
LiveDispatch now sets aside the states of up to live_bind::SET_ASIDE (7)
pipeline states dispatched before its last dispatch's, each with its shape,
listing count, ReadFrom, DispatchMemo and Instantiated, under the pipeline
state that left it (held weakly); a dispatch starts from its own state's.
They travel as the state does: parked in the command buffer for its next
compute encoder, given to the device's spares at the commit, every memo let
go there and its sampler states unlisted where the state's are.
live_bind::start_from is the rule both encoders' select share (render's
select now calls it; same choices).
Exact as a draw's: whichever state a dispatch starts from, every field is
brought in place from the encoder's table at that dispatch; kept commands
only while no value kind their plan reads moved since that state's last
dispatch; a memo entry only where every input it compares holds.
WorkCounts: dispatches_from_set_aside, and its split set_aside_commands_kept
/ set_aside_commands_instantiated. Test: tests/compute_set_aside.rs (three
states in turn, an encoder each, within and across command buffers; a
moving output instantiates again; changing setBytes keeps its commands with
the right words; the entry's bytes bounded).
Also 260b91e6b8: dispatch_chain: --states K, dispatch n of a command buffer of the host's time sets state n % K
A program whose dispatches each run a kernel of their own sets another
compute pipeline state for each: --states K makes K states of the
kernel, one creation each from the same function, and dispatch n of a
command buffer sets state n % K (with --host). The HOST line names K.
Bench only; compiled in the dispcall lane's first build job.
Verified in the lane at 1d48a48e1a: msi m3-max-35257 clippy -p metal2vulkan-runtime --all-targets
--all-features -D warnings 0; lavapipe (m2v_cpu_icd, debug) compute, carried, draw_again, live_bind and
compute_set_aside 97/97 (three states in turn, one encoder a dispatch: CB1 instantiated 3, from
set-aside 9, kept 9; CB2 instantiated 0, from set-aside 12, kept 12; words checked; offsets moving
instantiate again 9; setBytes changes keep commands with the new words); api_signatures re-blessed
(+3 WorkCounts fields); release dispatch_chain build m3-max-35261. Still running when landed: the
negative control, PHOENIX compute suites, the PHOENIX bench before/after, clippy m2v_gpu and
m2v_cpu_icd, rustdoc.
New Degradation kinds: none.
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.
What: two doc sentences. carried_store_failures (in_place_check.rs) says it carries a store
failure whatever memory the classes' check pages lay in, and copies_verdict (in_place.rs) says the
store carry crosses memory of any flags, unlike its own same-flags rule (RUNTIME 2417).
Why: the two carries point opposite ways. A carried copies' failure lends a render target's
padding and lies it in place, so it needs evidence measured through memory of the same flags. A
carried store failure makes a class's textures shadows, which keep every byte, and the class
whose own rounds see the line write-back least is the one whose pages the CPU maps uncached,
which the memory's flags need not say: ANV maps its exported memory uncached whatever the type,
and the Iris's dma-buf class passed storage writes inside lines in one fresh check of three for
that reason (aadc115900). Applying 2417's rule there could only turn a carried failure back into
a pass. Decided with the orchestrator: no behaviour change, no CHECK_VERSION bump.
Verified: rustdoc -D warnings of the runtime crate (the job named in the lane's report).
What: corpus/authored-compile.tsv re-blessed at the pin candidate 44505b3807 (m3-max-35212): 2369
cases over 21 profiles, 49749 cells, failed 0, differences 0, regressions 0; 2016 rows take the
artifact digests of ENGINE_EXECUTOR_ABI vulkan-engine-v183 (the executor classes buffer lengths
under the device's range limits, 6e6762cf37..175706d3f2).
Why: the census currency check reads the executor version the table was blessed at (v182 until now).
Verified: census wall 214 s, slowest compile 3.3 s, peak worker RSS 234 MB; golden bless
m3-max-35211 at the same sha changed no byte.
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.
What: the recycler's buffer bounds keep 64 MiB and a second, and now admit 1024 buffers, the bytes
bound over the upload arena's largest chunk (upload::CHUNK_BYTES), where they admitted 64. Of the
parked buffers, at most 64 may hold an allocation of their own (Placement::holds_allocation: a
dedicated block, an import of their own pages), the earliest parked of those going first past it
(one no take handed out first); the images' bounds are unchanged (32, any of them alone).
Why: a kernel's unbound written device slot takes a fresh 64 KiB region a dispatch (by design: it
may be stored through), past half the arena's chunk, so one dedicated 64 KiB VkBuffer a dispatch.
Its command buffer's chunks parked as it completed, but the count bound of 64 destroyed all but
64, and the next command buffer of 256 such dispatches made 192 new VkBuffers (the Iris probe
m3-max-35104: 34.5-41 us encoded a dispatch against 19-21 us with the slot bound or read-only,
192 VkBuffers made a round). The bytes (16 MiB) were well inside the bytes bound. Every parked
buffer that holds its own VkDeviceMemory counts against maxMemoryAllocationCount, so those stay
at today's 64: the larger count admits only buffers of shared blocks, which add no allocation.
Tests: tests::recycle_bounds (CPU, the recycler's book): 256 chunks park whole and the next 256
takes find them all, 1024 park and the 1025th evicts the earliest; 64 own-allocation buffers park
beside 100 of shared blocks, two more evict the two earliest own ones and no shared one.
tests::neutral_zeros_shared::steady_dispatches_with_a_written_slot_unbound_make_no_vk_buffer
(device): command buffers of 256 dispatches with the written slot unbound make 0 VkBuffers once
the first's chunks parked, and recycle at least 256; it prints the host time per dispatch against
every slot bound.
Verified in the lane (m3-max-35234, msi, at ee16b6d58d; each step's own exit code): clippy -p
metal2vulkan-runtime --all-targets --all-features -D warnings 0; tests::recycle_bounds 2/2;
lavapipe (m2v_cpu_icd) neutral_zeros_shared 6/6 (steady test: first command buffer 256 made, the
3 steady ones 0 made and 256 recycled each); lavapipe recycle, recycle_bounds, upload_chunk_zeros,
idle_sweep, posted_frees, fresh_pages, churn_counts, clip_bursts, managed_copy_device,
exported_textures, submit_check_device, storage_form_recycle 73/73. Still running when landed:
the Iris timing run, clippy m2v_gpu and m2v_cpu_icd, rustdoc.
New Degradation kinds: none.
The 5080 run of the landed fix (b5080 batch m3-max-35075, entry nvinimport-inimport-212418,
615.71.09) passed both tests (TESTS_5080=0), but the main test took the elsewhere branch: "the
buffer's pages in one import dedicated to nothing false (imports dedicated to the buffer 1); the
texture in place false: in the import 0, dma-buf images 0, their imports live 0, source calls 1".
The driver imported the 72 KiB buffer's dma-buf dedicated to the buffer as it did the 24 KiB one,
so the 64x128 size, chosen so that 615.71.09 would take the import dedicated to nothing, bought
nothing there; the module docs said it did.
The texture is 64x32 again, and the docs state what the 5080 measured: a buffer's dma-buf of one
page, or of 72 KiB, imported dedicated to the buffer alone there, though the class's check
passed over the device's own exported memory. The premise gate and the stand-in test stay.
Verified: build, clippy and the two tests on lavapipe in the job that builds this commit.
What: views_told_apart takes the device's BufferRanges and sets every stage table's
buffer_ranges to them, so the executor's bind states state the length class the runtime's
states of the same binds state (RUNTIME 2412 rounds a buffer's class under
BufferRanges::of(limits); the executor kept the defaults, which tell every class apart). The
compute, render and mesh builders (bind_state, compute_shape, graphics::bind_state,
render_shape, mesh_shape) take the ranges; the executor passes its device profile's limits
(case_compiles from the worker device, platform run/execute from the opened device), the
runtime-lane tests their compile device's, and the unit tests the defaults. ENGINE_EXECUTOR_ABI
goes to vulkan-engine-v183: every executed artifact whose plan binds a buffer changes digest.
Why: a BindingPlan states its bound length class (BoundKind::Buffer), so the runtime path's plan
digest differed from the executor's and from the authored compile census's on every device:
candidate::engine::runtime_run's parity (run.census.artifact == on_context.census.artifact)
and runtime_lane::executions' plan digest check failed on lavapipe and the Iris. With both on
the device's ranges the executions test is back to its single digest equality, and the earlier
split of compute_state for its decision-only comparison is folded back.
The authored compile census owes a re-bless after this landing (executor ABI and digests
change); it is re-blessed once, at the next pin sha.
Verification: a lavapipe (cpuicd) job runs the three runtime_run tests, executions, and the
touched engine, graphics, public_cases, argument_buffer_members, worker::compile and
runtime_lane suites, plus a negative control (views_told_apart on default ranges) that must
fail the runtime_run parity; results go to main with the job id.
runtime_lane::executions::the_execution_record_names_each_dispatchs_compiled_pipeline compared the
runtime's plan of its recorded bind shape with the executor's plan of the case, digest for digest.
Since RUNTIME 2412 the runtime's tables carry the device's BufferRanges, so its shape rounds each
buffer's length class up, while the executor's bind state keeps the default ranges (exact
classes), as 2412 meant, to leave executor digests and the compile census unchanged. A plan states
the class it bound (BoundKind::Buffer's length_class, for its instantiation's kind check), so the
two digests differ while every decision is the same (round 5974320352's Iris lane: runtime
[167, 4, ..] against the executor's [199, 127, ..], which was the runtime's before 2412).
The test now plans the executor's case state with each table's buffer_ranges set to the device's
(BufferRanges::of), as the runtime classes lengths, and requires that digest to be the runtime's;
and requires the executor's own plan to make the runtime plan's decisions: its variant,
specialization and descriptor writes. engine::compute_state is compute_shape's state before its
shape, so the test builds it as the executor does. Test only; the executor's shapes, plans and
artifact digests are unchanged.
On RADV PHOENIX (job m3-max-35102) the one-pass case's heap texture is an optimal image, and
252 of its 256 texels read other than the buffer's bytes under them: an optimal image's texels
lie in its own layout over the memory, which Vulkan does not define, nor Metal for a heap's
aliasing resources. The case now asserts the texels only over a linear image (the buffer form
on every device, the heap form where its image is linear) and prints the rest.
Verified: the same run's buffer form read every texel right; lavapipe (m3-max-35085), whose heap
image is not linear either, matched only by its layout.
The 5080 lane's red in round 5974320352 (m3-max-34982):
runtime_lane::grouped_submissions::a_command_buffer_committed_behind_running_work_is_scheduled_while_its_group_is_held
failed on the runtime's notice metal2vulkan-queue-limits-reached: "the program's command queue 2 on
a round robin of 1 VkQueue(s), took VkQueue 0, which another took, where the plan's 14 give it one
of its own: the device's queue limits (DeviceOptions::queue_limits) changed that". Those are the
lane's own limits (LANE_QUEUE_LIMITS, round_robin 1), not the driver's: RUNTIME 2405 gave
behind_running_work a second command queue (A's calibration on a queue of its own) and not its
device the plan. LANE_QUEUE_LIMITS's contract is that a test whose work places a second command
queue makes its device at the plan (at_plan), and the harness fails on the notice by design; every
other two-queue helper in the file already does. Only a family of several queues shows it (NVIDIA's
16); on the Iris, lavapipe and RADV the round robin's family has one queue and the limits change
nothing. All three callers (the plain and the consumer-carried held-behind tests, and
the_exact_completion_keeps_no_group_behind_running_work) take the fix.
The adjust calls at_plan(options), with a doc line saying why.
Verified: build and clippy in the job that builds this commit; the three tests on an NVIDIA family
of several queues (the 2080) through main.
The Iris lane's red in round 5974320352 (m3-max-34993):
runtime_lane::in_place_textures::a_failed_check_keeps_the_shadow_and_no_record found 128 verdicts where
VERDICTS said 112. VERDICTS was seven classes x eight accesses x two row ends; RUNTIME 2409 added a
class, DmaBufInImport, and the report gives every class on every device, so it is 8 x 8 x 2 = 128.
The report in that log lists DmaBufInImport's verdicts, each Failed as the test forces.
VERDICTS is 128 and its doc names the eight classes. The runtime's PagesClass::ALL is
crate-private, so the lane keeps the count.
Verified: the lavapipe run of the test, in the job that builds this commit.
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.
What: on a device whose driver has DriverFact::ImageUsesMissBufferWritesInOneCommandBuffer
(NVIDIA's 620.70.06 on the RTX 3090), an inline pass's last instance may now stay open, and
the next render encoder may continue it, as on every other device. Before it continues,
EncoderCore::continue_pass checks the group's byte writes (FoldOrder::byte_writes, the
leader's summary or the group's order) against every image the continuing pass uses:
its draws' images (AliasWrites' images noted apart), its attachments, and the uses of the
copies and steps before its later instances (render/inline_splits.rs, waiting_uses), all
of which record into the tail after what the group wrote there. Where one meets, the pass
begins its own instance in its own VkCommandBuffer, the measured form, counted in
WorkCounts::command_buffers_split_at_aliases. Where none meets, it continues and takes
the group's writes as its own (AliasWrites::continues), so what it records into the tail
after its pass is checked as a joining encoder's is.
Why: continuation cut the glass-panel frame's GPU time 11-26% on the 780M and Iris but was
off on the 3090. The open instance itself never holds a buffer write: its draws touch only
attachments, and anything else that records into the tail ends it first. The tail before
it can hold one, though (the leader's earlier inline instances and what records between
them), so the check is what the fact needs.
Also: render_fold's Lane::continuing (622368ab37) goes, since its lanes continue on every
device now. A test-only DeviceShared::aliases_split_forced lets lavapipe take the 3090's path.
New tests: tests::alias_split's continues unit test; tests::alias_split_device's count case,
a copy out of a texture after a continuation, a later instance of one pass reading an
earlier one's buffer write, and a texture over another buffer of the same host pages
(the last two are byte cases for two possible gaps on the 3090).
Also e818e7b442: Continued passes: a pass's uses of bytes count in the alias check, as an aliasing texture's are.
What: AliasWrites notes the bytes of buffers that the commands noted apart use (bytes_apart).
AliasWrites::continues now refuses a continuation where those bytes, or a Bytes use among
the pass's other uses, meet the group's byte writes, besides its images.
Why: a texture whose linear image aliases a buffer's bytes (Storage::Alias) names them as
the buffer's bytes (Texture::image_use), not as an image range. The lavapipe run with the
split forced (m3-max-35002) showed a pass sampling such a texture over bytes the leader had
just written continuing anyway: (1, 1, 1, 2, 0) where (2, 1, 0, 3, 1) was expected. A
continuation is refused rather than guessed at: a draw that reads, through a buffer, bytes
the group wrote also begins its own instance on such a device.
Tests: the count case now reads the written bytes through a texture over a buffer and
And dae7c2cad8: alias_split_device: the counted and copy-after cases read a texture over a buffer alone.
Verified in the lane (m3-max-35085, msi, at dae7c2cad8): clippy -p metal2vulkan-runtime --all-targets
--all-features -D warnings exit 0; lavapipe (m2v_cpu_icd) alias_split and render_fold 36/36; the
count test forced: written read (2,1,0,3,1), quiet read (1,1,1,2,0), unforced (1,1,1,2,0), texels
right. Still running when landed: the 3090 correctness job (alias_split, render_fold; F1-F3 byte
cases), PHOENIX render suites, clippy m2v_gpu and m2v_cpu_icd, rustdoc, the 3090 glass A/B.
New Degradation kinds: none.
--heap placed the words and zeros in a no-copy Placement heap made with
ResourceOptions::shared(), whose hazard tracking mode is Default: a heap's
Default resolves to Untracked (heap.rs, as Metal resolves it), and so did
every buffer placed in it. Metal leaves untracked resources unordered
between encoders (the program orders them with fences), so the shapes of
several encoders over the words (encoders, blits, loads) raced: the
tracker leaves untracked uses out of an encoder's summary and the host
alias uses of the RAM's key carry the same tracked: false, so no barrier
went between the encoders, and on RADV they overlapped. xtxhost's
'encoders: word 0 is 243, not 900' (PHOENIX; 157 of 900 with --binds tex,
1210 of 7200 on the XTX) is about one increment a command buffer of six
dispatches, a race's signature; one serial encoder and one dispatch a
command buffer passed, as Metal orders those even for untracked memory.
Lavapipe and MoltenVK ran the shapes serially, which hid it.
The heap is now Tracked: Metal tracks a tracked heap's resources as one,
so the encoders over its words are ordered as the plain shapes' tracked
words are, and --heap differs from them only by the heap over host pages
(still a copy beside the RAM's import, copied-host-pages). No runtime
change.
Verified in the heaplost proof job: the bench at the previous commit
(untracked heap) and at this one, --heap --only encoders and --binds tex,
on PHOENIX and lavapipe, with the command barriers each counted.
A failed word check returned before the shape's CHAIN/HOST lines and counts,
so a run that lost words showed no counts (barriers, folds, copies) to read
the loss by. Each shape now prints its lines, then checks the words; a failed
check still fails the run with the same message.
Bench only; no runtime change. Built and run in the heaplost proof job.
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.
What: a new public BindingPlan::read_only_buffer(&DescriptorWrite): true for a uniform buffer and
for a uniform view's storage twin (DescriptorView::UniformWithStorageTwin, PlannedBuffer::twin),
which no function stores through. The runtime asks it where it used to read the descriptor type
alone (binding::descriptor's neutral arm, make_neutrals, binds_own_zeros), and makes the device's
zero buffer a storage buffer too, so a twin bound to nothing binds it.
Why: on the Iris Xe RPL-P profile (DriverWorkaround::PushReadsLengthenThreadPayload) RUNTIME 2413
gave a kernel's constant slot a storage twin. Left unbound, the plan writes the twin from the
ZeroBuffer neutral at a STORAGE_BUFFER binding, which the runtime took for a writable binding: every
dispatch took a fresh 64 KiB upload region, a dedicated VkBuffer allocated and zeroed, held until its
command buffer completed. Round 5974320352's Iris leg:
neutral_zeros_shared::dispatches_share_the_devices_one_zero_buffer, 8 dispatches made 8 VkBuffers
and 16 made 16.
Translation output and plans are unchanged (no SEMANTICS bump); the API addition is blessed in
api_signatures.tsv, and docs/API.md section 5 says it.
Test: engine_access::an_unbound_constant_slot_s_storage_twin_is_a_read_only_write plans
buffer_end_byte_load_constant with nothing bound on intel-irisxe-rplp-anv (the twin's STORAGE_BUFFER
write read-only, the written slot's not) and, as the negative control, on four other profiles (no
twin; read-only exactly at uniform buffers). The device check is the neutral test itself on the
Iris, which fails at the base.
Also, test premises on the Iris profile (round 5974320352's iris:runtime reds):
- a20c0a26d8: the compute creation test counts the forms its profile makes (1 + keyed storage views
since RUNTIME 2410) and holds the pool only where completion is bounded (under Exact the second
form runs on the pool).
- 88b8d31a32: set 0 at offsets counts the pipeline binds (draws past offset 0 take the residual form)
and the push after each where the driver forgets pushed descriptors after a pipeline bind.
Verified in the lane (msi): m3-max-35051 clippy -D warnings -p metal2vulkan -p metal2vulkan-runtime
--all-targets --all-features exit 0, translator tests 71/71 (api_signatures 3/3); m3-max-35053
lavapipe (cpuicd) deferred_calls, neutral_zeros_shared, set_zero_at_offsets, uniform_bind_offsets
43/43. Still to run: clippy gpucfg and cpuicd, rustdoc, ONE Iris run of the three tests.
New Degradation kinds: none.
The RTX 5080's red in round 5974320352: tests::dma_buf_in_import::a_texture_over_a_dma_buf_buffer_s_pages_binds_in_its_import
asserted the texture in place because the DmaBufInImport check passed its reads, yet the texture took no
image. The product was right; the test's premise was short.
The route binds the image in the buffer's import only where the buffer's pages lie in one import
dedicated to nothing (HostPages::in_one_dma_buf_import). NVIDIA's 615.71.09 refuses small dma-bufs
dedicated to nothing (it refuses a page's and takes 64 KiB: dma_buf.rs's ram_takes_dma_bufs), so the
test's 24 KiB udmabuf was imported dedicated to the buffer, which binds no image
(VUID-vkBindImageMemory-memory-10926). The check passed because its buffer is 40 MiB of the device's
own exported memory, imported dedicated to nothing: its verdict says what such an image does once
bound, not whether a given buffer's import holds one. The fallback, an image over a dma-buf of the
texture's own pages, was refused too: NVIDIA lays an explicit plane 512 bytes into a page out at
offset 0 (the 3090's PLANE-OFFSET probe), so the image binds at an offset of an undedicated import
of its own ~20 KiB dma-buf, which 615.71.09 refuses as small. The texture read its texels through
its shadow form.
The change, in the test alone:
- The in-import assertions run where the class's verdict passed and the buffer's pages lie in one
import dedicated to nothing, the making's own question; elsewhere it asserts no image in the
import and prints whether the import was dedicated to the buffer.
- The texture is 64x128 (64 KiB of rows), so the buffer's dma-buf (72 KiB) and the control's own
image dma-buf (68 KiB) are of a size 615.71.09 imports dedicated to nothing: the route and its
control run on the 5080 rather than skip.
- A second test, the same body with Memory::undedicated_import_refusal (the stand-in for 615.71.09's
refusal that no_pointer_import uses) set before the buffer: its import is dedicated to it
(dma_buf_buffer_imports_dedicated + 1, no one import dedicated to nothing) and no image binds in
it. Under the old premise it fails where the class passed (lavapipe, Iris, the 5080) as the 5080 did.
- The in-place assertion names the counts it saw.
No product change, no new Degradation kind or WorkCounts field.
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.
On ANV (Mesa 26.2.6, Iris Xe RPL-P) a kernel's uniform view with a storage twin read the twin at
its bind offset wherever its own key held, also beside a storage view bound past offset 0, which
keeps reading its pushed residual word. There the thread payload stays long, and the twin's
per-lane storage read cost more than the uniform view's block read at its residual:
dispatch_chain --binds moved ran in 153.96 us a dispatch against base's 143.14 (job
m3-max-34864, 7 interleaved rounds, medians; ref's branch-free storage module 154.01), while
--binds 4, fixed and tex gained 28 to 38 %.
The runtime's uniform_residual_form now sets every twin's RangeAtBindOffset to 0 too where
another RangeAtBindOffset constant of the key is 0 (uniform_residual_form_of): a storage view
bound past offset 0, a twin at an offset no alignment divides, or a uniform view of no twin. The
kernel then reads its uniform views at their residuals, as base does. Where every view holds its
key, nothing changes.
Runtime only: no translation output moves, and no creation key (a creation's prediction binds
nothing, so its storage views and twins all hold). Only dispatch keys of a kernel with a twin and
a view off its bind offset move, on the Iris profile alone.
Docs: residual.rs, keyed_regions, the workaround's profile doc and docs/API.md section 5.
Test: general_form's a_twin_keeps_its_key_only_where_no_other_view_reads_its_residual (fails
with the cut sabotaged, the negative control in the check job).
Verified in the lane at 6d68983cc6: release build of the runtime and its dispatch_chain (m3-max-34932,
BUILD=0). Still running when landed: clippy plain, m2v_gpu and m2v_cpu_icd, rustdoc, the touched
runtime tests and the negative control (34931, 34933), the runtime suite on lavapipe, and ONE Iris
A/B of the arms and native code (base bcd50aba9f / opt2 680fc8997e / cut 6d68983cc6).
New Degradation kinds: none. Fixes the opt2 (SEMANTICS 2132 / RUNTIME 2413) regression of the moved arm.
What: the lane's Read counts WorkCounts::attachment_reads_through_copies, which every path a
draw takes counts, in place of attached_read_slots, which only a draw that takes every step
counts. Read's doc and the module doc say why: the read of the texture over the attachment's
bytes is a draw of the first read's state, whose kept draw the queue carries into its encoder
(render/carried.rs), so it is rebound (render/draw_again/rebound.rs), except in builds with debug
assertions, where the first carried draw rebound takes every step to check the rebind.
Why: the PHOENIX release failures (m3-max-32457, m3-max-34675: copied_slots 0, announced 1). The
probe f730cfe9c1 (not landed) printed each read's path counts on gem10's Radeon 780M
(m3-max-34911, load 11-15, 3 runs per build): built for release, the over read is a carried
rebound (draws_rebound_carried 1, draws_rebound 1, attached_read_slots 0, through copies 1,
announced 1) in 3 of 3 runs, so the old counter fails there; built with debug assertions, it
takes every step (attached_read_slots 1, draw_shapes_carried 1) and the debug check logged one
rebound checked (KEPT-IDENTITY-CHECKS, m3-max-34877). The draw reads the texture's copy on both
paths. Verified: the new counter reads 1 on both builds' over read.
What: the third part of dma_buf_pages_go_on_a_handler_thread_as_a_command_buffer_completes (busy
work, a copy out of the buffer's old pages, the rebind away from them) runs under
busy_premise::until_premise_held, as device_copies' and first_use's busy steps do. A try whose
busy work ended before the rebind writes its DMA-REBIND step times as a LANE-BUSY-MISS line and
runs again with new pages and new busy work, at most three tries. Every try checks the bytes the
copy read and the busy work's end. Only a try whose premise held checks that the old pages stayed
while the copy was in flight and went on a runtime thread: where the copy completed before the
rebind, the rebind frees them on the test's thread. A call that waits for the busy work misses
every try, and the test then fails with each try's times. busy_premise's doc names the step and
its measured times.
Why: round 4334fadfdc's PHOENIX leg failed it ('the busy work ended before the rebind') inside a
513-test suite, the test taking 3.43 s where it takes about 0.7 s alone. The step times show no
wait on the busy work at that tip or at today's: at 4334fadfdc (m3-max-34877, gem10's Radeon
780M, load 19-21, 3 runs) the busy work committed in 6-54 ms, the copy's commit 0.3-5.8 ms later,
scheduled() 0.2-2.8 ms after it and the rebind 0.4-1.3 ms after that, the end mark 0 at every
step; at 44708b4c3e and 95f8d61a48 (m3-max-34783, m3-max-34807, um790's 780M, 6 runs) the rebind
returned 5-8 ms after the busy work's commit, 45 ms once under load. So the host outlasted the
busy window: the premise, not the runtime.
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.
The check's DmaBufInImport class makes its pages exactly as DmaBuf's
(dma_buf_pages, plus the gate that its buffer lies in one import dedicated
to nothing), and a copies round puts no image over the pages: its copies
rounds repeat DmaBuf's over pages made alike. At its copies turn it now
takes DmaBuf's copies verdicts for both row ends, and runs no rounds of its
own, where DmaBuf's were measured this run or known before (passed or
failed) and both classes' noted memory flags are known and equal, the
same-memory-type rule of RUNTIME 2417's crossing; otherwise its own rounds
run as before. The note names the source verdicts and the flags
("DmaBufInImport copies: DmaBuf's verdicts, Failed and Passed for rows on
lines, its pages made as DmaBuf's in memory of property flags 0x..: no
rounds of its own"). A shared failure is a proof for pages made alike; a
shared pass is one draw of the rounds' race fewer, which errs to the shadow.
CHECK_VERSION 22: a record of 21 may hold the in-import class's own copies.
Tests: tests::in_place's unit test of shared_copies (shared where measured
and memory alike; the control: coherent against cached either way, either
memory unknown, a row end unchecked or pending, every other class: none);
tests::in_place_check's device count (the shared note once and no rounds of
its own where the rule holds, the dma-buf class's verdicts taken; printed
with both classes' memory and the check's wall time).
Also 00ba762437 (test only): the lent targets' test prints every host class's memory on a device made
with VK_EXT_external_memory_host too (LENT-TARGETS-POINTER lines).
Verified in the lane (m3-max-34930, msi, at 937274ec72): runtime clippy --all-targets --all-features
-D warnings plain, m2v_cpu_icd and m2v_gpu exit 0; touched tests 39/39; gpucfg archive built.
On the Iris Xe (RPL-P, m3-max-34910 at 00ba762437): lent_dma_buf_targets passed; Pointer, Fresh,
DmaBuf and DmaBufInImport check pages all lie in memory of flags 0xf. Still to run: the PHOENIX
check wall time base against tip, and the Iris count test with the in-place suite.
New Degradation kinds: none. CHECK_VERSION 21 -> 22: every device runs one fresh in-place check.
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.
On the Iris Xe walk, a game engine's renderer made 73 RGBA16Float render
targets with free rows' padding over a no-copy buffer's dma-buf pages, and
each was a shadow: their renders failed for rows that end inside a line,
and the dma-buf classes' copies' verdict they lend that padding by
(`in_place::lent_to_copies`) was not failed in the recorded check, while
fresh checks fail it. A class's rounds catch a copy's line write-back only
as often as the CPU's writes race it, so the verdict hangs on a race.
The lend's copies verdict (`in_place::copies_verdict`, through
`InPlaceChecks::decided` at every decision site) now takes another host
class's copies failure, its reads passed, where the class's own kept every
byte or was unchecked, but only where the check's pages of both lay in
memory of a type of the same VkMemoryPropertyFlags as the driver reports
them: a write-back measured through memory of other flags says nothing of
this memory. Each class's memory flags are noted by the check and kept in
its record (CHECK_VERSION 21, eight words more). A shadow that renders with
free padding over host pages names the copies verdict it took in its
shadowed-texture notice. The line-write-back reason and docs (FAST-PATHS
host-pages row and the Iris known gap, API.md section 1 and the catalogue,
the kind's rustdoc) say so.
Tests: the unit test of the rule on the exact shape (same memory in place,
coherent against cached apart in both directions a shadow, unknown memory,
reads not passed, own-memory classes, own failed or pending kept, the
record's memory words); and a device test over a no-copy dma-buf buffer
(tests::lent_dma_buf_targets) whose control notes the pointer class in
memory of other flags and keeps the shadow.
Also 6e1f7b369d: the lend's memory flags are compared and printed as raw bits (ash's
MemoryPropertyFlags has no Debug impl here; clippy's chunks_exact_to_as_chunks).
Verified in the lane (m3-max-34875, msi, at 6e1f7b369d): runtime clippy --all-targets --all-features
-D warnings plain and --cfg m2v_cpu_icd exit 0; tests::in_place, tests::degradation*,
tests::texture_placement 38/38. Still to run: the device test on the Iris, PHOENIX and lavapipe
in-place suites, a sabotaged-build negative control, clippy m2v_gpu, rustdoc.
New Degradation kinds: none. CHECK_VERSION 20 -> 21: every device runs one fresh in-place check.
The authored compile census's expectations at b9cf2070a4, every profile (m3-max-34868, release):
cases 2369, profiles 21, cells 49749, compiled 48670, refused 1079, failed 0, regressions 0,
differences 84, moved artifacts 4303. Rows moved: intel-irisxe-rplp-anv 1897 and its robustness-off
leg 1947 (the RPL-P-only push payload workaround, an unbound storage view taking offset 0's key, and
the kernel storage twins: SEMANTICS 2131/2132); one case's artifact on gate-lavapipe (+x86_64),
amd-780m-radv and nvidia-rtx5080-laptop, each with its robustness-off leg (6 rows). No outcome moved
between compiled and refused.
Wall 132.5 s; slowest compile 817 ms (intel-irisxe-rplp-anv+robustness-off); slowest case 22.4 s
over all its profiles; peak worker RSS 229.5 MB (500 MiB ceiling); peak case-worker RSS 393.4 MB.
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.
A no-copy buffer's, heap's or rebind's request longer than the device's
sparse granule asked every chunk at a multiple of the granule (64 KiB on
RADV of Mesa 26.2.4), one chunk included. That rule was ours: one chunk
is bound to a plain buffer, which vkBindBufferMemory takes at any
multiple of the buffer's memory alignment (VUID-vkBindBufferMemory-
None-10739). The granule binds only an answer of several chunks, as a
sparse buffer is bound at multiples of its alignment in both the buffer
and the memory (VUID-VkSparseMemoryBind-resourceOffset-09491). So a
consumer whose guest buffers lie in a 64 MiB region's dma-buf at page
offsets off 64 KiB (15 of 16 such starts) answered them with dma-bufs of
their own, each one more import on every RADV kernel submission's list.
Expected effect on the consumer (reims's diagnosis of 1910 refused asks
on the 780M, m3-max-34841): only the 212 asks that are one run of pages
inside one region (30 of them 2 MiB heaps) were refused for this rule
alone; about 33 of their objects are live at a time, about 7% of the
~450 imports on each submission's list, and the walk's dma-buf imports
fall about 4092 -> 3900. The other 1698 asks are scattered 4 KiB guest
pages (runs per ask p50 6, 1317 crossing region ends): no piece of a
region holds them (a plain buffer is one range of one memory) and no
split does (the 64 KiB granule needs 64 KiB-aligned runs), so they stay
dma-bufs of their own.
DmaBufRequest gains one_chunk_alignment (the host page, or the plain
dma-buf buffer's memory alignment where larger; it divides alignment
and equals it where the granule is the length); a lone chunk is checked
against it, several against alignment, as before. Answers valid before
stay valid. The rustdoc and HOWTO say how a source picks between them.
How it is verified: tests::dma_buf_shared_files::one_piece_off_the_
granule_binds_a_plain_buffer_at_its_offset (the previous commit's,
refused Invalid without this one) and two_pieces_off_the_granule_are_
refused (its control, refused before and after) on a device whose
granule is coarser than the page (PHOENIX, RADV); tests::one_piece_bench,
a release bench of submission cost with 128 buffers over one region
answered by each rule. The evidence is in the lane's report.
Also: 51768bf6ab (tests: one piece off a device's sparse granule is taken; two such pieces stay refused),
and an ignored release bench, tests::one_piece_bench.
Verified in the lane (m3-max-34863, msi, same tree as 832c48ad2c): api_signatures 3/3; lavapipe
-E 'test(/dma_buf/) | test(/host_memory::a_source/)' 76/76 (lavapipe's granule is a page, so the two new
tests print "shows nothing" there); clippy m2v_cpu_icd --all-targets -D warnings. Still running when
landed: PHOENIX (64 KiB granule) base refusal, tip suite and bench; clippy plain and m2v_gpu.
API: adds the field DmaBufRequest::one_chunk_alignment (additive; a source that checks alignment alone
still answers validly).
SEMANTICS 2132 (765997d91f) declares a storage twin beside each kernel uniform view on the Iris RPL-P profile. The re-bless on the M3 (m3-max-34860 at fc6562aa97: bless_engine_inventory, bless_golden_hashes, bless_engine_goldens all 0) moves 347 rows, every one in the intel-irisxe-rplp-anv column alone; no other profile's cell, no key added or gone.
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.
What: a render pass's end, which works out whether its last instance may stay open for the next
render encoder (encoder_fold.rs's Continued passes), allocates nothing for it:
- a framebuffer holds its attachments' views in place (render_target::AttachmentViews, at most
each color and its resolve, the depth/stencil attachment and its resolve), not in a Vec copied
from the list it was made with, and render_target::PassKey holds them so too;
- the key goes by value (EncoderCore::continuable, OpenPass, State::open_pass), not in an Arc;
- InstanceShadows::touches_alone holds each of its draws' uses against the attachments' keys as
they stand where no use takes another (HostAliases::takes_none), with no list of either; where
the device's host aliases are live, as before.
Why: round 4334fadfdc's PHOENIX and Iris lanes failed
frame_costs::a_frame_s_draws_and_pass_ends_allocate_within_their_bounds at 20.19 allocations a
pass end, past its bound of 19. RUNTIME 2404 (09a3f0505b) added the key at each pass end: the
attachments' uses listed, the draws' uses collected, the framebuffer's views copied into the key,
the key boxed in an Arc, each per pass.
Verified: in the lane (counts follow).
Also: be328d1804 (the dma-buf lane prints the rebind step's times; test only).
Why: fix forward for RUNTIME 2404 (09a3f0505b): every pass end allocated an Arc'd PassKey whose views
were a Vec, and touches_attachments_alone collected the attachment uses into Vecs, so
runtime_lane::frame_costs::a_frame_s_draws_and_pass_ends_allocate_within_their_bounds failed (20.19 and
20.91 allocations a pass end against a bound of 19; round 4334fadfdc PHOENIX and XTX, m3-max-34783).
Verified in the lane: PHOENIX (m3-max-34783/34807): base b650408113 16.15 / 6.24 allocations a pass end /
a draw; 44708b4c3e 20.91 / 6.37, red 3 of 3; the same product diff on it 16.15 / 6.24, the four frame
tests 3 of 3. lavapipe (m3-max-34811): render_fold 25/25 at base and tip, and the 21 distinct
RENDER-FOLD lines (every continuation and wrong-texel count) identical between bcd50aba9f and the tip.
Still running when landed: clippy x3 and rustdoc (m3-max-34799).
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.
The consumer asked for the time its dma-buf import calls take: each
vkGetMemoryFdPropertiesKHR and vkAllocateMemory of a dma-buf import, and
each piece's join of a live shared import.
Three new WorkCounts fields:
- dma_buf_import_calls: imports of dma-bufs of host pages tried, made or
failed, wherever made (buffers', heaps', rebinds' chunks, shared files'
imports at a first piece, ahead by a handle or again after the
residency released them, guest RAM chunks and run lists, images).
- dma_buf_import_nanos: their nanoseconds, on the threads that made them.
- dma_buf_join_nanos: the nanoseconds of the joins dma_buf_pieces_joined
counts (a map look and a hold, no driver call).
Every import goes through one timed helper (Device::import_timed) that
queries the dma-buf's types and imports it; the four call sites (a
chunk of its own, a shared file, the two image imports) use it.
Verified: the shared-file tests assert one timed import and a positive
join time for four buffers over one file, and four timed imports with
no join time for four dma-bufs of their own.
Why: the consumer's ask (reims dmabufapi): their A/Bs could not report the time the dma-buf import
calls take from WorkCounts.
Verified in the lane (m3-max-34812, msi): clippy -D warnings -p metal2vulkan-runtime --all-targets
--all-features; api_signatures 3/3; lavapipe -E 'test(/dma_buf/)' 73/73: four buffers over one shared
file count import calls 1 with nanos > 0 and 3 joins with join nanos > 0; the control (four dma-bufs of
their own) counts import calls 4 and join nanos 0. Still running when landed: clippy m2v_gpu and
m2v_cpu_icd, the PHOENIX dma-buf suite.
API: adds the fields WorkCounts::dma_buf_import_calls, dma_buf_import_nanos and dma_buf_join_nanos (additive).
RUNTIME 2412 gave BoundBuffer::shape the stage table's BufferRanges; the twin
test landed beside it called the one-argument form. The default ranges tell
every length class apart, as the test's other shapes take them.
Verified: cargo fmt; clippy and the bind tests run as a potluck job.
Fix forward for 765997d91f: the merge of SEMANTICS 2132 with RUNTIME 2412 left one opt2 test calling BoundBuffer::shape(alignment) where 2412 takes (alignment, BufferRanges); the metal2vulkan tests did not compile. Test-only. Checked in m3-max-34828 (clippy on the three crates + the bind::, engine_access, engine_device_replay and interp tests), running when landed.
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.
What: on a profile that takes DriverWorkaround::PushReadsLengthenThreadPayload (ANV on the Iris Xe of
RPL-P), a kernel's uniform view (a read-only constant buffer whose window fits maxUniformBufferRange)
also binds its range as a storage buffer, its storage twin (DescriptorView::UniformWithStorageTwin,
ResourceKind::StorageTwin, BindingSource::StorageTwin). Each load selects, on the slot's
RangeAtBindOffset key, the twin read at the bind offset alone (key 1: a bind at an offset the class
divides, inline bytes, or unbound) or the uniform view at its residual (key 0). Specialization folds
the selection. The binder writes the twin from the slot's own source with a second descriptor range
starting at the bind offset. A twin's kind sorts last, so link numbers put a stage's twins after its
other bindings (docs/API.md section 5). Render stages and every other profile are unchanged: no twin
is declared and translation output is the same.
Why: on the Iris (m3-max-34275, dispatch_chain, us a dispatch) reading a kernel's constant buffer
through a storage view at its bind offset measured binds 4 142.7 -> 102.1, fixed 143.2 -> 101.3, tex
119.6 -> 74.4; at a non-zero residual the storage view lost (moved 143.1 -> 154.0), so the uniform view
keeps the residual case. Creation makes the key and its general form together (RUNTIME 2410), so no
first-use making.
Also: the cache codec lists the new variants; the interpreter binds a twin with no buffer of its own
to its slot's buffer; the device-replay tests name the twin's symbol. Docs: API.md section 5, the
workaround, the DEFECTS row, residual.rs, views.rs.
Verified in the lane: m3-max-34780 (at 7a862493b8) clippy -D warnings, metal2vulkan, runtime and
validation, all targets and features; the metal2vulkan suite 3626 passed, 11 failed: golden_hashes
(re-blessed on development) and 10 fixed at fca91cb055. m3-max-34804 (at fca91cb055) clippy 0. Still
running when landed: nextest over the three crates (34804), the authored compile census on the Iris
profile base against tip (M3), the Iris device tests and dispatch_chain A/B (every arm against base,
the branch-free reference for the folding check).
API: adds DescriptorView::UniformWithStorageTwin, ResourceKind::StorageTwin, BindingSource::StorageTwin
and BufferForm::storage_twin (additive to the enums: a consumer matching them exhaustively must add the
arm; a consumer binding set 0 itself fills the twin as docs/API.md section 5 says).