abba06ab441909a4c140ec6e94de15d826700ac1
35
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
de5a77cc06 |
Wide lines: no device's own lines are taken as Metal's parallelogram
RADV fails wide_lines_draw_metal_s_parallelograms and its exact-answers twin at the lane's "scattered lines width 2.5, fragments" map, 628 pixels where Metal's has 622: on the Radeon RX 7900 XTX (homelab-gem10-1, m3-max-10724) and on the 780M (homelab-um870-1, its only GPU, m3-max-10773), at this branch's base and at development alike. The runtime took RADV's lines as Metal's there, unannounced: RADV is the one driver of the committed profiles stating non-strict parallelogram lines (strictLines unset, nonStrictWideLinesUseParallelogram set), and 2.5 lies on its 1/8 granularity above 1, so the route was the device's lines under both policies. Cause, measured: a probe on the XTX (m3-max-10800, a scratch branch, never merged) drew each of the 48 scattered lines alone and printed its pixels. 21 of them lie a row or a column off Metal's parallelogram at an end: one more past the first vertex, one fewer before the last. A model of Metal's rule (endpoints on the 1/256 subpixel grid, the parallelogram whose minor-axis edges are w' long through them, the ends not extended, pixel centres by the top-left rule) reproduces Metal's map pixel for pixel; the XTX's ends fit no constant shift of it. Vulkan leaves where a non-strict wide line's ends fall to the implementation, and no driver is measured to place them as Metal does. Change: the device route has no exact form any more (render/line_width.rs route). Every draw the device's own lines take is announced device-wide-lines, the notice naming "parallelograms, whose ends and endpoints' snap the driver places as it draws them" where the width is on the grid above 1, and under WideLinePolicy::Exact (exact_answers) the band draws it wherever the device has tessellationShader. On RADV, widths above 1 on the 1/8 grid move from silent device lines to announced device lines under the default, and to the band under exact answers. No other profile changes route: lavapipe and NVIDIA (strict) and ANV (not stated as parallelograms) were announced already. Tests: the runtime's route table reads A or B where it read E for the three RADV profiles (Cell:: Exact removed). The validation lane drops LineFacts::draws_as_metal, and asserts per case that the draws of the device's own lines announce device-wide-lines one for one, which fails without this change on RADV (width 2.5 drawn by the device's lines with no notice); the edges test asserts the notice at each device-line draw. Docs: render/line_width.rs's module docs, DeviceWideLines' rustdoc and docs/API.md's entry and policy text, WideLinePolicy's and DevicePolicy::wide_lines' docs, the runtime README's route table (its "exactly Metal's" row folded into the announced one), docs/FAST-PATHS.md's row (no device's lines are taken as Metal's; the cost adds a row or a column at an end), docs/RUNTIME-PORTING.md's SetLineWidth row. The announced cost string is unchanged. Notices: one device-wide-lines per device (once per kind, unless announce_each names it) on a RADV run that draws wide lines only at widths above 1 on the 1/8 grid, where it announced nothing; a run that already drew a width below 1 or off the grid announced it already. Needs the runtime-sources pin and a RUNTIME_VERSION (the orchestrator's numbers). Verified: cargo fmt. The XTX, 780M, lavapipe and M3 runs follow through potluck. (cherry picked from commit be88ae03f199d5a485abcc546d0d52b181290e7b) |
||
|
|
48caeeb155 |
DegradeNotice::command_buffer: the command buffer whose work announced a notice
A consumer that makes some notices fatal (reims-vgpu's ReleasedCommandState, PrivateResourceOption, HostDeallocatorDelayed) could not tell which command buffer a notice was about: a ReleasedCommandState announced at a host step on the scheduler's steps thread ended its whole VM. Now every notice carries the ID of the command buffer whose work the runtime was doing on the announcing thread, so the consumer can fail that one command buffer. What changed: - CommandBuffer::object_id: an ObjectId, minted at the command buffer's making from the process-wide count buffers, textures and heaps use. - DegradeNotice::command_buffer: Option<ObjectId>, read at the notice's making from a thread-local scope (degradation::NoticesFor), as `call` reads the call being lowered. The scope is set where the runtime holds the command buffer and does its work: the compute and blit encoders' logged funnels and their other recording calls and ends, the render lowering's at-call funnel, its unit calls, its batches' lowering (on the lowering thread or a drain) and its end, the resource state encoder's calls, encoder openings, the commit (at the call or queued behind a render end), a batch's submission and the storage-form settle that rides on it, host steps, a rebind's encoding again, and GPU-time reads. Nested scopes name the innermost. - None, explicitly, for a recovery of the device (device-recovered), for grouped-completion (several command buffers' batches), and inside the program's code the runtime calls (exit_guard::program, indirect command checks, executed-commands handlers). - A bind's memoized notices, announced again at each later bind under announce_each, are named as that bind's: its command buffer and the call being lowered (the call was the first bind's before; same mechanism). - ObjectId docs, docs/API.md section 9, docs/RUNTIME-PORTING.md; API signatures re-blessed (two records: the field and the method). Tests (runtime crate, device tests): - notice_command_buffers: an ICB execution recorded at a host step announces released-command-state on the steps thread naming the executing command buffer; its commit's host-replayed-indirect-commands, on the program's thread, names it too; private-resource-option of an ICB made between the encoder's calls names none. - deferred_calls: the call-naming test also checks the command buffer under both lowering policies; a new test waits for the lowering thread to announce unsized-points after end_encoding and checks the thread, call and command buffer, and that a device notice between the encoder's calls names none. - vertex_conversion_notices: a memoized bind notice (device-nan-encoding) announced at a second command buffer's draw names that command buffer and its own call index, with bound_notices_made proving the memo was reused. (cherry picked from commit b4c2ba83ea726229f129a405ce6f432b0bdb0127) |
||
|
|
7205978cfa |
Make a tiled texture of more than one level over a buffer's bytes
The x86 macOS guests' WindowServer asks for a texture over a buffer with several mipmap levels through Metal's private newTiledTextureWithDescriptor:offset: bytesPerRow: (BGRA8Unorm 54x54 of 6 levels, 64x60 of 7, ShaderRead, over a new 16384-byte Shared buffer at 256 bytes a row). The runtime had no such entry, so the guest's bundle answered nil and the x86 featureProfile could not be turned on. Buffer::new_tiled_texture makes what new_texture makes, and a 2D texture of more levels (BufferTextureCall::Tiled lets linear_plan take them; a texture buffer of more levels stays MipmapLevelCount, and its offset keeps the validated 16-byte rule as the linear SPI's does). No Vulkan image lays level 0 over the buffer's rows and the other levels elsewhere, so the shared route sends it to a shadow over any buffer (Route::Levels, answered TextureShadowReason::Mipmapped): one image of every level, made zero in a Shared or Managed texture, whose existing shadow copies move level 0's texels alone (their range was already level 0), so the bytes reach level 0 before the GPU reads it and level 0's writes reach the bytes by the end of the encoder. Announced as shadowed-texture, naming the levels; counted in shadowed_textures and shadows_zeroed. The paths that assumed every texture over a buffer has one level: - blits: such a texture is an image to a blit, as a heap shadow is (Texture::blit_texels; BlitCommandEncoder::see notes it), so every level is a blit source and destination, generate_mipmaps included; - get_bytes and replace_region reach level 0 in the bytes and the other levels in the image; - a reinterpreting view shadow and a usage shadow, whose truth would be the bytes alone, are refused for it. Buffer::tiled_texture_placement answers the placement for the new call. Docs: the item's rustdoc (Metal's selector and what differs), docs/API.md, the degrade catalogue, RUNTIME-PORTING, the runtime README; api_signatures blessed (three additions, no breakage), REFUSALS regenerated (MipmapLevelCount's text). Verified: api-signatures, refusal-surface and metal-coverage checks locally; the builds, lint and device runs are the potluck jobs that follow. (cherry picked from commit b040d815059b99a20426234239aa756b282b25b9) |
||
|
|
b8f7b5a7f9 |
Answer minimumLinearTextureAlignmentForPixelFormat: from the device's images, per format
The query answered 16 for every format on every device, Metal's answer on an Apple GPU. On RADV a texture at 16 never goes in place over host pages: its linear images lay rows at multiples of 256 and align their memory to 256, and DRM explicit layouts take only multiples of 256. A guest that lays its buffers out by the answer then gets shadows where 256 would have given images in place. The answer is now the device's, worked out lazily at a format's first query. The runtime makes the images a 2D ShaderRead texture over host pages takes in place (in_place_unbound, the product's own maker: the driver's linear image made for host allocations at the texture's pitch, else the DRM_FORMAT_MOD_LINEAR one). It tries each power of two P from 16 to 4096, at widths of 1 to 1920 texels and 3 rows. The answer is the first P at which every width's image lies at roundup(width * texel, P) and its memory alignment divides P. Each image is released and never bound. - The first answer is kept for the device's life. - Each answer is recorded per driver, runtime and format in the shader cache's content directory. - A device that imports no host pages, a format no P brings in place, and a failed probe all answer Metal's 16. - New counts: WorkCounts::linear_alignments_probed and linear_alignments_recalled. Nothing new is refused. LINEAR_ALIGNMENT (16) stays the acceptance rule, and a texture under the answer is made as before: an image in place where the device takes its layout, else the announced shadow. The query moves from DeviceProperties to Device (Device::minimum_linear_texture_alignment_for_pixel_format), since it needs the device's images. DeviceProperties::minimum_linear_texture_alignment_for_pixel_format is removed. The private properties change as follows: - deviceLinearTextureAlignmentBytes and linearTextureAlignmentBytes are the largest per-format answer. - The iosurface pair stays 16. Supporting changes: - texture/in_place_image.rs's in_place_unbound becomes pub(super). - buffer_texture.rs's texel_bytes becomes pub(super). - The unit tests now hold Metal's rule (capabilities::linear_alignment_rule). Tests: - A record test. - runtime_lane::linear_alignments: - Every format's answer is printed. - A texture at the answer over host pages is in place wherever the check passed for reads. - A 64-byte-row texture is made, as a shadow, where the answer is larger. - A second device of the same driver reads the record and probes nothing. Regenerated: api_signatures, docs/REFUSALS.md, docs/METAL-COVERAGE.md (coverage.tsv mapping). Updated: RUNTIME-PORTING.md and the conformance device-queries docs. Verified: python generators only, so far. The builds, unit tests and the lanes on the M3, RADV, lavapipe and NVIDIA run next, and their results go with the tip. (cherry picked from commit d1510f5588e9e5c3ace5acb1622dcd6570408040) |
||
|
|
efe9581bcf |
Map maxArgumentBufferSamplerCount in the porting guide
What: docs/RUNTIME-PORTING.md gets a table for the consumer's IdentityCaps (MTLDevice identity and size answers) with one row: sizes.max_argument_buffer_sampler_count, Metal's maxArgumentBufferSamplerCount, maps to DeviceProperties::max_argument_buffer_sampler_count. The row gives the derivation (one fewer than the smaller of a set-1 sampler array's elements, pipeline::heap_sampler_capacity, and maxSamplerAllocationCount) and marks it partial: 65535 on MoltenVK on an M3 Max, where Metal answers 500000. Why: the samplercount work added the property without a row here, so a port had no entry for the selector. The Item name is the consumer seam's field (reims-vgpu-core platform/caps.rs, IdentitySizes, on its current branches). Docs only. Checked against capabilities.rs (the field's rustdoc) and docs/API.md's accepted differences, which give the same derivation and values. (cherry picked from commit 866e5ab81bfee7ebcc521975a7c277d00ac20378) |
||
|
|
b18b105cc0 |
Let a thread's own pass take the ready heads not behind, as the scheduler's does
A committing thread's pass (commit_and_submit) and a waiting thread's took only the line head committed first of all (Order::take_first, and claim_check's first_mut): any earlier commit held on any queue, its checks waiting for a signal to land or run by the scheduler's thread, sent every later commit to the scheduler's thread, a wake and a hop each, even a ready one on another queue. A consumer's video round (5080, 1 s windows) showed it: 879 commits, 741 passes at commit, 358 batches submitted there, the other ~521 batches the scheduler's (batches_held_past_a_look 522, heads held for checks 718, for check signals 129, for earlier commits 46; no event-value, host-step or binary-semaphore holds), scheduler_wakes_host 668. submit_plain_ready now takes its heads with Order::next and is_behind, the scheduler pass's own selection: the first ready head in commit order that waits behind no earlier commit keeping its place. claim_check takes the first head in commit order whose checks the thread may run and that is behind no earlier commit (no check before the batch it waits behind is submitted, as check_heads keeps). A held head so holds back only the later commits that wait behind it: its own queue's, and another queue's whose footprint runs in commit order with it. Order::take_first and first_mut, now unused, go with their two unit tests; the scheduler's next is tested by the rest of tests::scheduler. Test: commit_and_submit a_head_held_for_its_check_holds_back_only_the_commits_behind_it holds queue A's check on the scheduler's thread, then commits B (same buffer, behind A) and C (another buffer) with commit_and_submit: C is checked and submitted on the committing thread inside its call while A's check runs, B on the scheduler's thread after A; handlers in submission order C, A, B; one batch checked and submitted at commit. Before this change C's check ran on the scheduler's thread after A's (expected; the run's evidence goes with the landing report). (cherry picked from commit ff664020a1c7fe171ff15422e17b3c846624d94c) |
||
|
|
8a516f2255 |
Submit a queued commit_and_submit on the thread that runs its commit
Under RenderLoweringPolicy::Worker a commit whose last render encoder's end the lowering thread has not lowered returns at once and leaves its own work to the thread that lowers the end (render/queued_commits.rs). That run committed with Hand::Wake whatever the call was, so a commit_and_submit left so lost its inline pass: the scheduler's thread was woken for it and ran its checks and handlers. The queued commit now keeps the call's hand (State::queued_commit is Option<Hand>), and commit_queued makes commit_and_submit's pass on the thread that runs it (the lowering thread, or a program thread that settles it before a wait), with Hand::Wake on a thread command buffers' completion depends on, as commit_and_submit does there. The pass's submission checks and handlers then run on that thread. A render encoder opened there (by such a check or handler) lowers its calls at their calls: one that handed them to the lowering thread could wait for itself in reserve_end or wait_for_room. Test: deferred_calls a_commit_and_submit_after_an_end_in_flight_is_submitted_by_the_lowering_thread holds the slot so the end is in flight at the commit, then checks the check and handler ran on metal2vulkan-lowering, one pass at commit submitted and checked the batch, and an encoder the handler opened lowers at its calls. Without the hand kept the check runs on metal2vulkan-scheduler and scheduler_passes_at_commit stays 0; without the guard lowers_at_call is false. (cherry picked from commit bed9dc881cc1e6f18df708796da144a9072b9fb1) |
||
|
|
1f2b0f2d39 |
Run a command buffer's completion-seen handlers where seen even with completed handlers
A command buffer with completed handlers ran its whole transition to Completed on its queue's handler thread, its completion-seen handlers included, so they started a thread wake after the queue waiter's turn: the consumer's handler_cost bench (a completion-seen and a completed handler on each 4 KiB fill) put that wake into the completion-seen latency. On an idle M3 Max (MoltenVK 1.4.2) the turn-to-handler time was 22 us at the median with a completed handler against 1 us without. Now the waiter runs such a transition to its completion-seen handlers (To::Seen: its status final, those handlers run) where its queue's context is idle, and posts the rest (To::Rest: follow release, completed handlers, slot, releases, gate) to that context while it still runs it, so the queue's later items stay behind the rest. The rest holds its own Hold, so the gate, and wait_until_completed, open only after the completed handlers and once the context is done with the rest (the order a10704b730 set). A command buffer with a Follow (it signals at its end an event another queue's command buffer may wait for) keeps the whole transition on the handler thread, so the cross-queue order (follow.rs) is untouched. Where the waiter cannot run it here (the line busy, a deallocator held), the transition goes whole, as before (Item::whole). complete() is split into complete_seen() and complete_rest(), unchanged in order. Docs: add_completion_seen_handler, completion.rs, the runtime README and RUNTIME-PORTING. Not yet run on a device. (cherry picked from commit e1f36ec2f08735c92872a3d5eed8689b398373ce) |
||
|
|
de2b62a868 |
Check a plain event's waiting command buffer at once, its wait on the VkQueue
What: `landing_waits`, the waits a checked head's submission checks wait to land, now skips every wait that `EventShared::wait` answers. A plain event's wait for a signal submitted or reserved before the batch therefore holds no check. The check runs as soon as the batch is otherwise ready (on the scheduler's thread, or via `claim_check` on a committing thread in commit_and_submit), and the batch goes with its wait on the VkQueue, as an unchecked batch's does. A shared event's wait still holds the check until its value is reached, because `EventTimeline::wait` answers none for it while the host may set the value. So does a plain event's wait for a signal behind a merge. Why: reims's 5080 decode path saw no gain from a plain Event, because their platform checks every command buffer and the checked head was held until the signal landed. The conformance case event-wait-behind-a-running-signal (previous commit) measured Metal on the M3 Max (macOS 27.0.1): a command buffer whose MTLEvent wait only a still-running signal meets is Scheduled at once, so it is submitted and checked at once. One whose MTLSharedEvent wait such a signal meets stays Committed until the signal lands. The old rule was Metal's for the shared event only. Docs: checks.rs "When." states the split and cites the case. The runtime README (set_submission_check, commit_and_submit) and RUNTIME-PORTING (the same two rows) say the same. docs/API.md states no such rule, so it is unchanged. Lane tests (runtime_lane::submission_checks): - an_event_wait_a_gpu_signal_in_flight_meets_is_checked_at_once (new). In one try the waiter reads Scheduled while the signaller's companion event still reads 0, and the companion read 0 inside its check. In every try `heads_awaiting_check_signals` does not move, the check runs once, and the fill runs. This holds both for a waiter committed before the signaller and for one committed with commit_and_submit while the signal is in flight. - a_submission_detached_while_a_gpu_signal_is_in_flight_fails now covers the SharedEvent alone, and asserts that `heads_awaiting_check_signals` counts the held head. Verified on the M3 Max (MoltenVK 1.4.2), --cfg m2v_gpu, through maclock and memcap 12288: 124 passed. That covers the runtime's event, interop, reserved-queue, semaphore, check and scheduler tests, and the lanes runtime_lane::submission_checks, events, event_round_trips, command_queues and failed_commits. Caught with 8 and 4 fills of 64 MiB (plain), and 8 and 4 (shared). Negative control: `landing_waits` without the skip (the old hold). The new test failed with "at commit false: a head awaited its checks' signals", left 2, right 0. The shared test still passed. Restored and touched. (cherry picked from commit 3751927c29cee4a1dcbeb9786120245119a328a1) |
||
|
|
b74a0a4866 |
commit_and_submit: run a head's submission checks on the committing thread
What: a thread in CommandBuffer::commit_and_submit now runs the submission
checks of the head committed first of all itself, without the scheduler's
lock, right before it submits that head, where the head is ready but for its
checks (no host step, no group, no storage-form switch, no rebind) and every
event value it waits for was reached on the device or by the host. It then
passes again under the lock (Inbox::pass_again, which takes nothing in) and
submits that head first, and so on up to PASS_SUBMISSIONS batches in all. A
head whose checks wait for a submitted GPU signal to land, or whose checks the
scheduler's thread took first, stays the scheduler thread's, as before.
Why: reims's Vulkan platform sets a check on every command buffer it commits,
so commit_and_submit never submitted at commit for them (plain_ready held out
every checked head). Metal checks a submission as it submits it, on whichever
thread submits, so running the check on the committing thread is Metal's
behaviour; the check follows the submission handler's rule there (no lock the
caller holds, no GPU wait).
How:
- Held::checks_taken marks a batch whose checks were taken, by check_heads
(left to the scheduler's thread, replacing its Left::holds lookup) or by a
committer (claim_check), so the two never both run them.
- claim_check looks at Order::first_mut (the head take_first would take), so
no head is passed over: commit order holds across threads.
- The committer's handlers keep their Turns tickets: each pass under the lock
takes its own ticket, and its handlers run before the next check.
- The check runs through run_work -> CommandBufferShared::run_checks, the
scheduler's own path, so a code (or a panic) fails the submission exactly
as there (fail_submission, the CB completing with Injected(code)).
- plain_ready now holds out only a checked head whose checks are still to run,
so a head whose checks ran goes with any plain pass.
- Counted: WorkCounts::batches_checked_at_commit (new), beside
batches_submitted_at_commit; classified as Submission by its "batches_"
prefix in the conformance cost rules.
Verified on the M3 Max (MoltenVK, --cfg m2v_gpu, maclock, load 50-90):
- New tests in tests::commit_and_submit:
- a_checked_command_buffer_is_checked_and_submitted_on_the_committing_thread:
40 of 40 checked and submitted on the caller, check then handler, before the
call returned; batches_checked_at_commit 40.
- a_refusing_check_fails_its_submission_alike_at_commit_and_on_the_scheduler:
two submissions split by an event signal, the second refused with code 8:
identical status, error, completed-handler status, submissions seen, bytes
and event value on both paths.
- checked_command_buffers_keep_commit_order_across_commit_and_commit_and_submit:
2 threads x 500 checked CBs, commit and commit_and_submit in turn: checks
and submission handlers in commit order, each check once; 308 of 1000
checks on a committing thread.
- The five commit_and_submit tests: --stress-count 10, 10/10 passed.
- Negative controls:
- claim_check answering None: all three new tests fail (0 checked at commit).
- claim_check neither honouring nor setting checks_taken: the order test
fails 4/4 (checks out of commit order, checks run twice).
- runtime_lane::submission_checks' in-flight test gains a commit_and_submit
variant whose wait is met only by a GPU signal in flight: its check ran only
after the signal landed and never on the caller, Event and SharedEvent.
submission_checks, grouped_submissions and queue_order lanes: 24/24 passed.
- Runtime tests matching scheduler|check|teardown|completion|submission|inbox|
order: 169/169 passed. Conformance cost, fast_paths and api_signatures
tests 38/38; clippy -D warnings (runtime + validation, --cfg m2v_gpu) clean;
public rustdoc clean. api_signatures.tsv blessed (one new field).
(cherry picked from commit 91d0ea691a95649cbdc7828d4cc9ee6762a7ae53)
(cherry picked from commit 6c5fca926e855ee7d7236bc850bb9b281f4dd9cd)
|
||
|
|
36f5029870 |
commit_and_submit: the committing thread submits for itself
A runtime extension. CommandBuffer::commit_and_submit commits as commit
does, with the same checks and refusals. Then, where no submission pass is
under way, the calling thread becomes the passer (Scheduler::
submit_at_commit, Inbox::pass_once_then). It takes in the inbox and submits
the ready heads committed first, in commit order, up to PASS_SUBMISSIONS,
while each needs no host step, no submission check, no group, no storage-
form switch and no rebind (plain_ready with Passer::Committing:
submits_without_the_program's handler exclusion dropped, the rest kept).
Still counted as the passer and outside the state lock, it runs their
submission handlers, then lets go of what the pass held; a last reference
goes through let_go_elsewhere. It then counts out, wakes the scheduler's
thread where it left work or a commit was handed to it meanwhile, and makes
an owed completion turn. The commit is posted with no mark and no wake
(Inbox::post_quietly, Hand::Pass), so the scheduler's thread is not woken
for work the committer takes. A plain transition to Scheduled runs inline
as its batch is published; one with scheduled or submission handlers goes
to its queue's context as before. Called from the runtime's own threads (a
handler on the scheduler's thread or a waiter) it commits as commit does.
Plain commit is unchanged: Metal's commit returns before scheduling.
Submission handlers keep submission order whichever thread runs them.
Each pass that takes batches with submission handlers takes a ticket
under the scheduler's lock, in pass order (State::handler_ticket), and
runs them once every earlier ticket's ran (Turns). This departs from
the design's "handlers then count out": the scheduler's own pass counts
out before running its handlers, so a counted committer alone cannot
keep them in order. The new order test showed it: without the turns its
handlers ran out of commit order in 4 runs of 4.
Counted: WorkCounts::scheduler_passes_at_commit,
batches_submitted_at_commit (the conformance cost's scheduler_ and
batches_ prefixes already cover them). Docs: the method, the scheduler
and inbox module docs, add_submission_handler's thread bullet, the
runtime README's extensions, RUNTIME-PORTING, and FAST-PATHS's "commit
returns at once". api_signatures blessed (3 added); REFUSALS regenerated,
unchanged.
Verified on the M3 Max (MoltenVK 1.4.2), --cfg m2v_gpu:
- tests::commit_and_submit, 6 runs:
- the submission handler ran on the caller inside the call, reading
Committed, 40 of 40, with the scheduled handler on a handler thread;
- 1000 command buffers from 2 threads alternating commit and
commit_and_submit: handlers in commit order, 362 to 449 of them on a
committing thread;
- a checked head and the one behind it were left to the scheduler's
thread, with 0 batches at commit.
- Negative control: Turns::wait made to return at once failed the order
test 4 of 4 (e.g. 238, 239, 240, 255, 256, 241).
- The runtime suite: 1512 passed.
- clippy -D warnings with and without --cfg m2v_gpu, and rustdoc
-D warnings, clean.
RUNTIME_VERSION and the runtime-sources pin follow at hand-over, on the
lane tip.
(cherry picked from commit 5909e96c63004822e2a22d4cbf27b998f90e75a8)
(cherry picked from commit 40a67ba10398c38f13494fcdf3f64c2925f7eba8)
(cherry picked from commit 4270a52b85cfcd8c5a3cd8ea201b1a731a261eac)
|
||
|
|
fd7c93af53 |
Run a command buffer's completion-seen handlers where its completion is seen
What: `CommandBuffer::add_completion_seen_handler`, a runtime extension with no Metal counterpart. Its handlers run as the command buffer's transition to `Completed` or `Error` runs, right after its status, error and GPU times are final, before its completed handlers and before `wait_until_completed` returns. A transition with completion-seen handlers and no completed handler runs where seen (`Transition::where_seen`, `Run::runs_where_seen`), on the queue's waiter, as a plain one does: no handler-pool turn. Where the transition is posted (a completed handler, an earlier transition of the queue in its context, a deallocator of the program's held), the handlers run in it on the handler thread, so they keep the queue's commit order against every completed handler. A wait in one for what has not happened is refused with the new `DeadlockCause::CompletionSeenHandler`, as a submission handler's is, wherever it runs. `Contexts::run_here` takes the predicate its caller may run: the waiters and the scheduler (`exit_guard::serving_completion`) run where-seen items, any other thread plain ones only. Why: the consumer's per-command-buffer completion pays a handler-pool wake after the waiter (about 100 us from an idle CPU on the RTX 5080 laptop, and its p90 tail). Its completed handler is short and posts a record; moved into a completion-seen handler, the command buffer finishes on the waiter with one wake fewer. Order choice: the handler runs inside its transition, never ahead of it, so a command buffer's completion-seen handler cannot run before an earlier command buffer's completed handler on the same queue's context; it runs at the turn only where that context holds nothing else. Counted: `WorkCounts::completion_seen_handlers_run` and `completion_seen_handlers_where_seen`. Verified (M3 Max, MoltenVK, under the GPU lock): `tests::completion_here` (the new `a_completion_seen_handler_runs_where_the_completion_is_seen`: 20 of 20 ran on `metal2vulkan-queue-wait-*`, status `Completed`, GPU end positive, own completion wait refused, own scheduling wait returned; with a completed handler 0 of 20 where seen, each before the completed handler), `tests::own`, `tests::contexts` (the new where-seen run_here test): 24 passed. Negative control: with completion-seen handlers making the transition not where-seen, the new test fails (0 of 20). Workspace clippy (all targets, all features) and runtime clippy under `--cfg m2v_gpu` clean. api_signatures blessed, docs/REFUSALS.md regenerated. (cherry picked from commit bb7fd805045a9903a3a1ae06595e264ad771049c) |
||
|
|
b5e18d8fb3 |
Document the nearest-width line route; name its cause in the notice
Follows the previous commit, which drew at the nearest width what neither line route draws. Its nearest width is Metal's drawn width: w', and 1/16 at w' = 0 (Metal draws 0 as 1/16, the width-0 commit this rebased onto), clamped into lineWidthRange where the device enables wideLines, else 1. - line_width.rs: module docs for the Nearest route and what still refuses (a strip's band whose segment list cannot be drawn; the band variant's forms the translator does not build). The lines-at-nearest-width notice's object names the edges or lines drawn, its reason the width drawn, lineWidthRange (or no wideLines) and the cause. - The runtime README's line widths, FAST-PATHS.md's wide_lines row (counter nearest_width_line_draws) and its known gap (what is drawn at the nearest width, announced, instead of refused), RUNTIME-PORTING's SetLineWidth row. - refusal_surface reach.tsv: gap WideLines now reaches only a strip's band list; feature WideLines only the translator's band forms. REFUSALS.md regenerated (gap::WideLines sites 5 -> 1, the runtime's Unsupported(WideLines) site gone). - api_signatures blessed: Degradation::LinesAtNearestWidth, WorkCounts::nearest_width_line_draws. - RUNTIME_VERSION 1715 (a refusal became a run, a new announcement); runtime-sources pin recomputed on this tree (pin-compute.py, which reproduces 9ada26c9fa's pin on that tree). Verified: refusal_surface.py --check exit 0; cargo nextest run -p metal2vulkan-runtime -p metal2vulkan --all-features -E 'test(/line_width|degradation|api_signatures|api_surface|refusal_surface|apple_only|error_kinds|draw_shape|call_checks/)' 27 passed; cargo clippy --workspace --all-targets --all-features -D warnings clean. (Carried to development from steelbrain/reims-graphics-kext 7aed54b621.) |
||
|
|
eb41a55e82 |
Draw every width Apple's setLineWidth: takes, as Metal draws it
RenderCommandEncoder::set_line_width refused every width but 1 (AppleOnly::LineWidth). Measured on the Apple M3 Max under macOS 27.0.1 (probes/line_widths.m): each encoder starts at 1 and the width holds across draws and pipeline states; Metal draws w' = floor(16 w) / 16 clamped to [0, 16] (NaN and negatives as 0, infinity as 16); at w' = 1 its ordinary diamond-exit lines; at every other w' Vulkan's non-strict parallelogram (major axis the larger extent, x on a tie; minor-axis edges through the endpoints, w' long and centred; ends not extended; centres inside, top-left ties; the width not rounded); at 0 exactly the pixel centres on the segment; one parallelogram per strip segment with no joins; triangles in fill mode Lines draw their edges so; at 4 samples every width is the parallelogram at the sample positions. The runtime (render/line_width.rs) keeps the quantized width in the encoder state and routes each draw at w' != 1: - the device's own lines (lineWidth w', no Bresenham mode) where it enables wideLines and w' lies in lineWidthRange above 0: exact where strictLines is unset, nonStrictWideLinesUseParallelogram set, w' > 1 and on lineWidthGranularity; elsewhere announced device-wide-lines under the default DevicePolicy::wide_lines = WideLinePolicy::Device, and the band under WideLinePolicy::Exact (exact_answers() selects it); - the pipeline's band variant otherwise (no wideLines, MoltenVK among them; w' outside the range; w' = 0 at half a width of 2^-subPixelPrecisionBits): cull none, the band's front face, fill mode, a PATCH_LIST of two points, viewport 0's half extent pushed with the half width; strips and loops listed as their segments (ListGap::WideLines), flat inputs under the last provoking vertex read from the list led by the last vertex, which covers the same pixels. Refused: Unsupported(WideLines) needing tessellationShader where neither route draws a line; NotImplemented(RuntimeGap::WideLines) for a triangle's edges or a mesh draw's lines the device's lines do not draw, an amplified band, a rate-mapped pass and an execution's commands. Counted: WorkCounts::device_wide_line_draws, line_band_draws. The lane test runtime_lane::line_widths draws the probe's cases through owned fixtures and compares every pixel with Metal's answers (line_widths_m3_max.txt, the probe's output), checks each wide draw took a route, and that every fragment is front-facing; its site WIDE_LINES holds the new kind in the lane's degrade-notice closure. Docs: FAST-PATHS.md's row for wide_lines and a known-gap bullet (edges and mesh lines on devices without wideLines, near-plane cuts, band fragments' inputs uncompared, width 1 on multisampled targets off MoltenVK); API.md's policy bullet and degrade catalogue; the runtime README's Line widths; RUNTIME-PORTING's row; REFUSALS.md regenerated (reach rows for feature and gap WideLines, apple LineWidth gone). Validation: the line limits the device description gained describe execution and are not compared in a profile's subset check; the generator's CORE_PROPERTIES and roadmap-2022's m2v_layer_presentation state them at the reader's absent values; opened_chains reblessed (one member more, wide_lines, on every device with it); golden_hashes' profile fingerprints reblessed (no output cell moved); api_signatures and api_surface name WideLinePolicy and LineBandState. RUNTIME_VERSION 1712; the runtime-sources pin rewritten. Verified on the M3 Max under MoltenVK 1.4.2 through maclock with the validation layer: runtime_lane::line_widths, 4 tests pass. Default and exact policies each: 102 cases, 100 matched pixel for pixel, 2 refused (the two fill-mode Lines cases at width 4, NotImplemented(WideLines)), 0 announced; 46 draws took the band, 0 the device's lines (MoltenVK has no wideLines). a_band_needs_tessellation (tessellationShader withheld: width 0 refused needing it, width 2 refused, width 1 matches) and the_lane_s_maps_tell_the_widths_apart pass. Negative control: the band widened by 1/16 of a pixel fails both runs at LANE lines 0.5. Also cargo clippy --workspace --all-targets --all-features -D warnings, plain and with --cfg m2v_gpu; nextest of metal2vulkan, -air, -runtime and -devtools (4954 run, the one failure the missing lane site, now declared), of metal2vulkan-validation (the failures the profile rules, chains and pin fixed here, rerun green) and of metal2vulkan-conformance (1007 pass). Not run: lavapipe, RADV, ANV and NVIDIA lanes, which take the device route. (Carried to development from steelbrain/reims-graphics-kext b16d03150c.) |
||
|
|
12e64034b3 |
Hold back the clear's conversion note where MoltenVK's load operation clears as Metal's
One work packet, landed as 5 commits (36c1f6d2ed..bad631efa8 on archive/development-linear-2026-10-28), in order: * Hold back the clear's conversion note where MoltenVK's load operation clears as Metal's A render pass's CLEAR load operation of a colour attachment its render area covers is, on MoltenVK, Metal's own Clear load action, so the texel it stores is Metal's. The new DriverFact::ColorClearIsMetals records that for MoltenVK on the Apple9 GPUs under macOS 27, and the pass layout withholds device-color-conversion for such a clear there. A clear that is not that load operation still announces the note on every device: a clear over a smaller render area (vkCmdClearAttachments, a quad draw on MoltenVK), a clear made before the pass of an attachment its first instance leaves out, and a memoryless attachment's backing. Measured with the renders lane's clear case set (clears_are_the_device_s_conversion_of_the_clear_value) under MoltenVK 1.4.2 on the M3 Max, macOS 27.0.1, before the change: 71 colour clears, 11 depth and 4 stencil, all 86 texels Metal's bytes, none a code apart. The lane now also asserts the note stays unannounced where the fact holds; the dont-care and colour-reformat lanes expect it only where their clears are not a covering load operation (tie_cleared's new flag). RUNTIME_VERSION 1760; api_signatures re-blessed for the new variant. Verified on MoltenVK (M3 Max, --cfg m2v_gpu): the renders clear lane (86 checked, 0 apart, no device-color-conversion), runtime_lane::dont_care_stores (4) and runtime_lane::color_reformat (6) pass; device::tests::driver_facts passes. * Resolve into an sRGB twin by the device's own sRGB decode and encode A multisampled 8-bit UNORM attachment resolving into its sRGB twin is the crate-owned resolve on every device, and it applied Metal's 12-bit sRGB tables. Under the native-arithmetic rule the device's conversions are the only form where the device has them, so where the device renders the sRGB format the resolve now reads the samples through a view in the sRGB format (the device decodes each sample), averages the decoded values (their f32 sum times 1/n) and writes the average through the resolve attachment's own sRGB view (the device encodes it); the alpha keeps the unorm rule. An attachment read from a copy gets a scratch image mutable to the sRGB view. A device without the sRGB format keeps the tables through the raw UNORM views. bind: ColorResolveFormat::device_srgb / decodes_on_device, the device_mean lowering, and the tables only for the table form. runtime: of_resolve picks the form (color_resolve::decodes), the plan reads through the sRGB view and skips the raw write, twin_read_view makes a stand-in mutable to the sRGB view, resolve::scratch_viewed. device-rounded-resolve is announced for such a resolve on every device; docs (degradation, API.md, FAST-PATHS sRGB row, the module docs) say so. Measured with the new lane resolve_rounding::a_twin_resolve_into_srgb_rounds_as_announced (every pair of codes at 2 samples, the lane's pattern at 4, RGBA8 and BGRA8): MoltenVK 1.4.2 on the M3 Max 696 of 262,144 channels one code below Metal's at 2 samples, 880 of 524,288 at 4; lavapipe (Mesa 26.0.8, 4 samples only) 57,865 of 524,288, above and below; none past one code. The model in the bind tests gives 1,758 of 65,536 pairs one code apart with correctly rounded conversions. The resolves lane's twin texels now hold each colour channel to the note's two codes (lavapipe writes 0xbb where Metal's is 0xbc). Verified: the twin lane, runtime_lane::resolves (19), runtime_lane::resolve_rounding (4) and the dont-care twin case pass on MoltenVK (--cfg m2v_gpu) and on lavapipe (--cfg m2v_cpu_icd); the bind color_resolve tests (20) and the runtime color_resolve, image_plan and stand-in unit tests pass; clippy clean plain and with --cfg m2v_gpu. api_signatures re-blessed for the two new methods. * Make a plain colour fill the device's clear where the device renders the format fillTexture:level:slice:region:color: (Apple SPI) packed the colour on the host by Metal's fill rules in every format. Under the native-arithmetic rule the device's own colour conversion is the only form where it has one, so a plain fill (no pixelFormat:) of a texture whose format's fill converts a float (normalized, sRGB, half, float, small float, shared exponent; fill_value::device_converts), whose image holds Metal's bytes of the format, and which the device renders and copies both ways, is now the device's clear: a scratch image of the region in the texture's image format, samples and dimension, cleared whole by vkCmdClearColorImage, copied into the region of each image the fill writes through the blit copy path, placed as the fill. Integer formats (no conversion), the extended-range and bfloat formats, texture buffers and every format the device does not render keep the host packing; the pixelFormat: variant keeps it everywhere (capability). The clear's note is recorded where it applies against Metal's fill packing, not its clear: device-color-conversion where fill_value::device_apart holds (a normalized value within 1/1024 of a tie, widened by the fill's float product and, for the packed 16-bit formats, a step through half; an sRGB value inside (0, 1); a value a half, small float or shared exponent does not hold), device-nan-encoding for a half or small-float NaN. The fill slot still takes the packed texel. The call is logged as itself (BlitCall::FillTextureColor) so a re-encode clears again. Lanes: color_fills::plain_color_fills_are_the_device_s_clear fills the probes' 762 colours into each of the 70 formats plain and packed, notices asked for at each fill, and holds every texel to Metal's or, where that fill announced, to a code (a NaN for a NaN); it asserts an RGBA8Unorm_sRGB fill announced device-color-conversion, which the host packing never does. color_fills::plain_color_fills_land_where_packed_ones_land checks the 31 placement cases byte for byte. The Metal-hash test now packs by pixelFormat:, texture_fills runs its plain colour cases packed (Metal's bytes), and the RGBX fill test accepts an announced code. Unit test for the predicates in tests::fill_value. Measured (plain against packed, 762 colours a format): lavapipe (Mesa 26.0.8) rounds a half toward zero (RGBA16Float 420 texels a code apart), an 8-bit tie down (RGBA8Unorm 20), and writes its own RG11B10 NaNs (275); MoltenVK 1.4.2 on the M3 Max keeps RGBA8Unorm exact, stands RG11B10Float 186 and RGB9E5Float 150 texels a code apart, and writes 0x7e00 for Metal's 0xfe00 half NaN; every one announced. Verified on MoltenVK (--cfg m2v_gpu) and lavapipe (--cfg m2v_cpu_icd): runtime_lane color_fills, texture_fills, rgbx_textures, sample_fills, surface_fills, texture_buffer_fills and two_plane_copies pass; runtime unit tests (fill, replay, blit) pass; clippy clean plain and with --cfg m2v_gpu; rustdoc clean. * List lavapipe's own clear at seven plain texture fills A plain colour fill of a format the device renders to is now the device's clear (6cdfe023d9), so the texture-fills conformance case's digest moves on the gate container's arm64 lavapipe at seven formats: ABGR4Unorm, RGBA8Unorm, RGBA8Unorm_sRGB, BGRA8Unorm, BGRA8Unorm_sRGB, RGBA16Unorm and RGBA16Float. The site is digest-only, so the same fills were run per texel through the color_fills lane's helper on that venue (a throwaway probe, not committed). Of the case's four plain colours only c5's (2, -1, 0.5, 0.3) differs, in its alpha alone, one code below Metal's: 0.3 is a tie in 4, 8 and 16 bits (4.5, 76.5, 19660.5 codes) that lavapipe rounds to even, and lavapipe truncates the half (0x34cc for Metal's nearest 0x34cd). device-color-conversion records it at every such fill and its one-code bound covers it, so each row is the device's native answer, scoped to the measured build, with nothing open. Verified: conformance replay --cpu on lavapipe (llvmpipe LLVM 21.1.8, 128 bits) exits 0, the 825 rows exactly the ledger's (no unlisted, no stale); the ledger's unit tests pass; replay --gpu of the 54 texture-fills cases on MoltenVK 1.4.2 / M3 Max: 37 announced, 17 exact, none divergent. * 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. |
||
|
|
ec72c052dd |
Answer as one macOS release, 27.0.1, on every host
The owner's ruling: the runtime imitates the latest measured release
only, not the history of releases. Capabilities (GPU family, features,
limits) still follow the GPU; every answer that differs by release is
macOS 27.0.1's (build 26A434, measured on an Apple M3 Max), on every
host, whatever release it runs.
What changed:
- metal_level.rs becomes metal_release.rs: the public const
MACOS_RELEASE ("27.0.1") and the release's answers in one place
(heap block placement per family, the nil-texture stack alignment,
the mipmap rule, a depth/stencil state's resource ID below Apple10).
The pixel-format table and the private properties hold 27.0.1's
answers alone.
- Removed the MetalLevel enum and its 26.7 row, the host-release read
and the level choice, DeviceOptions::metal_level,
RawDevice::metal_level and DeviceProperties::metal_level.
- Removed what existed only for 26.7: the indirect-dispatch-of-another-
type refusal and its predication tracking, the depth/stencil resource
ID refusal, the M3 Max GPU row counting for heap blocks, PVRTC's
unmeasured heap placement, and the M4 mipmap stand-in emission.
- Problem::HostReleaseUnmeasured (the Unproven site),
Problem::IndirectDispatchOfAnotherType and
Problem::DepthStencilResourceId are gone. The Unproven type is
untouched.
- Degradations metal-level-below-host, metal-level-not-macos and
mipmaps-as-apple-m4 are retired (RETIRED_CODES, the retired section
of docs/API.md); mipmap-tie-rounding's trigger and cost drop the 26.7
clauses.
- Conformance: the recordings keep their "metal_level": "27.0.1" key as
a fact about the recording; record and replay compare it with
MACOS_RELEASE. Venue no longer carries a level.
- Validation's runtime_lane tests run on the default device, with the
26.7-only tests and level loops removed.
- A runtime unit test now holds the block-compressed kind on ASTC 4x2,
its one remaining trigger, in place of PVRTC at 26.7.
Docs: docs/API.md, docs/FAST-PATHS.md, docs/RUNTIME-PORTING.md and the
runtime README; docs/REFUSALS.md and docs/METAL-COVERAGE.md
regenerated (CONFORMANCE-COVERAGE.md regenerated, unchanged); the
signature table re-blessed with scripts/api-signatures/signatures.py.
Carried onto development from the parked development-performance branch
(a23f8181d9 there). The three conflicts were that branch's pipeline-record
hook (RawDevice and DeviceOptions fields and their Debug impls), which
development lacks: development's side is kept, without the release field.
Verified: cargo check --workspace --all-targets --all-features, plain and
with --cfg m2v_gpu; refusal_surface.py, signatures.py --check and the two
coverage generators leave the committed files unchanged.
Originally 79bb9749d3 (archive/development-linear-2026-10-28).
|
||
|
|
f7d857ec55 |
Answer a heap's and a heap texture's footprint Metal's numbers
The steps this packet landed as, in order: - Say in the ledger that the ASTC heap size query answers - Make the holding rule a named function and hold it to a table Content: the tree of `development` at 74da346075, unchanged. |
||
|
|
35dd559a04 |
Bound a run of indexed indirect draws' index fetches in two dispatches
The steps this packet landed as, in order: - Announce a provoking mode past 1 at the draws Metal's third way draws otherwise Content: the tree of `development` at 107929f7b9, unchanged. |
||
|
|
87eb8bc3b7 |
Reset and mutable rasterization-rate maps, as Metal's GPU reads them
The steps this packet landed as, in order: - Read a YCbCr texture's 2D-array view as Metal's, and drop packed 4:4:4 writes - Name bfloat attachments in the unreached-tiles notice - Let go of each predicated loop run's sets and uploads once the run completed - Check that a lent descriptor arena takes every set and reuses its reset pools - Bump the semantics, artifact format and runtime versions for the eighth stack - Pin the runtime sources of the eighth stack - Bless the golden hash tables over the eighth stack Content: the tree of `development` at ee0b90d176, unchanged. |
||
|
|
e69068885b |
Write a kernel's draw of a primitive type past Metal's five as points, as Metal's encoding does
The steps this packet landed as, in order: - Give the private-writes fixture its golden printout and inventory rows - Draw an indirect render command's private primitive types as the encoder's draws of them - Count an injected page fault or hang toward a queue's revocation, as the error it stands for - Drop a unit's ungated dispatches at its unbalanced first record, as Metal does Content: the tree of `development` at 8e08f4d248, unchanged. |
||
|
|
7aafd4d5b3 |
Split a predicated loop's laying around the work recorded apart
The steps this packet landed as, in order: - Start a predicated loop's check thread through the exit guard - Make a predicated loop check's command pool inside an exit-guard section - Run an endless predicated loop on after its queue is let go, as Metal does Content: the tree of `development` at f6e7e87687, unchanged. |
||
|
|
1391e59bce |
Read uploads from a pointer once, so a guest's bytes need no copy first
The steps this packet landed as, in order: - Detach lane: take a split's first submission as done as Metal's probe did - Run protection options as Metal's GPU runs them - Make compute encoders of raw dispatch types as Metal makes them - Answer a patch draw's nil buffers as Metal's getters do - Measure Metal's handler thread cap: the runtime's refusal is where Metal hangs - Regenerate docs/REFUSALS.md over the second stack Content: the tree of `development` at e6e5d4b99a, unchanged. |
||
|
|
7f50ad492e |
Run a predicated loop's copies again until the loop ends
Content: the tree of `development` at 61cb931693, unchanged. |
||
|
|
1400c9049f |
Resolve a NaN clear as Metal does in a pass whose draw calls draw nothing
The steps this packet landed as, in order: - Leave a resolve texture untouched where Metal's tile is not stored into its format - Take setDepthCleared, setStencilCleared and setVertexAmplificationMode as Metal does - Run the private alpha test in the fragment function as Metal tests it - Clamp depth comparison references as Metal's fragmentDepthCompareClampMask says - Take vertexAmplificationMode and explicitVisibilityGroupID as Metal does - Record no restricted depth range where the driver keeps depth values outside [0, 1] - Draw Metal's private logic operation: copy and no-op everywhere, the rest through logicOp - Leave the default alpha test and clamp mask out of the inputs encoding test's derived Debug - Clamp the reference of a depth comparison the shader makes under the clamp mask - Key each Vulkan logic operation's pipeline apart - Refuse a multisampled extended-range resolve naming its format and Metal's rule Content: the tree of `development` at 0231dbbd54, unchanged. |
||
|
|
ee21fca2f4 |
Write Metal's bytes in texture fills and two-plane buffer blits
The steps this packet landed as, in order: - Hold RGB10A2Unorm_sRGB textures with Metal's conversions - Name the runtime's gap, not a missing feature, for fetch on interlock devices - Take clippy's forms in the RGB10A2Unorm_sRGB tests - Fill multisample textures' samples as Metal's private fills write them - Check fill units only for the formats the crate holds textures of - Hold a two-plane texture's bytes between rows, which Metal's buffer blits read back - Fill texture buffers as Metal does: bytes of the buffer, the pattern streamed - Drop the multisample fill from apple_only's refusals, which fills it - Meet the rows of a two-plane buffer blit into the texture in Metal's order - Announce narrow two-plane row meetings across groups of 32 rows as one of Metal's Content: the tree of `development` at 9d3447dec9, unchanged. |
||
|
|
9516e41497 |
Say what an indirect command holds of the pipeline state set on it
The steps this packet landed as, in order: - Time indirect commands' CPU setters and getters in host_ab - Read and write one field of an indirect command's record - Set and read an indirect command's fields one at a time - Call an indirect execution's check where it may see something, and run the CPU's later writes - Load vkGetDescriptorSetLayoutSupport inside the exit guard's sections - Hand out indirect command buffer IDs to 2^31 - 1 and place every one's records, as an M3 Max does - Refuse an indirect command buffer reservation Metal hangs at as such - Place an indirect command buffer's records at any length, found only at their start - Leave a resource ID pool made after a reservation of 0 alone, as Metal does - Ignore a late reservation call before looking at what it holds, as Metal does - Expect the merged-draw tests' pipeline makings' notices on every device - Keep an indirect compute command's threadgroup lengths where Metal keeps them - Take the pieces of the ICB identifier range Metal's encoders take - Answer a GPU-written command's state identifier as the state its ID named then - Run a GPU-written record's released state as Metal does, from the buffer's kept programs - State and test the bound on the programs a GPU-writable buffer keeps - Record the earlier-window record of a re-held ID as a known gap Content: the tree of `development` at 7d31ebb207, unchanged. |
||
|
|
c83dcdd384 |
Give the predication step ops that drop, hold and resume a range, and check a unit's end
The steps this packet landed as, in order: - Answer command predication as Metal does on an M3 Max under macOS 27.0.1 - Probe Metal's command predication from the validation crate's Metal platform - Wait for the predication probe's command buffers through the bounded wait - Name the record a predication block left open came from in its command buffer's failure - Refuse a run's first indirect dispatch of another dispatch type at Metal level 26.7 - Read an encodeEndDoWhile's word only where it closes a live DoWhile - Run command predication on devices without buffer device addresses - Nest predicated loops to any depth, their copies bounded by what they lay down - Read a predication word past its buffer as Metal reads it - Halt a predication unit where a loop runs past its copies - Name the lane's fixed loop case type, which clippy found too complex Content: the tree of `development` at ef8b74ec1b, unchanged. |
||
|
|
0d9e71903b |
Read VK_EXT_provoking_vertex: provokingVertexLast and provokingVertexModePerPipeline
The steps this packet landed as, in order: - Write the index rewrite pass's primitives in either provoking vertex order - Draw Apple's last provoking vertex: a last-vertex pipeline, else lists led by it - Test Apple's provoking vertex modes against Metal's on the device - Describe the provoking third way as pipeline-dependent; fix the table test - Check the last provoking vertex through a geometry stage; key its slice notice on stages - Test that executions keep the first vertex; scale the weights check by the values - Register rt6_provoking in the engine inventory and golden printouts - Add host_ab's provoking workload: flat-shaded draws at provoking vertex modes 0 and 1 - Add the index gather pass: one dispatch for a run of direct draws' lists - Gather direct indexed draws' lists in runs: one dispatch per run, not three per draw - Add the rotated-weights variant: Metal's barycentric weights from a rotated triangle - Count private lists' gathers under a last-vertex pipeline; take the open runs whole - Draw listed triangles' barycentric weights through the rotated-weights variant - Draw every provoking vertex mode past 1 the third way, its top bit set or not - Announce nothing for a provoking-mode draw that makes no primitive Content: the tree of `development` at 91b1df7b21, unchanged. |
||
|
|
27ad7597c1 |
Measure dispatches after one useResources in host_ab's encode workload
The steps this packet landed as, in order: - Take the compute dispatch memo while the encoder's residency is unchanged - Start a shared event listener's thread at its first notification - Add a command buffer's scheduled event signal (encodeSignalEventScheduled:value:) - Count the scheduler's passes, and measure signals, bursts and moving offsets in host_ab - Hash the pipeline memos with the runtime's key hasher - Let a dispatch take what its pipeline state last planned for the same shape - Drop two casts clippy flags in completion_here's scheduled signal check - State host_ab's dispatches taken as settled and as planned before Content: the tree of `development` at f9d39326a3, unchanged. |
||
|
|
b30642f159 |
Merge a GPU replay's draws of one list type or points into one draw in the translator
The steps this packet landed as, in order: - Draw a GPU-written render execution of one list type or points as one merged draw - Reset an indirect command buffer's records on the GPU with one fill - Regenerate the refusal surface after the merged draws, rebased onto development - Regenerate the refusal surface over the host-step cause Content: the tree of `development` at 99ae896ad5, unchanged. |
||
|
|
f05f8a5a94 |
Count a replayed draw's misses of the buffers its slot tables do not hold
The steps this packet landed as, in order: - Run GPU-written render commands on the GPU alone, and let a check state what it looks for - Say that a check of every kind runs on the GPU alone where the records rule out both kinds - Pass what the check looks for in the compute lane's checked execution - Add host_ab's icb_draws workload: a kernel writes the draws of Apple's GPU-encoded ICB sample Content: the tree of `development` at 665d587ae2, unchanged. |
||
|
|
f6442761df |
Let an indirect command buffer's execution check the commands its host step records
Content: the tree of `development` at 480957f307, unchanged. |
||
|
|
0175289314 |
Batch the development-fast round: tessellation without tessellationShader, primitive ids, mesh tooling, color groups, the vk12 floor, runtime timing and teardown fixes
One commit of the 247 on development-fast (720ef1ce9a..9f46fdf80d), squashed at the user's request. Translator: - Tessellation on a device without tessellationShader: Metal's tessellator emitted as SPIR-V, a one-workgroup scan placing each patch's triangles in Metal's order, and the post-tessellation function as a plain vertex stage (EmulatedTessellationDraws; SEMANTICS 1739, ARTIFACT_FORMAT 419). - [[primitive_id]] on a device without geometry or tessellation shaders, as a flat varying the vertex function writes; indexed lists, lines and points drawn de-indexed (RuntimeGap::PrimitiveIdIndices). - Fragment functions of more colors than the device draws at once, compiled in color groups (PrecisionNote::ColorAttachmentGroups). - Object functions' threadgroup memory from the render encoder; a kernel's mesh draws from an indirect command buffer; mesh payload sizing. - The Vulkan 1.2 floor profile (vk12-floor) and the gates it needs; Metal 27.0.1 answers as the M3 Max. - Overflow tests in the runtime-built modules by the product's high word (NVIDIA's compiler fails the division form), guarded crate-wide by tests::owned_divisions. Runtime: - Color-group passes replayed per group over twin depth/stencil; snapshot and copy-back cost cuts. - Command buffers finish on the queue waiter that saw them; the waiter holds no device handle, so a program's drop after its wait is the device's last. - Every object an encoder was handed held until its command buffer completes; deallocator order and announcements. - Driver defects recorded and announced: ANV counts a visibility sample once per color output (visibility-count-per-color); MoltenVK fails pending work when memory that held a device-address buffer is freed, so freed memory waits for the work in flight (host-deallocator-delayed). - RenderCommandEncoder::set_object_threadgroup_memory_length; Visibility::counting(). Validation: mesh tooling (object, mesh and ICB-mesh cases on both executors), the authoring census closed, the queue storm judged in Metal's unit, load-robust exits and indirect-census bounds, and the golden hashes, printouts, fixture inventory and authored compile census blessed. Docs: FAST-PATHS.md trimmed to a ledger of what is true now; API.md's catalogue and accepted differences, REFUSALS.md and METAL-COVERAGE.md current. Verified on development-fast before the squash: the full suites on the RTX 5080, RTX 3090, RX 7900 XTX, Radeon 780M, Iris Xe, lavapipe and the M3 (MoltenVK and the Metal oracle), lint in every configuration, rustdoc, doc tests, packaging and public case qualification; the timing and teardown lanes x5 on every venue; the authoring-capability census 16656/16656 with 0 unresolved, the vk12-floor translation census at 6139 translated with the slowest row 794 ms and peak 126 MiB. The tree is development-fast's at 9f46fdf80d. |
||
|
|
11715e2a3f |
Import no-copy memory a driver refuses from the caller's dma-bufs
RADV imports host pointers through amdgpu userptr with ANONONLY, so it refuses MAP_SHARED memfd pages (QEMU's memory-backend-memfd guest RAM and views of it): every no-copy buffer, heap and rebind over them was refused, and a macOS guest could not boot on AMD. NVIDIA imports the same pages. What: - The five no-copy entry points (new_buffer_with_bytes_no_copy, both new_heap_with_bytes_no_copy calls, Buffer and Heap rebind_bytes_no_copy) take a HostMemory; HostMemory::with_dma_buf adds a retained DmaBufSource. - Where the pointer import is refused, and only there, on any device that lists VK_KHR_external_memory_fd and VK_EXT_external_memory_dma_buf, the runtime asks the source for dma-bufs of the window's pages (chunks cut at the device's sparse granule, sized by the caller within udmabuf's default limits) and binds one buffer over them: plain for one chunk, sparse for several (vkQueueBindSparse signalling queue 0's timeline; later work waits on it, no host wait). Every path that imported before is unchanged. - Textures over such pages get a dedicated DRM_FORMAT_MOD_LINEAR image import of their own pages where the driver takes the plane offset and row pitch (multiples of 256 on RADV), with 64-bit modifier features; elsewhere, or on a source error, the existing shadow path. - The extensions are enabled outside the compile profile: no device's enable set, fingerprint or ARTIFACT_FORMAT_VERSION changes. The translator crate is unchanged. - Imports free inside exit-guard sections; the source is never called with a runtime lock held. WorkCounts gains dma_buf_imports, dma_buf_sparse_buffers, dma_buf_images and dma_buf_image_fallbacks. Verified: - Product suites 4553/4553, validation suite 1289/1289, clippy in every configuration, rustdoc -D warnings, scripts/api-docs. - runtime_lane::dma_buf_imports and rebinds on RADV Mesa 26.2.4 (validation layer clean), the RTX 3090 and lavapipe (pointer imported, source never called), and dma_buf_imports on RADV Mesa 26.0.8. - reims-vgpu on the Radeon 780M (RADV 26.0.8, udmabuf at its defaults): a macOS 26 guest cold-boots to the desktop and runs Safari; 5,119 dma-buf requests, none refused. - 64 MiB on RADV 26.2.4, release: pointer import 187 us; one chunk 665 us; 16 chunks 16.9 ms, about half of it the refused pointer attempt. The old host-fence bind waited 1.26 s behind queue-0 work on RADV 26.0.8. |
||
|
|
13b279df1b |
Squash 11203 commits of translator, runtime, and validation work
Rolls up everything since
|