84dd5beebe4d7fadf9987950c9ff2cbc1ea25b8d
5706
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
84dd5beebe |
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. |
||
|
|
acd25fd445 |
RUNTIME 2323: NVIDIA's RTX 3090 image uses miss a buffer's write in the same VkCommandBuffer: such a use goes in a new one
runtime_lane::heap_textures::a_buffer_write_shows_in_an_overlapping_texture,
a_heap_texture_metal_compresses_keeps_the_driver_s_compression_by_default and
an_adopted_device_stating_host_image_copy_aliases_its_heap_textures failed on the RTX 3090
(NVIDIA 620.70.06) at pins 93b and 94 (m3-max-30259, 30260, 30491, 30492): a Shared heap's
64x64 RGBA8Unorm texture, a linear image in the heap's memory, read all 4096 texels as they were
after a copy into a buffer over the same bytes. The encoder trail (each encoder its own
submission) passed at the same archive (30469), and so did the trail half of 30552 at
|
||
|
|
a02b41dfc4 |
The placing-wait device test drops the buffer on a runtime thread while the placing is held
The landed test (
|
||
|
|
d32c12af29 |
Re-bless the engine goldens and the authored compile census at ebfd1b311d
The engine goldens' bless (M3 job m3-max-30664) moves the hashes of 19 rows: the indirect command buffer encode shaders (icb_copy_encode, icb_inherited_dispatches, icb_mesh_encode, icb_replay_encode, icb_reset_encode, icb_routed_writes) and mesh_commands, in both their .ll and .air.ll forms, plus the profile row. The census (m3-max-30665, corpus-triage --audit authored-compile --bless) moves the product hash and, in 228 rows, two variant artifacts' hashes; no row gains or loses an artifact. Both ran at development's tip after SEMANTICS 2117-2119. |
||
|
|
ebfd1b311d |
SEMANTICS 2119: A merged draw replay's vertex function draws regions several at a time
A rate-mapped pass draws its draws region by region through a multi-draw, each region's viewport at the draw's index (VariantKey::region_viewports). A merged draw replay's vertex function now takes that variant too. Its corner is its VertexIndex and InstanceIndex's, which each draw of a multi-draw gives from its own first vertex. Its viewport is its DrawIndex's, which the merged read does not touch. Only a replay of one draw per command (replay_bindings without merged_draws) is still NotImplemented(RasterizationRateMap). A host step that draws a GPU-decoded merged replay's commands region by region needs this, as it needs the region copies (SEMANTICS 2118). tests::engine_region_fan_out::a_merged_draw_s_variant_fans_out now also compiles the merged region-viewports variant on lavapipe, the Iris Xe and the Pascal. It checks L3 on every module, both facts stated, the viewport index stored, and the plan settling on itself. |
||
|
|
47100120d1 |
SEMANTICS 2118: A merged draw replay's vertex function takes region copies
A rate-mapped pass draws a merged draw replay (VariantKey::merged_draws) through region copies as it draws an encoder's draw: the region-copy vertex function's corner is its VertexIndex and InstanceIndex's, which a multi-draw's draws each give from their own first vertex, and its region its DrawIndex's, neither of which the merged read moves. Only a replay of one draw per command (replay_bindings without merged_draws) stays NotImplemented(RasterizationRateMap). This is the translator half of drawing a GPU-written render ICB's merged replay in a rate-mapped pass on the GPU. tests::engine_region_fan_out::a_merged_draw_s_variant_fans_out compiles the merged variant in each fan-out mode on lavapipe, the Iris Xe and the Pascal: L3 on every module, the header's address pushed, the region box pushed by a region-copy variant, and the plan settling on itself. |
||
|
|
5a619026c0 |
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. |
||
|
|
c42dbfa163 |
RUNTIME 2322: Host RAM copies: one dispatch for up to 30 imports, through a descriptor array
What: a copy of word runs between a guest RAM and a buffer recorded one dispatch of the pages copy per import its runs touch (and per window of the buffer), each binding that one import. Where a RAM's chunks are 64 MiB pointer imports (NVIDIA, lavapipe: no listed plan), a surface whose guest pages lie across an 8 GiB RAM touched ~35 chunks, so ~35 dispatches a copy (the consumer's walk: 55,778 dispatches for 1,574 copies on an RTX 3090, ~35 on an RTX 2080, 1.2 on RADV, whose copies go through run lists of their own pages). How: `bind::pages_copy_module`'s scattered binding is now a descriptor array of `PagesCopyModule::imports(device)` storage buffers, and each table entry (now four words) names its run's element. The element is read once per workgroup from the workgroup's entry, so it is dynamically uniform within the invocation group (Vulkan: for shaders with workgroups the workgroup is the invocation group), which `shaderStorageBufferArrayDynamicIndexing` allows; the module declares StorageBufferArrayDynamicIndexing and requires that feature where the array holds more than one, and needs no NonUniform. `imports` is 1 where the device does not enable the feature (the array indexed by the constant 0), else the room the device's maxPerStageDescriptorStorageBuffers, maxDescriptorSetStorageBuffers, maxPerStageResources and, with push descriptors, maxPushDescriptors leave beside the two other bindings, at most 30 (so a push set holds at most 32 descriptors, maxPushDescriptors' minimum). The runtime's owned kernels take a first storage-buffer binding of several descriptors (layout count, pool needs, pushed and allocated writes by binding and element); `plan` groups the runs by `slot / array` and window; each dispatch binds its group's imports, the elements past them its first import again, so every descriptor is valid without partiallyBound. Expected: n chunks touched -> ceil(n / 30) dispatches on every device here (maxPushDescriptors is 32 on NVIDIA, RADV and lavapipe), ~35 -> 2. Tests: the device tests' counts over two chunks are now `dispatches_over(device, 2)` (1 where the array holds more than one; they said 2 before); `plan` unit tests for arrays of one, two and an import past an array; the pages copy module's interpreter test of one dispatch over three elements both ways, and its validity on every committed profile at the profile's array length and at one, the dynamic-indexing feature required exactly where the array holds more than one. Verified (lane hostcopy, msi, at a9a2aba8de; the two later commits only rename one device test): lavapipe host_ram + owned_pushes suites (--cfg m2v_cpu_icd) 92/92 (m3-max-30625), the 3 count tests expecting 1 dispatch over 2 imports among them; hand negative control steelbrain/hostcopy-control (m3-max-30626) fails exactly those 3 on the count (2 vs 1); clippy -D warnings plain (m3-max-30622) 0; translator bind::pages_copy tests 6/6; api-signatures --check 0. The 3090 release bench follows on development. RUNTIME 2322: what a host-RAM copy records changes (one dispatch for up to K imports). Public API: bind::pages_copy entry() takes the import index and returns [u8; 16], ENTRY_WORDS 3 -> 4, new PagesCopyModule::imports(&Device). No Degradation kind or WorkCounts field. |
||
|
|
4ba0b1ecc4 |
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. |
||
|
|
7765813cb4 |
RUNTIME 2321: An indirect command buffer's home waits for its placing inside an exit-guard section
Home::drop waits on the host for the staging submission that placed the records in device-local memory. The drop runs wherever the buffer's last hold lets go, and that can be a command buffer's completion on its queue's waiter or a handler thread. When the host had not seen the placing submission complete, the wait's vkWaitSemaphores ran there outside any section. In debug builds exit_guard::check ends the process at such a call: the XTX abort of runtime_lane::resource_ids::an_indirect_command_buffer_s_id_is_held_as_metal_holds_it at pin 94 (queue-wait-0, complete_rest's drop of the residency). The wait now runs inside a section, as texture/staging_copy.rs's Flushed::drop does. While the process exits no section starts: the drop returns without waiting, and the records' buffer stays to the end, as release.rs leaves every object then. exit_guard::check is unchanged. vkWaitSemaphores is already in the sections' call table. Verified: cargo fmt. The device runs of the previous commit's test are reported with the landing. Test: Device test: a command buffer's completion that lets go of an indirect command buffer last waits for its placing. On a device that places indirect command buffer records in device-local memory, a buffer the program lets go of while a command buffer that uses it is in flight goes as that command buffer completes, on a queue's waiter or a handler thread. Its home's drop then waits for the staging submission that placed the records. When the host has not seen that submission complete, the wait calls vkWaitSemaphores, which the exit guard requires to run inside a section on the runtime's threads. The test holds the staging submissions on a test timeline (Device::hold_staging_submissions), places a Private buffer's records through a compute encoder's useResource, commits, lets go of the buffer, then signals the timeline. The command buffer completes only after the placing submission, and nothing waits for it on the host before the drop. A test-only count in Home::drop (RUNTIME_PLACING_WAITS) records a wait for an unseen placing submission on a runtime thread, so a pass on a placing device is not vacuous. A device that keeps records in the host's memory says so and passes. This commit has the test alone. On a placing device, without the section the next commit adds, the drop's call ends the process (exit_guard::check): the XTX abort of runtime_lane::resource_ids::an_indirect_command_buffer_s_id_is_held_as_metal_holds_it at pin 94. Why: on the RX 7900 XTX at pin 94 (m3-max-30428), runtime_lane::resource_ids::an_indirect_command_buffer_s_id_is_held_as_metal_holds_it aborted in a debug build: "the runtime's thread metal2vulkan-queue-wait-0 reached the device outside an exit-guard section". The queue waiter's completion dropped the last Arc of an indirect command buffer, and Home::drop's wait for the staging submission that placed the records (vkWaitSemaphores) ran with no section. Verified (lane devlegs, msi m3-max-30615): clippy -D warnings, runtime crate, plain and --cfg m2v_gpu 0; the m2v_gpu archive at the fix built. Landed (main) at once: the 5080 negative control (test without the fix aborts, with it passes) and the 3090 run follow on development. RUNTIME 2321: an exiting process's last drop no longer waits for a placing it cannot guard. |
||
|
|
12ae9f668b |
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. |
||
|
|
7c223b02e4 |
RUNTIME 2320: A host step's notice names every GPU-form rule its pass breaks; rate-mapped steps that probe nothing are counted by why
What: where `commit` keeps a pass whose indirect commands the GPU may write from the GPU form, and the `host-replayed-indirect-commands` notice of that first rule is to be announced (`Device::announces_host_step`, a peek that counts nothing), the decision runs again passing over each rule once named (`render/executions/cause.rs`'s `Passed`, `DeferredPass::rules_past`), and the notice names every rule past the first that the pass breaks too, each judged as though the rules before it were kept: the rate map's as though the pass had none. A rule the rest takes its answer from (the commands' one primitive type, the pipeline state and its kind, the inherited state's tessellation, vertex function and tile memory, the buffer's size, a refusal) is never passed over. The commit path is unchanged where the notice was announced already: the first rule decides, as before. Three WorkCounts fields count the rate-mapped passes a host step records without a probe: `rate_map_steps_unfanned` (no fan-out: policy, features, memoryless attachment, shadowed texture), `rate_map_steps_nothing_to_probe` (no command read) and `rate_map_steps_probing_none` (commands read, no draw probed); with `rate_map_probes` they count every such pass once. Why: the consumer's walk of a 3D renderer sees one notice, naming the rate map, so whether a GPU form for rate-mapped passes would cover its pass (rules past the rate map) is unknown; and about half a host step a frame there probes nothing, for no counted reason. The notice's text changes (a RUNTIME bump at landing). API: three public WorkCounts fields (api_signatures.tsv blessed); nothing removed. Verified: tests::host_step_rules on lavapipe (an indexed triangle and an empty command of a GPU-written buffer, executed in a rate-mapped pass: the rate map's notice names that rule alone; with a visibility result mode set, the notice names the visibility rule, then the rate map past it, which fails without this change; the counts: probed once each, the empty command's pass probing none). Also: host_step_rules: the buffer inherits the encoder's pipeline state; Degradation::HostReplayedIndirectCommands says its notice names the rules past the first. Verified (lane icbgpu, msi m3-max-30616 at eec7881980, lavapipe): clippy -D warnings plain and --cfg m2v_cpu_icd 0; 74/74 over host_step*, icb_*, indirect_command_buffer*, notice_command_buffers, rate_map*, rate_mapped*, degradation*, trail_gpu_forms and draw_shape_notices, the new host_step_rules among them; api-signatures --check clean. Landed (main) at once: the hand negative control, gpucfg clippy and rustdoc run after. RUNTIME 2320: the notice's text and what a run records change. WorkCounts gains rate_map_steps_unfanned, rate_map_steps_nothing_to_probe, rate_map_steps_probing_none. No Degradation kind. |
||
|
|
fac8049bd1 |
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. |
||
|
|
257bdd7d14 |
SEMANTICS 2117 / RUNTIME 2319: GPU-written ICB records naming released or reused state IDs run what a Mac runs
What: two changes to how an indirect command's record names a pipeline state the program released. 1. A record's state word gains a bit, KERNEL_PIPELINE (layout::KERNEL_PIPELINE = 2, CommandRecord::kernel_pipeline, RecordView::kernel_pipeline). A kernel's pipeline setter writes it wherever the token names a state. A kernel's copy carries it with the pipeline word, and its "reports" test now reads RETAINED alone. A kernel's compute reset keeps the bit beside RETAINED. Metal's reset leaves the command executing with the pipeline it had (measured on the M3 Max and the M4: reported cleared, run by the next dispatch). For a kernel's write, that pipeline is the state the write resolved, so the retained pipeline keeps saying the kernel wrote it. The CPU's compute reset does the same. The CPU's pipeline setter clears the bit, and a record the CPU wrote never carries it. The replay's state-word check and decode accept the bit; either bit beside no pipeline is still malformed. Where the bit is set, the runtime's host step, getter and identifier ignore the state the CPU set and resolve the ID by its holder as the GPU last could write it. Case 4 (the CPU set x, x released, y took the ID, then a kernel writes the state) now runs y, as the M3 Max and the 5300M do; before, it ran x, announced. Case 5 (the kernel writes only the buffers) runs x unannounced, as every Mac does. The host step no longer guesses, so the "Unsure" announcement and may_name_another are gone. 2. The device keeps the program of each freed pipeline state ID's last holder (FreedPrograms): one per ID, dropped when any state takes the ID. Every live indirect command buffer of the device holds the store and the device holds it weakly, since a program holds its device. A buffer the GPU may write takes the store's programs at its first such write. Case 1 (x released before the write, its ID taken by no one) now runs x, as the M3 Max and the UHD 630 do; the Radeon Pro 5300M fails the command buffer instead. Where Macs disagree, the cheaper answer is taken: failing the CB would need a failure path decided mid-flight in a host step. Bound: one program per freed ID that no state retook, so at most the peak count of live supportIndirectCommandBuffers states plus placed IDs, kept only while an ICB of the device lives. Still announced (ReleasedCommandState, the command runs nothing): a state released while no ICB of the device lived, and one past the ID's last four holders. SEMANTICS_VERSION 2117: kernels that set pipelines now write the state-word bit, so their SPIR-V and golden hashes change (re-blessed on development). api_signatures blessed for the new field and method. No new Degradation kind. RUNTIME_VERSION is left to the landing. Tests: indirect_commands::tests::records (a_kernel_s_pipeline_is_told_from_the_cpu_s, plus the random field round trip with the bit). The engine_indirect_commands expectations of kernel writes carry the bit, and the kernel reset keeps it. Runtime: released_programs (the freed store's one program and its release on take) and notice_command_buffers (a host-step Unrun now reached through a kernel's write of a state released while no ICB lived). Validation runtime_lane: indirect_host_steps (case 1 runs the template; the forced notice past four holders and while no ICB lived; case 4 runs the flat template; case 5 runs the template unannounced) and indirect_executions (the GPU-writable copy case no longer announces). Run on lavapipe in the lane's msi job; the results go in the lane report. Also: Pin the notice of a state released while no buffer of commands lived; Replay tests: the kernel's pipeline bit runs, an unknown bit faults. Verified (lane relstate, msi m3-max-30537): clippy --cfg m2v_cpu_icd exit 0; runtime tests 24/24; validation tests 113/113 on lavapipe, the new released-state cases 1, 4 and 5 among them. Landed (main) at once: the plain clippy and translator rerun (m3-max-30546) and the hand negative control (m3-max-30555, steelbrain/relstate-nc) run after landing; the engine golden hashes of kernels that set pipelines are re-blessed on development. RUNTIME 2319: what a GPU-written record naming a released or reused state runs changes. |
||
|
|
b6109709ec |
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. |
||
|
|
8a374ba0e5 |
RUNTIME 2318: Rate-mapped draws whose triangles lie in few regions are boxed, not fanned out
At a host step under RateMapRegionPolicy::FanOut, a probed draw the probe flags nothing of goes through the fan-out variant, and so does a flagged draw's fanned part. Its geometry stage emits a copy of each triangle per region it touches. On the pieces lane that stage costs a fanned-out triangle what 371 to 739 vertex invocations for one region cost. On an Iris Xe that is 130.7 ns a triangle, against 0.352 ns an index-region through the region-copy variant. On a 3D renderer's frame there (tm91-iris), about 68 of the 125 ms of rate-mapped pieces a frame tracks the probed and fanned geometry, which is 383 fanned draws a frame. Such a draw is now boxed when that holds no more work: drawn through its region-copy variant into the boxes of the regions its triangles reach by the probe's bounds (fan_out::run_boxes of Probed::reach, a part's from its own blocks), as a run is. - The rule: rate_mapped_pass::boxes_cheaper, regions x (vertices + REGION_DRAW_WORK) <= GEOMETRY_TRIANGLE_WORK x triangles (a direct draw; a strip's triangles counted at vertices / 4). - GEOMETRY_TRIANGLE_WORK = 180: about half the least that a fanned-out triangle cost against a vertex for one region on the four devices measured (Iris Xe 371-500x, Radeon 780M 739x, RX 7900 XTX 570x, RTX 3090 654x; the constant's doc has the numbers). The rule is device-independent, keyed to no app, map or shader. - No new pass, variant or readback. fan_out_asked asks for the region-copy variant (settled at commit already) and the recording takes the boxes (RenderLowering::boxed_reach). Pixels: the routes already share a pass and put a vertex at one window position. A pixel lies in one region, whose copies keep the draw's order of instances and primitives in either route. The bounds are widened as the probe's are, so a box holds every pixel a copy would cover: the same pixels and depth wherever today's routes agree. A boxed draw rides whole in its piece, as a fanned-out one does; its work is no more than its fan-out's. Counts: WorkCounts::rate_map_boxed_draws and rate_map_boxed_vertex_regions (CopyRoute::Boxed). A boxed part is not a run, so rate_map_region_runs and rate_map_parted_region_triangles leave it out. Test: tests::rate_mapped_boxed_draws, 6 commands blended at half alpha: - boxed: a 10-pixel patch, a 120x40 strip across region borders, a patch of two instances, and a patch without indices; - fanned out: a whole-target grid and one wide quad. It checks probes 1, flagged 0, fanned 2, boxed 4, region-copy draws 4, and boxed vertex work under the whole table's. The pixels equal the encoder's bit for bit. Under Exact nothing is boxed. Also (2f82e025be): The pieces lane draws each command's own patch: rate_mapped_pieces_host_step_patches; (01d8344d2a): A command's settle at commit boxes no draw; the boxed test's counts keep their function's name. Verified (lane ratemap3, msi m3-max-30513 at 01d8344d2a, llvmpipe): rate_map|fan_out 26/26, the new rate_mapped_boxed_draws among them (probes 1, flagged 0, fanned 2, boxed 4, region-copy draws 4, boxed vertex work 10752 against the whole table's 997056; pixels equal the unboxed execution; nothing boxed under Exact); rate_mapped_fan_out, region_boxes, pieces and depth_equal unchanged. Landed (main) at once: clippy x3 (m3-max-30514), the Iris A/B and the hand negative control run after landing. RUNTIME 2318: what a run records and draws changes. No Degradation kind. API: two WorkCounts fields added (rate_map_boxed_draws, rate_map_boxed_vertex_regions); api_signatures.tsv blessed. A consumer building WorkCounts by struct literal must name them. |
||
|
|
f4205b38f9 |
Integration tests start the crate's tools at nextest's run-time path
The nineteen validation integration tests that spawn one of the crate's own
tools (corpus-pipeline, corpus-vulkan, corpus-moltenvk, corpus-triage,
corpus-index) named it with env!("CARGO_BIN_EXE_<tool>"), the path Cargo
bakes in at build time. A nextest archive reused on another machine
extracts its binaries into its own directory, so on every device leg
those tests found no file (ENOENT) and failed. They passed only where the
build's own target directory still existed.
A bin_exe! macro in tests/integration/main.rs now reads nextest's
run-time NEXTEST_BIN_EXE_<tool> (set from cargo-nextest 0.9.15, remapped
to the extracted archive) and falls back to the baked path under cargo
test. All 27 call sites use it. The SERVING constants become functions,
because the path is no longer a compile-time constant.
Verified: cargo fmt. The build, clippy and a remapped-archive rerun of the
integration binary on a node without the build's target directory are
reported with the landing.
Landed (main) at once: its build and clippy (m3-max-30499) and the um870 780M rerun of the
integration binary from a remapped archive run after landing. Test-only: no RUNTIME bump.
|
||
|
|
6f50a4666d |
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. |
||
|
|
2432c48e06 |
Compute dispatches keep their read-twin proofs with what their state planned
On a device where any buffer took a read twin (`read_twin.rs`), every compute dispatch worked out again which slots its plan only reads (`binding::TwinProofs::proven`), a walk of the plan's uses and, for each slot, of its uses and descriptor writes again: `compute::record` made a fresh `TwinProofs` at each dispatch. On the consumer's Iris Xe, a guest compute benchmark's timed pass spent 0.23 CPU-s in that walk (1.6 to 2.2 us a dispatch in four workloads), 0.33 with the per-slot checks around it. Render draws already keep their proofs once per plan (`render/plan_facts.rs`). Now `pipeline::Planned`, which holds the dispatch's plan and which its pipeline state keeps for its latest direct dispatches (and an encoder's dispatch memo shares), keeps the proofs (`Planned::twins`), worked out the first time a dispatch of it asks. They are a function of the plan alone (its uses, descriptor writes and vertex buffers), which no call changes while the entry lives; what a command binds at a proven slot (whether its buffer or texture has a read twin now, whether an earlier command of its command buffer may have written it) is still asked at each dispatch (`TwinProofs::slots`). No WorkCounts field, Degradation kind or public item changes. Test: resident_uses' `dispatches_work_their_plan_s_twin_proofs_out_once`: on a device with a read twin (a bit-24 no-copy buffer), one kernel dispatched in five command buffers: the first dispatch walks its plan (`binding::plan_walks`), the four later ones, which take what it planned, none. The twin buffer's setup is shared with the render test beside it (`twinned`). Landed (main) at once: its job m3-max-30477 (clippy plain and cpu_icd, the touched tests, the new test failing on steelbrain/gbtwins-ctl 3779974291) runs after landing. No RUNTIME bump: answers, recorded commands and WorkCounts are unchanged; only the work done is. |
||
|
|
c6a823ff13 |
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. |
||
|
|
497e1f4ec0 |
SEMANTICS 2116: NVIDIA's float denormals under the 16-bit float controls are the device's, noted
What: a new DriverWorkaround, FloatDenormalsKeptUnderHalfControls, with rows for NVIDIA's driver on the RTX 3090 and the RTX 5080 Laptop GPU (the GPUs its MetalFloatDenormals rows name). In an entry that declares the 16-bit float controls (narrow::controlled_modes) on such a profile, the float operations the deviation covers record PrecisionNote::DeviceDenormals and the module requires no VkProperty::MetalFloatDenormals. An entry that declares no float-controls mode keeps the deviation, and so does every other driver. Why: runtime_lane::driver_deviations::fused_pairs_answer_metals_nans_and_denormals failed on the RTX 5080 Laptop GPU (615.71.09) and the RTX 3090 (620.70.06) at pin 93b. The same 33 of 4,096 words in each fixture kept a denormal where Metal answers zero (thread 0x11: 1e-20 * 1e-20 gives 0x116c2; thread 0x29: the smallest denormal times 2^30 gives 0x04000000). That held for the lone product a * w as much as for the fused pairs, so the fused pairs are not the cause. The fixtures compute half in 16 bits, so their entries declare RoundingModeRTE, DenormPreserve and SignedZeroInfNanPreserve for 16 bits. The deviation's probes (nan_denormals, nan_denormals_fast) declare no mode and flush on the same GPUs. Vulkan leaves 32-bit denormals to the implementation when no 32-bit mode is declared (the NVIDIA profiles report independence ALL), and NVIDIA states no shaderDenormFlushToZeroFloat32. So the device's answer stands (owner rule 1), scoped and noted; nothing is flushed in the shader. RADV on the Radeon 780M (Phoenix and Hawk Point, Mesa 26.2.6) declares the same modes there and passed the test at pin 93b, so it keeps the deviation. MoltenVK states no shaderDenormPreserveFloat16, so its entries declare no 16-bit mode. The device test now decides "Metal's" per kernel (requires_property), as the float_denormals tests do, and asserts DeviceDenormals where the kernel does not require the property. The new unit test float_denormals_under_the_half_controls_are_the_devices_where_its_driver_keeps_them checks the 5080 Laptop GPU, the 3090, the desktop RTX 5080 and the 780M against fmx_fma_precise, fmx_fma_fast and nan_denormals. It fails without the rows. Docs: the workaround's doc, the DEFECTS and MetalFloatDenormals table docs, the deviation and property docs, PrecisionNote::DeviceDenormals, docs/API.md's device-denormals entry, docs/FAST-PATHS.md's denormal row, the signature table. SEMANTICS_VERSION 2116: NVIDIA modules' notes and requirements change. No new Degradation kind. Landed (main) at once, before its check: the lane's check (clippy plain and cpu_icd, the touched unit tests, the two denormal device tests on lavapipe) and the NVIDIA device proof run after landing. |
||
|
|
f7764325c9 |
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. |
||
|
|
c1d9da2653 |
Kept variants prune only the region keys the device ledger let go, not every kept pipeline
A full region ledger (`pipeline/region_ledger.rs`) lets one key go at each region pipeline a dispatch makes, and the lookup after it settled the kept variants by walking every region pipeline every kept instance holds, asking the ledger of each (its lock, a clone of the key's two Vecs and a hash): `compute::record` -> `begin_region_pipeline` -> `region_ledger::let_go` -> `Kept::settle` -> `Entry::prune` -> `RegionLedger::lists`. On the consumer's Iris Xe, a guest compute benchmark's timed pass spent 0.70 CPU-s there (0.46 at the earlier pin), 36 us a dispatch in one workload (6 at the earlier pin), 12 to 30 in four others. Now the ledger names each key that leaves its list, popped past its bound or forgotten by its memo's eviction or removal (`Unlisted`), and the settle asks the ledger of those keys alone, destroying a kept instance's region pipeline at a key not listed again. What triggers a prune (keys past the bound) and what a kept instance keeps (only the region pipelines the ledger lists) are unchanged. The named keys are bounded at the ledger's bound; past it (a run of host steps' makings, which settle nothing) the settle walks every kept region pipeline, as before. A kept instance destroyed whole un-lists its keys without naming them (`forget_destroyed`). Test: region_widths' `a_full_ledger_s_settle_looks_at_the_keys_it_let_go_alone` keeps a released kernel's 256 region pipelines under a device bound of 256, then makes another kernel's 64 keys, each letting one go: the settles must ask the ledger of at most 64 keys (a test-only count of the prune's lookups), and the kept instance must hold 192. Verified (msi, lavapipe, m3-max-30414 at 0674dd4287, the same code but for one line: a drain of the named keys, now `mem::take`, as clippy asked): the new test and region_widths, kept_variants, compute, compute_bind_memo, compute_instantiated, compute_parked, dispatch_pending, dispatch_tracking, spares_compute and pipeline::kept: 22/22. The negative control (the whole walk at each prune, steelbrain/gbdisp-ctl) and the release A/B of both run in m3-max-30415. No WorkCounts field, Degradation kind or public item changes. Landed (main): touched tests 22/22 on lavapipe in m3-max-30414 at 0674dd4287 (one clippy line apart). Clippy rerun, the hand negative control (steelbrain/gbdisp-ctl 3ae942101c, expected 14,368 lookups) and the release A/B (m3-max-30415) run after landing. No RUNTIME bump: the same region pipelines are destroyed at the same prunes; answers, recorded commands and WorkCounts are unchanged. |
||
|
|
dcfa3e7a94 |
Re-bless the authored compile census at pin 94
The census at
|
||
|
|
13bac091e1 |
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. |
||
|
|
dd486250e3 |
RUNTIME 2317: A kept draw reading its pass's copy by the area rule takes its reader identity and query
What:
- render/draw_again.rs, rebound.rs: a kept reader drawn again or rebound
takes its reader identity and occlusion query as every step takes them,
whichever form it reads through (the copy taken before the pass among
them), and records its drawing commands inside the query. A debug
build checks each draw again's identities against the step's
(Readers::taken).
- slow_submissions.rs, command_buffer/submit.rs: a batch held in the
scheduler's group gets its slow line, timed from its submission to its
hold, naming the group.
- Tests: kept_shadowed_draws counts a frame's begins as the command buffers
it began (WorkCounts::command_buffers_begun), not the device's begin
calls, which begin-ahead spares move; kernel_end_device's slow-line
check expects a group held by the groups' ends.
docs/API.md and env_vars.rs describe the slow line.
Why: at pin 93b on the 780M (devlegs), kept_shadowed_draws' kept frame
recorded 3 queries where the apart frame recorded 4: a kept draw through
the pass's copy skipped its reader's query, so its coverage was never
learned. kernel_end_device's slow line was missing for a batch held in a
group.
How verified (lane keptquery): 780M (RADV PHOENIX) at 918d3319ea,
m3-max-30392: 86/87, all four kept_shadowed_draws pass with queries 4 in
both frames, 31 of 355 kept draws checked taking an identity, begins equal
to the command buffers begun; the one failure was its own new group check,
fixed in 68c8917098. Negative control at
|
||
|
|
c404358025 |
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. |
||
|
|
1858a2fb34 |
RUNTIME 2316: Rate-mapped passes count their region-copy and fanned-out vertex work by box size
What: new WorkCounts fields - rate_map_whole_copy_vertex_regions, rate_map_own_copy_vertex_regions, rate_map_run_vertex_regions: vertices x regions drawn through the region-copy variant into the whole table, by the encoder's own draws, and by a host step's runs; - rate_map_fanned_vertices, rate_map_fanned_box_vertex_regions: vertices fanned out through the geometry stage, and those times the regions of their probe-bounded boxes; - rate_map_fanned_vertices_boxed_16, _64, _256: fanned-out vertices whose boxes hold at most that many regions. render::fan_out::Probed::of also ORs every block's bounds (its reach). FAST-PATHS' FanOut row, docs/API.md and rate_mapped_pass.rs list them. Why: on Iris a whole-table region copy costs about 16x a geometry-stage fan-out a triangle, and the consumer's 127 ms a frame of rate-mapped GPU time cannot be split between the encoder's own whole-table draws, runs and fanned draws from today's counts. A plain sum cannot say how much fanned work lies in small boxes, which a cheaper route for few-region draws would take. How verified (lane ratemap3, msi m3-max-30401 at 7a17a61829): render::fan_out unit tests 6/6; rate_map device tests on lavapipe 19/19, with exact counts in a_host_step_fans_out_the_commands_the_probe_does_not_flag (encoder frame: own == whole == (5 x 3072 + 9) x table regions; host step: no whole-table work, fanned vertices exact; under Exact all zero); clippy -D warnings plain, cpu_icd and gpu; api_signatures --check clean. RUNTIME 2316: what a run records changes. No Degradation kind, no behaviour change. |
||
|
|
44cab7933f |
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. |
||
|
|
c2154d174f |
Device tests at pin 93b: staged records, queue plans, readers' own counts, unmade shadows
What (lane devlegs, the pin 93b device legs' test-side fixes):
- 308a8fe305 Device tests weigh readers by their own counts, bound command buffers by the peak seen, and expect staged records in generated executions
- 6951cb9635 Host-step notice checks of queue_order expect staged records too, through one helper
- 32d3d4eed7 Lane notice checks expect staged indirect records wherever the device staged them
- dcd14d9bb3 Lane tests that make a command queue per dispatch or per program take the queue plan
- ba649ccc4e The parity harness's runtime device takes its queue plan
- 7449dda069 shader_stencil's notice checks start from shared_kinds, staged records with it
- 6437e8482c fresh_pages: a shadow left unmade is announced as a reach makes it
- e0163a7a94 compute_inherited_buffers' runs share one command queue, whose kept barriers the first records
Why: at pin 93b (
|
||
|
|
c5b49b39d1 |
Apart-read tests clear to whole 8-bit codes and name the bytes they expect
What: buffer_carved_reads and heap_placed_reads clear the texture they read to [64/255, 128/255, 191/255, 1.0] in place of a 0.5 channel, and each texel check prints the bytes it expected and the first other texel it read. Why: on the RTX 3090 and RTX 5080 at pins 91b, 92 and 93b, the three apart-read tests failed with every texel [0x40, 0x7f, 0xbf, 0xff] where the test expected 0x80 in the second channel. 0.5 x 255 = 127.5 lies halfway between two codes; Vulkan's float-to-unorm conversion may return either (spec 3.10.2), and NVIDIA rounds it down where RADV, lavapipe and Metal round up. The runtime announces it already (device-color-conversion). The draw read the right texture, and sync validation reported no hazard (3090 job m3-max-30280). Whole codes round the same on every device; device_recovery_textures already uses 128/255 so. How verified: the old colour fails all three on the 5080 (m3-max-30250) and the 3090 (m3-max-30252) at 91b and 92. The branch's lint and lavapipe check (m3-max-30325) and the 3090 and 780M reruns run after landing. Test-only: no RUNTIME bump. |
||
|
|
77c0733442 |
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. |
||
|
|
057b794f5b |
SEMANTICS 2115 / RUNTIME 2315: rate-mapped region copies record a box of regions per multi-draw
What: a draw through its region-copy variant recorded its regions 16 at a time (the device's
viewports). Each recording set 16 scissors, pushed its first region and stored DrawIndex as
ViewportIndex. On a guest frame the host step made about 4.7k such recordings a frame (Iris and
RTX 3090), while the GPU sat idle waiting for the step.
The variant's four clip distances already keep each copy to its region's pixels, as a fanned-out
copy's are kept; the per-region scissor only culled. Now:
- The vertex function draws region first + (DrawIndex / c)*nx + DrawIndex mod c from a pushed
box (PushField::RegionBox, renamed from RegionFirst, now [first, columns]).
- It stores 0 as ViewportIndex, the recording's one viewport, so it writes every output the base
variant wrote.
- The recording sets one viewport and its box's union scissor.
- A direct draw records a box as many regions at a time as one vkCmdDrawMultiEXT takes
(maxMultiDrawCount - 1), its rows in order. A run records one recording per box its bounds
reach; any other draw records the whole table in one or a few.
- Indirect draws keep one region a recording, under that region's scissor.
- The variant still needs shaderOutputViewportIndex and shaderDrawParameters; it no longer
needs multiViewport.
Exactness: a border between two regions of a recording holds no pixel centre and no sample at
Vulkan's standard sample locations (at least 1/16 px inside a pixel, up to 8 samples), while each
copy's clip distance there is zero up to rounding. A box is recorded one column (row) at a time:
- in a pass whose custom sample positions put a sample on a pixel's left (top) edge;
- on a device without standardSampleLocations;
- in a 16-sample pass.
See render/fan_out.rs, folds.
A box's recording and the recordings of each of its regions alone run one pipeline that writes
the same outputs. They differ only in their dynamic viewport and scissor values and the integer
region each draw selects (Vulkan's Invariance appendix, Rules 2 and 4). The agreement between the
encoder's region-copy vertex function and the host step's fan-out geometry stage stays the
existing FAST-PATHS known gap, checked by running: no new near-equivalent, no new accepted
difference.
SEMANTICS_VERSION 2115 (the variant's module and push layout); ARTIFACT_FORMAT_VERSION 523 (the
PushField tag); RUNTIME_VERSION 2315 (what a region-copy draw records). Docs: rate_mapped_pass.rs,
render/fan_out.rs, bind/fan_out.rs, the translator's region-copy plan and store, docs/API.md, and
the FAST-PATHS fan-out row and known gap. docs/REFUSALS.md regenerated unchanged; api_signatures
blessed. No new Degradation kind, no WorkCounts field.
Tests:
- render/fan_out/tests.rs: run boxes, box recordings, box scissors, the fold rule.
- tests::rate_mapped_region_boxes (device test): the same two passes drawn directly (boxes) and
indirectly (one region a recording, its own scissor), additively blended into RGBA16Float with
a ground plane, border-crossing slivers and off-screen and w-straddling triangles, then an
Equal pass, compared bit for bit, with the recordings counted.
Verified (lane ratemap2):
- msi m3-max-30288 at 9240cc0ea6: clippy -D warnings, all targets and features, plain, cpu_icd
and m2v_gpu, exit 0; rustdoc -D warnings exit 0; translator touched tests 226/226; runtime
33/33; lavapipe 13/13.
- rate_mapped_depth_equal: 0 failing pixels in every pairing under Exact and FanOut. Without
the ViewportIndex store, FanOut's mixed-route pairings had 2853 of 89483 (m3-max-30235).
- rate_mapped_region_boxes: direct 3 draws in 3 recordings against indirect 3 in 624, 0 texels
differ, Equal-pass mismatches [0, 0].
- Negative control (each clip distance widened by one pixel): rate_mapped_region_boxes fails,
25464 texels differ, Equal-pass mismatches [11019, 0].
- The Iris GPU-time A/B (ms01, m3-max-30315, exclusive) is running; the consumer's renderer run
at the next pin is the workload proof (rate_map_piece_gpu_nanos a frame on Iris).
Landing note: docs/API.md merged by hand with RUNTIME 2314's probe-parts sentence (both rewrote one
paragraph), and rate_mapped_pass.rs's Fan-out now says the probe runs in parts (RUNTIME 2314).
|
||
|
|
400efe7932 |
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. |
||
|
|
744dfd4d9d |
RUNTIME 2314: A host step's rate-map probe runs in parts, each on the GPU while the host records the next
A rate-mapped pass whose records the GPU may write is recorded by a host step that fans its triangles out to the map's regions after a probe: every command's draw recorded once more through the probe variant, submitted, and waited for before the routes are recorded. The host recorded the whole probe with the GPU idle, then sat idle itself for the probe's whole GPU time. On a 3D renderer's frame on an RTX 3090 (pin 91b) that wait was 23-35% of host_step_nanos, 5-7 ms of a ~22 ms step, three steps a frame. Now the probe is recorded in parts: at least 32 commands a part and at most 8 parts a probe (DeferredPass::probe_parts). Each part is submitted with its own fence once recorded, so the GPU runs it while the host records the next, and the host waits once, for every fence, after the last part (CommandBuffer::submit_fenced / wait_fenced, the halves of rerun::submit_waited, which the predicated loop's runs again keep using). A part may hold commands of several executions; its draws take the flag words one recording would give them (the index carried from part to part, each command's slot by its place among its execution's commands that run), so the probe's words, the routes and the pixels are the same in any parts. A probe that stops (a barrier, a draw that writes memory) stops for the rest of its execution; a part recorded in more than one run sends the execution region by region, as one recording did. Every part submitted is waited for before the step goes on, a failed later recording's too. Ordering: the parts go on the command buffer's own VkQueue, in order, and each part's primary begins with the segment's full barrier (EncoderCore::segment), as the one probe's did, so part k+1 follows part k and the pass follows the last; no semaphore and no other queue's edge is added. Cost: up to 7 more submissions and probe render pass instances a step (load and store in GENERAL, no fragment). WorkCounts::rate_map_probe_parts counts the parts; rate_map_probes stays one a step; rate_map_probe_gpu_nanos sums the parts' times; rate_map_probe_wait_nanos is now the host's one wait after the last part. Test: tests::rate_mapped_fan_out's a_host_step_probes_many_commands_in_parts: 72 commands (the eight's pattern nine times) probe in 3 parts with the same flagged, fanned-out and parted draws, each 9 times the eight's, and the encoder's pixels; the eight-command test asserts one part. The workload takes its command count. New WorkCounts field: rate_map_probe_parts (api_signatures blessed). No new Degradation kind. No RUNTIME_VERSION bump (main does it at landing). Also in this landing: the icb_reads example's --rate-map and --wide-every W (the A/B shape); the parts' recordings joined once, after the wait; and the split fenced wait reaching the device's functions inside each exit-guard section (a predicated loop's run again on the loop thread). RUNTIME_VERSION moves: a host step's probe of an unchanged artifact is now recorded and submitted in parts. Verified (lane icbstep2, msi lavapipe): - m3-max-30234 at c41586a13d: clippy -D warnings plain and cpu_icd (runtime, all targets, all features) exit 0; 63/63 for rate_map|rerun_arenas|indirect_command_buffer|icb_|host_step| fan_out, among them the ordering tests a_flagged_draw_s_parts_take_each_triangle_once_in_order, a_host_step_s_instances_follow_their_commit_in_the_program_s_order, a_recovery_s_carry_waits_for_a_write_without_the_lock and an_unshared_head_at_its_host_step_goes_before_work_whose_room_came_after_its_commit; the new a_host_step_probes_many_commands_in_parts reports probes [1,36,36,36], 3 parts and 5 submissions, with the encoder's pixels. - Negative control m3-max-30241 (one part a probe): the new test fails, "the probe's parts of 32, 32 and 8 commands, left: 1 right: 3", with the same probe counts. Expected, not yet measured: the 3090 release A/B (host_step_nanos and rate_map_probe_wait_nanos a step) follows. The consumer's renderer run at the next pin is the workload proof. |
||
|
|
f3a2ff76f7 |
Runtime device tests: an unmade shadow is a shadow; a wide view alignment reads one table whole
What: - tests::shadow_forms(before, after) (tests/mod.rs) counts the textures that took the shadow form, made or left unmade until a reach makes it (RUNTIME 2309, |
||
|
|
1a6fcf6ece |
A kernel's patch control-point input stays refused: pin it and say why
What: an ABI test, a_kernel_takes_no_control_point_input, decodes one synthetic module's
air.patch_control_point_input (its declared, never-defined fetch function and two fields) on a
post-tessellation vertex function and checks that the same input on a kernel is refused,
InvalidInput(Abi(UnknownKey)) at argument 0 and that key. docs/API.md's kernel [[stage_in]]
section states the refusal, Metal's answer, and the two forms through which a kernel does read
vertices by index.
Why: Metal refuses the shape too. `metal` (32023.922) writes no control-point input for a
kernel: every MSL spelling fails to compile ("invalid type 'patch_control_point<CP>' for input
declaration in a kernel function"). A kernel assembled by hand in the post-tessellation shape
(xcrun metal-as, metallib) gives a library and a function on an M3 Max under macOS 27.0.1, whose
reflection lists both fields as control-point stage-input attributes. Every compute pipeline of
it fails, "Internal compiler error.", under Constant, ThreadPositionInGridX (rates 1 and 2, a
region origin of 2), ThreadPositionInGridY and both indexed steps. Without a descriptor Metal
asks for one, and a vertex step function in a compute descriptor stops at a framework
assertion. As a check that the module was well formed, the same body as a [[patch(quad, 4)]]
vertex function makes its render pipeline and fetches patch p's point j as element 4p + j. As a
check of the host and the descriptors, an MSL kernel [[stage_in]] of the same attributes makes
a pipeline under every one of them. So the refusal stays where it is, at the pipeline compile.
The ABI has no error kind for a role outside its stage other than UnknownKey (its documentation
covers a role the stage does not accept), so the error kind is unchanged and REFUSALS.md does
not move.
Verified: the M3 probes ran as potluck jobs m3-max-30194, 30197, 30201 and 30203. The test,
clippy, and a negative control (the role allowed on a kernel, which fails the test) ran in one
msi job, named in the report.
Checks (msi m3-max-30227 at 70b57adf99): clippy -D warnings plain and cpu_icd exit 0; 74 touched
tests pass; negative control (the refusal made to accept) fails the new test, exit 100. No
RUNTIME bump: the refusal and its error are unchanged.
|
||
|
|
b8b03a31cc |
Lanes: leading_costs and compositor_costs measure what a frame's attachment reads cost on the GPU
What: two ignored release lanes in metal2vulkan-validation, measurement only. No product code changes. - runtime_lane::attachment_read_costs::leading_costs: a reader whose snapshots lead its instance, against the split's copy. Its private plane lies at 64-byte aligned rows, which a linear image takes in place. - runtime_lane::compositor_costs: a compositor-shaped frame of 105 render encoders, with the read ratios of a consumer's desktop walk. It comes in four shapes: - readers as they are; - readers whose read texel decides a branch, which take the split; - the same calls without barriers; - no reads at all, the frame's floor. Each shape runs over a private framebuffer and over one on host pages. The lane prints GPU ms a frame with passes, barriers, splits, snapshots and copied texels. Why: to size a lever before building it. Measured (median of 15 frames, GPU ms): - Iris Xe, ANV (m3-max-30191 at d2c9d15a73): - host pages: floor 28.07, readers 37.87, branch readers 39.32, no barriers 39.18; - private: floor 6.89, no barriers 10.94, branch readers 12.48, readers 13.30. - RTX 5080 (b5080), floor / no barriers / branch readers / readers: - private: 0.97 / 1.62 / 1.99 / 2.25; - host pages: 30.22 / 35.17 / 38.81 / 41.06. On Iris, serving branch readers by snapshots would save about 24 us a reader over host pages, under the bar for building it. Fills over host pages cost 4.1x (Iris) and 31x (5080) the private ones. No 3090 run was made. Checks: msi m3-max-30230 at 163c7efdbf: clippy -D warnings (runtime + validation, all targets, all features) plain and cpu_icd, both exit 0. No RUNTIME or SEMANTICS bump: no artifact's run changes. |
||
|
|
38cc6ae244 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
ec6f1a1109 |
RUNTIME 2313: DeviceRecovered's announced cost states the pooled ICB records RUNTIME 2311 loses; device-leg tests count lazy shadows and size depth heaps by the query
Three fixes from the device legs at |
||
|
|
05d5da5ba6 |
Re-bless the authored compile census at pin 93
The census at
|
||
|
|
b89241fafa |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
22fa0997b1 |
RUNTIME 2312: A write-only argument-buffer use of a texture whose writes Metal drops names none of its image
What. A command that makes a texture resident whose writes Metal drops (metal::format::writes_dropped: the 4:2:2 formats, the subsampled and packed two-plane YCbCr ones) names no use of it where its binding plan's heap holds it at no element (no WriteSource::HeapEntry of its token): every heap storage array holds such a texture as its neutral (bind::heap's Fit::Dropped), and a kernel that only writes it declares no sampled array, so its function reaches none of the texture's image (binding.rs, resident_uses_into; the storage-only test holds_write_shadow becomes heap_holds, by class access or any). Why. A kernel that only wrote a YCBCR8_420_2P texture through an argument buffer (useResource WRITE) named the texture's image as a written use. That use matched the texture's converted shadow, so the command's shadow planning made and recorded the planes' conversion (ShadowCopies::prepare -> YCbCrConversion::make), and on a device that converts 4:2:0 itself (Iris Xe: the consumer's pin 92 Iris leg, writes_through_argument_buffers_of_two_plane_ ycbcr_textures_are_the_slots) that first conversion announced ycbcr-filter-not-exact though nothing read the texture: relayed in default mode, fatal in strict mode. The write itself was dropped, as Metal drops it. 4:4:4 textures already named only their write shadow. Now such a command converts nothing and announces nothing; a command whose function reads the texture through the argument buffer (a sampled array holds it) converts it and announces the device's conversion as before. Test: runtime_lane::ycbcr_argument_writes::a_kernel_that_only_writes_a_held_ 420_texture_converts_none_of_its_planes (lavapipe and GPU lanes): resident WRITE and READ|WRITE, the write-only kernel records no conversion (ycbcr_refreshes + ycbcr_whole_conversions), announces no ycbcr-filter-not-exact and leaves the planes' bytes; a kernel reading it through the argument buffer records one conversion and announces the notice where the device converted the texture itself. lavapipe converts 4:2:0 through Metal's arithmetic, so there the conversion count is the check that fails without the fix. docs/API.md's catalogue entry and ycbcr.rs's writes bullet say so. Verified (lane ycbcrnote, at 12dbbcc67e on |
||
|
|
4aacef045b |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
dfda37628d |
RUNTIME 2311: ICB records lie in pooled memory where a held pointer import taxes every submission
What: DevicePolicy gains indirect_records (IndirectRecordsPolicy, a runtime
choice no profile carries). Under the default, Untaxed, an indirect command
buffer's records and overflow slots take fresh pages of the runtime's own
(a pointer import held for the buffer's life) only where the device's import
tax check has not found that a held pointer import costs every submission, or
has not answered; where it has (RADV, ANV on i915), they lie in pooled
host-visible memory as the runtime's other buffers do. Under Carried, which
exact_answers() selects, they lie in fresh pages wherever the device imports
host pointers, as before, so a recovery keeps them. A recovery of a taxed
device under the default loses pooled records and rewrites them as a new
buffer's (carry.rs's existing pooled path); the device-recovered notice
already counts such buffers ("N indirect command buffers, M of them whose
records were lost"), as on a device without pointer imports and for
device-local records on discrete GPUs. No new Degradation kind.
Why: on a Radeon 780M (RADV, Mesa 26.2.6, Linux 7.3.3) beside a guest game
whose ICB records were the process's only pointer imports (3 buffers, 19.6 MB),
the submission thread had 5 windows of 65-140 ms in 12 s in which every
amdgpu_cs_ioctl waited in mmu_interval_read_begin or returned EAGAIN (373 of
the run's 382 failed calls, retried at once by libdrm). RADV lists every
imported memory in every CS, amdgpu re-faults every userptr page each CS and
adds the CS fence to every listed BO, so a page migration of one of those
pages (kcompactd, khugepaged, and the runtime's own block making in direct
compaction) waits in amdgpu_hmm_invalidate_gfx for all the process's GPU work
in flight while every submission waits behind it. With no userptr BO listed,
compaction migrates pages without waiting on any fence.
Docs: the FAST-PATHS ledger row (default, switch, the recovery cost, the
measured chain), API.md's device-recovered text, HOWTO's residency section,
fresh_pages.rs, indirect_command_buffer.rs and carry.rs, the conformance
crate's Policy::Exact list. API: signatures blessed, api_surface row,
REFUSALS.md regenerated.
Tests: tests::icb_records_policy (Linux, cpu_icd/gpu): the import tax forced
Holds/Fails; under Untaxed+Holds the records lie in pooled memory, no fresh
pages made, a recovery moves them and its notice counts 1 lost; under
Untaxed+Fails and Carried+Holds in the runtime's own pages, kept, 0 lost. The
translator's fast_paths names the choice, checks it keys no profile and that
exact_answers() takes Carried. icb_carry_race's own-pages cases run on a
Carried device (device_recovery::carried_device), so they assert the carry of
own pages whatever the device's verdict.
RUNTIME_VERSION moves: where records lie and what a recovery keeps change on taxed devices.
New public items: metal2vulkan::device::IndirectRecordsPolicy { Untaxed, Carried } and
DevicePolicy::indirect_records.
Verified, msi m3-max-30127 at cba1ec585a (the fix plus a test-only fix: DevicePolicy is
non-exhaustive, so the tests set the field on a copy):
- clippy -D warnings --all-targets --all-features: metal2vulkan + runtime plain 0, runtime
--cfg m2v_cpu_icd 0;
- translator tests 49/49 (fast_paths with the new choice, its no-profile key and exact_answers
tests, api_surface, api_signatures);
- runtime under cpu_icd on llvmpipe 34/34: icb_records_policy, icb_carry_race, icb_records_home,
indirect_command_buffer*, device_recovery_every_kind, device_recovery_carry.
ICB-RECORDS lines:
- Untaxed with the tax forced Holds: records not in own pages, 0 fresh-page buffers, the
carry moved them, notice "1 of them whose records were lost";
- Untaxed with the tax forced Fails: own pages, 2 fresh-page buffers, kept;
- Carried with the tax forced Holds: own pages, 2, kept.
Workload proof owed: reims's traced loaded-desktop walk on the 780M (per-CS get_user_pages 0, no
-EAGAIN windows).
|
||
|
|
483b4650d1 |
fixed_index_draws example: a frame of indexed draws whose indices a dispatch before each draw writes
What a GL-on-Metal layer's frames cost the GPU where a compute dispatch before each draw fixes up that draw's index buffer (each dispatch writing a Private buffer of its own, in serial compute encoders of 256 dispatches, then render passes of 26 indexed draws, 4 passes a command buffer), beside the same frame with the indices written once before (prefixed) and the compute encoders alone (dispatches). The defaults follow a GL benchmark's per-second counts on the runtime (about 470 compute encoders of 256 dispatches, 4,650 passes of 26 draws, 1,270 command buffers). The kernel and the draw's functions are a new owned MSL fixture, fixtures/public/examples/fixed_indices.metal, compiled by regen-air-fixtures --dir examples. Release measurement on an RTX 5080 Laptop GPU (b5080 entry glfix-framesplit-124152; GPU busy per frame, union of command-buffer spans, median of 60 frames; a frame of 1280 draws): - fixed: 0.526 ms; - prefixed: 0.404 ms; - compute encoders alone: 0.116 ms (0.09 us a dispatch). fixed minus prefixed equals the dispatches' own time, so the compute-to-render transitions and the extra command buffers cost about 0.006 ms a frame. No runtime source changes; the runtime pin moves alone. Verified: msi m3-max-30123 at 195f2073fd: - runtime crate clippy -D warnings --all-targets --all-features, plain and --cfg m2v_cpu_icd: 0; - release build: 0; - a lavapipe run of all three shapes: the index check passed after each. |
||
|
|
fe38b678dc |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
ce54ad8b25 |
RUNTIME 2310: an unshared commit on its way goes before another queue's batch whose room came after it
A scheduler pass that found another queue's batch's room let it go while an unshared queue's commit there, taken in, waited only for the runtime: its host step (handed to the steps' thread in the same pass), its submission checks, or a shared event's value whose signal was already submitted and had not landed. Order::next refused the unshared head and sent the other batch; the unshared command buffer then waited for that whole batch on the GPU. In reims's traced walk ld91 (um870 Radeon 780M, guest compositor beside gameload) another queue's batch went in while a compositor's command buffer so waited ahead of 33 of the 46 frames answered more than a refresh late: 20 at its host step (e.g. take 1794684425.009: gameload #19392 committed -3.0, submitted +2.6, inside WS #19398's commit +2.3 -> submit +2.8), 13 waiting for the landing of its other unshared queue's signal. The rule (unshared_hold.rs, "Commits on their way"): each unshared commit carries its place among those posted on its VkQueue (SlotShare::posted_unshared now answers it). Each look collects the unshared heads on their way (on_its_way: binary semaphores ready, every event value reached or reached by a submitted signal, held only for its host step with no pipeline making pending, or for its checks) that wait behind no earlier commit (is_behind), and a batch whose room came is held (behind_commits) while one posted before its noted count leads its line so. The step's end, the checks or the landing wake the scheduler's thread, whose next pass sends the unshared one first. Each look asks again: a head waiting for anything else (a value nothing submitted reaches, a binary semaphore, a making, a decode, a rebind) or behind an earlier commit (the held batch's own included) holds nothing, so neither waits for the other. Other threads' passes leave such batches to the scheduler's thread (first_for_the_thread widened to heads on their way), which they wake. Counted in the existing WorkCounts::heads_held_for_unshared_commits (doc widened). No switch, no public item, no Degradation kind. Docs: unshared_hold.rs, FAST-PATHS unshared-isolation row, API.md. Tests: unshared_hold unit test of behind_commits with places on their way; queue_share_device (lavapipe), each leg by the scheduler's pass and a committing thread's: an_unshared_head_at_its_host_step_goes_before_work_whose_room_came_after_its_commit, an_unshared_head_waiting_for_a_signal_to_land_goes_before_work_whose_room_came_after, an_unshared_head_behind_an_earlier_commit_of_the_held_queue_holds_nothing, an_unshared_head_waiting_for_a_value_nothing_submitted_reaches_holds_nothing. RUNTIME_VERSION moves: what a run submits, and in what order, changes. Verified (msi lavapipe): - m3-max-30046 at 71c8bf7337 (the rule plus a test-only fix), runtime crate, --all-features --all-targets -D warnings: - clippy plain and --cfg m2v_cpu_icd: 0; - 103/103 tests: unshared_hold, queue_share, queue_share_device, scheduler, scheduler_held_wakes, scheduler_wakes, inbox, waiter_submits, commit_and_submit, hold_sites, dispatch_pending, queue_limits_device, stall. - New tests, each run once through the scheduler's pass and once through a committing thread's: - at its host step: the other buffer began 0.168 / 0.199 ms after the unshared one; - waiting for a signal to land: 0.183 / 0.206 ms after; - behind an earlier commit: holds nothing; - waiting for an unreached value: holds nothing. The RV2303 tests still pass. - Negative controls: - m3-max-30021, rule off: both "goes before" tests fail (the other buffer began 1.519 ms before the unshared one); - m3-max-30036, the two no-hold exclusions removed: both no-hold tests time out at 20 s. - Test-only fix in this change: RV2303's committing-thread test held its scheduler thread with an application batch that now correctly waits behind the stepping unshared dispatch. Its holder is now a command buffer on another unshared queue, which nothing holds back. |
||
|
|
bfb51bc5c2 |
Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no longer described the sources and `the_runtime_sources_are_the_committed_ones` would fail. Recomputed over the same inputs and committed by land-pkt.sh. |
||
|
|
e453efbf0a |
RUNTIME 2309: a texture whose rows are in place makes its shadow at the first reach of its image
A device-gap texture over a buffer (its image refused for a reason that leaves its rows in place: format, pitch, placement, source, dma-buf) was a shadow made at new_texture: its VkImage, memory and views, its notice and shadow-log line, and its slot in the texture table and every heap set. A slot whose function only reads, writes or asks its size binds the rows in place, so a texture only ever bound that way paid for a shadow no command used (reims's gbs91 on the 780M: hundreds of such textures, 8 to 52 MB each). Now such a texture (rows in place, no pending in-place verdict, not over a heap's buffer) is made with its shadow left unmade (texture/lazy_shadow.rs): the storage accessor makes it at the first reach, once, under a lock, with the making's notice, log line and counts, then places its slot (its resource ID reads the neutral until then). Paths that must not make it read the recipe instead (rows binding, placement and heap-set writes, CPU copies, blits on the bytes, shape and plan questions, logging). The reaches that make it: a slot that binds the image (before the command's copies are planned from its uses), use_resource, a pass's attachment, an execution of commands inheriting the bindings, a view, its VkImage handed out. An out-of-memory making fails the reaching call, as new_texture did. WorkCounts::shadows_left_unmade and shadows_made_at_use count both halves; docs/API.md says when the shadowed-texture notice is given. Not in scope: two kinds still make their shadow at new_texture. A texture waiting on its pages' in-place verdict may move in place. A texture over a heap's buffer is made resident by use_heap through a path that checks the shadow. RUNTIME_VERSION moves because the run's announcements change. The shadowed-texture notice and the shadow-log line come at the making, and a texture only ever bound through its rows gives neither. A resource-ID read of an unmade texture gets the neutral. No new Degradation kind. No FAST-PATHS row: the copy work follows uses, not the shadow's existence (an unbound shadow was copied 0 times per commit before and after), so no accuracy is traded. The saving is the making: the VkImage, its memory, views and heap-set slots. Test: tests::texel_rows_device::a_shadow_is_made_at_the_first_reach_of_its_image, on a copied buffer, since over the pages lavapipe lays the rows in place. Three cases: - a written-only texture: shadows_left_unmade +1, none made, shadowed_textures 0, shadow_copies 0, texels inverted in the pages; - a rows write then a sample in one command buffer: made at the sample, copies > 0, pixels equal to a device-own texture's; - use_resource: made at the call. joined_residency's helper asserts shadows_bytes() where it asserted the shadow at new_texture. Verified, msi m3-max-30024 at 088a73d3b7: - clippy -D warnings, runtime crate, all targets and features: plain and --cfg m2v_cpu_icd exit 0; - lavapipe 206/206: texel_rows, shadow*, read_twin*, joined_residency, padding/kept_padding, exported_*, first_host_texture, surface_shapes, attached_read*, copied_device, fresh_pages, texture::*; - translator api_signatures, api_surface and fast_paths: 47/47; - the negative control in the same job (lazy = false): the test fails at "Copy: left unmade", (0,0,1) against (1,0,0). |