Runtime attachment images start at zero where an unstored DontCare load stays DONT_CARE

What: Device::new_planned_texture, which makes the runtime's own images (the
scratch image of separate depth and stencil textures, stand-ins, backings,
colour twins), starts an image with color or depth/stencil attachment usage
that a clear writes at zero (Start::ZeroUnpatterned) on a device whose
unstored DontCare loads stay the driver's DONT_CARE
(clear_reach::UnstoredLoads::DontCare: UnstoredDontCarePolicy::Driver on a
driver without DriverFact::UnstoredClearNoSlower). Elsewhere it starts as its
memory lies, as before. FAST-PATHS' unstored DontCare row and API.md say so.

Why: such a load reads what the image holds (a depth or stencil test, a
blend, a fetch). A Private runtime image started as its memory lay, and a
recycled one may hold a released texture's texels, of another process of a
consumer whose processes share the device. Devices that clear such loads read
nothing of it, so they pay no clear.

Verified: tests::unwritten_parts on lavapipe and Iris Xe (jobs in the
report).
This commit is contained in:
Anees Iqbal committed 2026-11-12 23:41:01 -08:00
1 parent 8aa703617d
commit 7b77851a95
3 files changed
+28 -5

No files matched your search

+24 -3
View File
@@ -2952,8 +2952,14 @@ impl Device {
/// into (`depth_stencil_scratch.rs`), made for `maker`, which holds it as its
/// [`ImageMaker`] says, or the one of the same descriptor and plan `maker` lends again. Its
/// image starts in `UNDEFINED`, which the device's next submission leaves for `GENERAL`
/// (`texture/first_move.rs`): making it waits for no GPU work. Refused as `new_texture`
/// refuses the image.
/// (`texture/first_move.rs`): making it waits for no GPU work. It holds what its memory held,
/// but an attachment's (color, depth or stencil attachment usage) that a clear writes, on a
/// device that leaves a `DontCare` load of an attachment its pass does not store to the
/// driver's `DONT_CARE` (`clear_reach::UnstoredLoads`): such a load reads what the image
/// holds (its depth or stencil test, a blend, a fetch), so that image starts at zero, never
/// as its memory lies, which may hold a released texture's texels, of another process of a
/// consumer whose processes share the device (a recycled image's, `recycle.rs`). Refused as
/// `new_texture` refuses the image.
pub(super) fn new_planned_texture(
maker: &dyn ImageMaker,
descriptor: &TextureDescriptor,
@@ -2970,7 +2976,22 @@ impl Device {
return Err(internal("an encoder's own image that is not `Private`"));
}
let key = plan.clone();
let image = device.new_image(plan, &layout, descriptor, HazardTrackingMode::Tracked)?;
let attachment =
ImageUsageFlags::COLOR_ATTACHMENT | ImageUsageFlags::DEPTH_STENCIL_ATTACHMENT;
let unstored = super::clear_reach::UnstoredLoads::of(
device.compile_device().policy().unstored_dont_care_loads,
&device.properties().driver_facts,
);
let start = match plan.usage.intersects(attachment)
&& unstored == super::clear_reach::UnstoredLoads::DontCare
&& device.clears_to_zero(&plan)
{
true => Start::ZeroUnpatterned,
false => Start::Held,
};
let identity = Identity::new(HazardTrackingMode::Tracked, false);
let owner = Device::runtime_owner;
let image = device.new_image_starting(plan, &layout, descriptor, identity, start, owner)?;
let record = ViewRecord::of_descriptor(&layout, descriptor);
let storage = Storage::Image(image.shared());
let texture = Texture::made(device, storage, record, None, IdUse::Runtime);
+3 -1
View File
@@ -299,7 +299,9 @@ compile does. `DevicePolicy::default()` is `DevicePolicy::UNTRUSTED`:
leaves it to the driver's `DONT_CARE` elsewhere, announced `dont-care-unstored-load`: lavapipe's
draws then read its earlier texels. `unstored_dont_care_loads = UnstoredDontCarePolicy::Cleared`,
which `exact_answers()` selects, clears it on every device. Separate depth and stencil textures
take the same answer, each aspect apart, in the scratch image the pass renders them through. A
take the same answer, each aspect apart, in the scratch image the pass renders them through. An
image the runtime makes to stand for an attachment there (that scratch image, a stand-in, a
backing) starts at zero on such a driver, never as its memory lies. A
memoryless one is not covered.
Loops run as written: no execution bound is translated in.
+1 -1
View File
@@ -44,7 +44,7 @@ three consumer pipelines: A2X (`a2x-s4`, `a2x-s96`), Xgc14 (`xgc14-bgra8`) and X
| A line Apple's `setLineWidth:` widens (`w' = floor(16 w) / 16`, other than 1), and a triangle's edge in fill mode `Lines`, is drawn by the device's own lines at `w'` wherever it draws that width (`wideLines`, `w'` in `lineWidthRange` and above 0), where Metal draws the parallelogram Vulkan's non-strict wide lines may be (`render/line_width.rs`). No device's are taken as it, announced on every device: a strict device's rectangle with square ends (lavapipe, NVIDIA), lines Vulkan does not state as parallelograms (ANV, and every width below 1), a width rounded to the granularity, and a driver's parallelograms (`strictLines` unset, `nonStrictWideLinesUseParallelogram` set), whose ends the driver places (RADV on the Radeon RX 7900 XTX draws 21 of `runtime_lane::line_widths`'s 48 scattered lines at width 2.5 a row or a column off Metal's at an end). A mesh draw's lines and edges and a tessellated patch draw's edges take the device's lines under either value, the band not drawing them (at the nearest width they draw where they do not draw `w'`, announced `lines-at-nearest-width`: a known gap below). The runtime's: no pipeline's code differs. | `wide_lines = WideLinePolicy::Device` | `wide_lines = WideLinePolicy::Exact`: a draw of lines or edges the device's lines draw is the pipeline's band variant (`VariantKey::line_band`, `pipeline::link::band`) on a device with `tessellationShader` (the device's lines where it has none, or where the translator refuses the state's band or the draw's): two triangles over each line's parallelogram, and each triangle's three edges' parallelograms facing as the triangle, through a tessellation control and evaluation stage; every other width other than 1 is the band under either value | The lines can cover pixels the parallelogram does not, and miss others, at each end and along each edge: up to half the width past each end (square ends), a rounded width, and a row or a column at an end (a driver's parallelograms). `DeviceWideLines` (`device-wide-lines`), at each such draw where `DeviceOptions::announce_each` asks, else once per device; `WorkCounts::device_wide_line_draws`, `line_band_draws`, `nearest_width_line_draws`; `runtime_lane::line_widths` (the band matches Metal's maps of lines and of triangles' edges, their facing, culling, flat inputs, primitive IDs and depth on MoltenVK under both values, which has no `wideLines`; a band of edges under a depth bias is announced `wide-edge-depth-bias`) | Not measured. Expected from the band's form: a second pipeline variant made for each render state that draws such lines or edges (its two synthesized stages), each line tessellated as a patch of two control points into four corners and each triangle as a patch of three into 21 triangles (12 degenerate), and a strip, loop or fan drawn as the list of its primitives |
| A blit or fill through a `BGRA10_XR` or `BGRA10_XR_sRGB` texture Metal keeps losslessly compressed (`allowGPUOptimizedContents`, 16 texels or more a side, neither `ShaderWrite` nor `PixelFormatView` usage, one sample, not over a buffer) is the device's copy, which keeps the bytes it moves, on every device: Metal's GPU blit into, out of or between such textures moves the texels through its compression, which writes each 16-bit field's low six bits cleared and the alpha code clamped to `[384, 894]`, and its fill clears the low six bits alone (an Apple M3 Max under macOS 27.0.1, every direction, storage mode, usage and size that decides the compression; CPU copies keep the bytes on Metal too). A pass's draws through such an attachment are the device-gap row below. The runtime's choice: no pipeline differs (`compressed_blit.rs`). | `extended_range_blits = ExtendedRangeBlitPolicy::Kept` | `extended_range_blits = ExtendedRangeBlitPolicy::Canonical`: after a blit writes such a texture's region, or a blit out of one writes a buffer's words, a texture over a buffer's or another texture's, a compute dispatch (`bind::extended_canonical_module`, `extended_canonical.rs`) rewrites the texels it wrote in Metal's encoding: in place in a buffer's bytes, an image's through a scratch buffer, a copy out and back around the dispatch; a fill's texel is encoded before it is written. A buffer whose words the device cannot bind (an offset or pitch off 4 bytes, a region past `maxStorageBufferRange`) and a texture over a buffer whose rows share bytes keep the bytes under either value, announced | Bytes no Metal write left (uploaded, CPU-copied or kernel-written texels: a field's low six bits, an alpha code outside `[384, 894]`) keep what Metal's blit would rewrite; a texel reads the same value either way, its low six bits unread and its alpha read clamped. `ExtendedRangeBitsKept` (`extended-range-bits-kept`), once per device; under `Canonical` not for the blits it makes exact; `runtime_lane::compressed_blits` (both values on MoltenVK), the conformance cases `compressed-blits-bgra10xr` and `compressed-blits-bgra10xr-srgb` | Measured, `Canonical` against `Kept`, on `Private` `BGRA10_XR` textures Metal keeps compressed (the sRGB twin and fills not measured), 256x256 and 2048x2048, one whole-texture blit a command buffer: p50 of 300 blits a run, the two values interleaved in one process, three runs a host. RTX 5080 Laptop (NVIDIA 615.71.09, the command buffer's GPU time): a buffer into the texture 23.5 against 11.5 us and 761 against 244 us from a `Private` buffer, 42 against 30 us and 1,945 against 1,176 us from a `Shared` one; the texture into a `Private` buffer 14.1 against 11.2 us and 287 against 246 us, into a `Shared` one, whose words the dispatch rewrites in system memory, 66 against 27 us and 3,386 against 1,182 us; texture into texture 22.5 against 9.7 us and 630 against 80 us. Apple M3 Max (MoltenVK 1.4.2, whose GPU times are the host's, so per blit of 16 in one command buffer), the same blits: into the texture +38 to +57 us and +536 to +548 us, out of it into a buffer +15 us and +84 to +94 us, texture into texture +46 to +48 us and +535 to +541 us. Every figure is above its `Kept` one in every run, by more than the runs' spread (under 1 us on the 5080): measurable at both sizes on both hosts. Into an image a blit adds a copy out into a scratch buffer of the region's size, the dispatch, a copy back and the barriers between them; into a buffer the dispatch and a barrier. The scratch is made without zeros, since the copy out writes every byte the dispatch and the copy back read; the figures above were taken while it was zeroed first, by a command buffer of its own (a fill on the 5080, a copy on MoltenVK). CPU from the command buffer's making through its commit, a blit alone: +1 to +3 us on the M3 Max, +1 to +127 us on the 5080, whose host other builds loaded; 16 blits into 2048x2048 images in one command buffer hold 16 scratch buffers of 32 MiB, and encoding each costs 141 to 165 us (5080) and 286 to 356 us (M3 Max), new memory blocks among it, against 2 to 6 us under `Kept`. Nothing for a texture Metal keeps uncompressed or of another format |
| A colour attachment of a texture's own image (not over a buffer's bytes, not memoryless, resolving nothing) that a pass stores `DontCare` is stored as the driver stores it: `DONT_CARE` on a driver measured to keep one of Metal's two answers or to store as Metal's own (`DriverFact::DontCareStoreIsOneOfMetals`, `DontCareStoreIsMetals`), else `STORE`, the rendered texels (`render_target.rs`). Metal's documentation leaves the contents open (`MTLStoreAction.dontCare`: "You need to assume that GPU discarded the texture's contents"); Apple's GPU leaves the texels the attachment held before the pass, the pass's clear and draws both gone (the conformance case `pass-sequence-color-actions`, an M3 Max under macOS 27.0.1, eight runs alike), or the rendered ones where its tiler overflows. A pass MoltenVK runs as one instance is handed to Metal's own `DontCare` under either value. | `dont_care_colors = DontCareColorPolicy::Driver` | `dont_care_colors = DontCareColorPolicy::Kept`: the pass renders through a backing its command queue keeps, one image of the attachment's shape, into which a `Load` copies the texels first, and nothing is copied back, so the texture keeps its earlier texels exactly (`kept_bytes.rs`, `WorkCounts::kept_texels_passes`); where a format makes no such image, the pass stores as under `Driver`, announced | Under `Driver`, the attachment holds the rendered texels (`STORE`: NVIDIA, lavapipe) or what the driver's `DONT_CARE` leaves (RADV, ANV: measured to be one of Metal's two answers), where Metal's holds the earlier texels unless its tiler overflows; where the pass also loads it `DontCare` and the runtime clears it (`unstored_dont_care_loads`, below), a tile no draw touches holds zero or the clear value. `DontCareStore` (`dont-care-store`), once per device; under `Kept` not for the passes it keeps; `runtime_lane::dont_care_stores` (both values), the conformance case `pass-sequence-color-actions` | Measured, `Kept` against the same pass stored `Store`, one pass of one draw over an `RGBA8Unorm` texture a command buffer, commit to completion, the median of 300 interleaved (a scratch measurement, `rows3_cost`): RTX 5080 Laptop (NVIDIA 615.71.09), a `Load` pass 19 µs more at 1920x1080 and 10 µs at 256x256 (16 µs and 7 µs of GPU time), a `Clear` pass 3 µs; lavapipe (llvmpipe, LLVM 23.1.4), a `Load` pass 0.5 to 0.8 ms more at 1920x1080 and 30 µs at 256x256, a `Clear` pass within the runs' spread. Memory: one backing image of the attachment's shape per command queue |
| An attachment (not memoryless) that a pass loads `DontCare` and does not store, in a pass whose draws reach a tile, is cleared over the render area (`clear_reach.rs`) on a driver measured to run that clear no slower than its `DONT_CARE` load (`DriverFact::UnstoredClearNoSlower`: MoltenVK on the M3 Max, RADV on the Radeon 780M), and left `DONT_CARE` on every other driver; an aspect of separate depth and stencil textures likewise, each aspect apart, in the scratch image of the combined format the pass renders them through (`depth_stencil_scratch.rs`). Metal's draws read zero (a colour) or the pass's clear value (depth, stencil) of such an attachment wherever they read it, never its earlier texels (an M3 Max under macOS 27.0.1: an `RG16Float` second colour a framebuffer fetch reads and a `Stencil8` a stencil test reads, in passes split and whole; a separate `Depth32Float` and `Stencil8` read by a depth and a stencil test, each aspect so loaded alone or both; `runtime_lane::dont_care_unstored`); Vulkan's `DONT_CARE` load leaves the contents undefined. | `unstored_dont_care_loads = UnstoredDontCarePolicy::Driver` | `unstored_dont_care_loads = UnstoredDontCarePolicy::Cleared`: cleared on every device, by the pass's first render pass instance's load operation, or before the pass where that instance leaves the attachment out (separate depth and stencil textures: by the scratch image's load operation of the aspect); Metal's answer wherever a draw reads it | On a driver without the fact, the draws read what its `DONT_CARE` load leaves (lavapipe: the attachment's earlier texels). `DontCareUnstoredLoad` (`dont-care-unstored-load`), once per device; `runtime_lane::dont_care_unstored` (both values: Metal's answer under `Cleared` and on a driver with the fact, lavapipe's earlier texels under `Driver`; separate depth and stencil textures alike, but what lavapipe's `DONT_CARE` leaves in the scratch image is printed, not checked) | Measured, `CLEAR` against `DONT_CARE`, the GPU's span per pass, medians of 15 frames in each of two rounds, eight 3648x2038 passes a frame (a `BGRA8Unorm` colour loaded and stored, an `RG16Float` colour and a `Depth32Float_Stencil8` loaded by the form and stored `DontCare`, one draw over the whole target writing all three; a probe whose runtime still left such a load `DONT_CARE`, without the validation layer): lavapipe (Mesa 26.2.6, llvmpipe on LLVM 23.1.4) 10480 and 10744 µs against 7280 and 7259, 3.2 to 3.5 ms more, its clear a write of every texel; ANV (Mesa 26.2.6) on the Iris Xe (RPL-P) 1936 and 1936 µs against 1907 and 1151, slower in both rounds; RADV (Mesa 26.2.6) on the Radeon 780M 861 and 865 µs against 1147 and 988, faster; MoltenVK 1.4.2 on the M3 Max 218 and 218 µs against 224 and 217, apart by less than one form's two rounds; NVIDIA's 615.71.09 on the RTX 5080 Laptop GPU 74.4 and 74.6 µs against 71.2 and 71.4, 3.2 µs more. Memory: none |
| An attachment (not memoryless) that a pass loads `DontCare` and does not store, in a pass whose draws reach a tile, is cleared over the render area (`clear_reach.rs`) on a driver measured to run that clear no slower than its `DONT_CARE` load (`DriverFact::UnstoredClearNoSlower`: MoltenVK on the M3 Max, RADV on the Radeon 780M), and left `DONT_CARE` on every other driver; an aspect of separate depth and stencil textures likewise, each aspect apart, in the scratch image of the combined format the pass renders them through (`depth_stencil_scratch.rs`). Metal's draws read zero (a colour) or the pass's clear value (depth, stencil) of such an attachment wherever they read it, never its earlier texels (an M3 Max under macOS 27.0.1: an `RG16Float` second colour a framebuffer fetch reads and a `Stencil8` a stencil test reads, in passes split and whole; a separate `Depth32Float` and `Stencil8` read by a depth and a stencil test, each aspect so loaded alone or both; `runtime_lane::dont_care_unstored`); Vulkan's `DONT_CARE` load leaves the contents undefined. | `unstored_dont_care_loads = UnstoredDontCarePolicy::Driver` | `unstored_dont_care_loads = UnstoredDontCarePolicy::Cleared`: cleared on every device, by the pass's first render pass instance's load operation, or before the pass where that instance leaves the attachment out (separate depth and stencil textures: by the scratch image's load operation of the aspect); Metal's answer wherever a draw reads it | On a driver without the fact, the draws read what its `DONT_CARE` load leaves (lavapipe: the attachment's earlier texels). An image the runtime makes to stand for an attachment (the scratch image of separate depth and stencil textures, a stand-in, a backing: `Device::new_planned_texture`) starts at zero on such a driver, never as its memory lies, which may hold a released texture's texels: a clear as it is made. `DontCareUnstoredLoad` (`dont-care-unstored-load`), once per device; `runtime_lane::dont_care_unstored` (both values: Metal's answer under `Cleared` and on a driver with the fact, lavapipe's earlier texels under `Driver`; separate depth and stencil textures alike, but what lavapipe's `DONT_CARE` leaves in the scratch image is printed, not checked) | Measured, `CLEAR` against `DONT_CARE`, the GPU's span per pass, medians of 15 frames in each of two rounds, eight 3648x2038 passes a frame (a `BGRA8Unorm` colour loaded and stored, an `RG16Float` colour and a `Depth32Float_Stencil8` loaded by the form and stored `DontCare`, one draw over the whole target writing all three; a probe whose runtime still left such a load `DONT_CARE`, without the validation layer): lavapipe (Mesa 26.2.6, llvmpipe on LLVM 23.1.4) 10480 and 10744 µs against 7280 and 7259, 3.2 to 3.5 ms more, its clear a write of every texel; ANV (Mesa 26.2.6) on the Iris Xe (RPL-P) 1936 and 1936 µs against 1907 and 1151, slower in both rounds; RADV (Mesa 26.2.6) on the Radeon 780M 861 and 865 µs against 1147 and 988, faster; MoltenVK 1.4.2 on the M3 Max 218 and 218 µs against 224 and 217, apart by less than one form's two rounds; NVIDIA's 615.71.09 on the RTX 5080 Laptop GPU 74.4 and 74.6 µs against 71.2 and 71.4, 3.2 µs more. Memory: none |
| A linear sample of a two-plane YCbCr texture whose planes a function reads in place (`YCBCR8_420_2P`, `YCBCR10_420_2P` through a uniform texel buffer over their codes, on an integrated GPU or a CPU device; `lower::sampler::in_place`), through a sampler that addresses no border on either plane axis, with no texel offset placed by a parent's size, is Vulkan's Y′CbCr model of the codes, as the device's own conversion with a linear chroma filter computes it: the four luma codes around the point and the four chroma pairs around the same point of the chroma plane (Metal's midpoint siting) blended bilinearly, then the surface's range and matrix (Metal's coefficients) in `float`, each channel clamped into `[0, 1]`: eight fetches. A runtime sampler's word decides as the function runs. A nearest sample, a border mode, a parent-placed offset and a gather are Metal's under either value. | `ycbcr_in_place_reads = YCbCrInPlacePolicy::Model` | `ycbcr_in_place_reads = YCbCrInPlacePolicy::Exact`: every tap Metal's texel (its chroma weighted 9/3/3/1 and rounded to a code, the fixed-point conversion), and the sample Metal's sum of the four taps' steps on the grid `2048`: twenty fetches and four conversions | The model reconstructs each channel at the point where Metal converts four taps and sums them: within the `float` arithmetic's rounding of the model (checked against an `f64` model on the CPU interpreter, `engine_ycbcr_in_place`), it differs from Metal's by the chroma the taps reconstruct, by Metal's roundings to a code and to `1/2048`, and where a tap's channel leaves `[0, 1]`, which Metal clamps before it sums. `HalfSampleFilter` / `FloatSampleFilter` under the bound converted 4:2:0 format, announced `ycbcr-filter-not-exact` | Radeon 780M (RADV): a 3840 x 2160 `YCBCR10_420_2P` frame sampled linearly into a 3840 x 2160 `BGRA8Unorm` target, GPU time per frame (median of 60): 6.4-6.9 ms under the exact form (`runtime_lane::video_frames`) |
| A vertex buffer layout a draw fetches in fixed function, on a driver whose fixed-function vertex input takes an element's displacement modulo `2^32` (`RuntimeDriverDefect::VertexFetchWrapsPast4GiB`: lavapipe), where the draw's indices (`uint` indices, a per-vertex layout) or its indirect arguments (any layout but a constant one) state how far it fetches: the layout keeps the fixed-function fetch, so an element `2^32` bytes or more past the buffer's bind offset reads the bytes at its displacement's low 32 bits, where Metal reads zero past a buffer that ends before them (`render/vertex_reach.rs`). A layout whose reach the draw's own values bound (its last vertex without indices, `65535` plus its base vertex with `ushort` indices, its base instance plus its last instance over the step rate) is pulled where that reach passes `2^32`, under either value, and reads zero. Other drivers read zero (RADV on the 780M, MoltenVK 1.4.2: `runtime_lane::far_vertex_fetches`). | `vertex_reach = VertexReachPolicy::Bounded` | `vertex_reach = VertexReachPolicy::Exact`: such a layout is pulled too, wherever its stride and furthest attribute could reach past `2^32` from the largest index or argument (on lavapipe, every `uint`-indexed draw's per-vertex layout of a stride above 0, and every indirect draw's layout but a constant one), the plan's pulled-vertex-buffer variant (`WorkCounts::far_vertex_fetch_pulled_draws`) | Under `Bounded`, on lavapipe, an element of such a draw at or past `2^32` reads the wrapped bytes: the conformance case `vertex-fetch-past-4gib-small-buffer` replayed under the default policy differs in 8 elements (its two far `uint`-indexed draws at stride 4), and passes under `Exact`. `VertexFetchMayWrap` (`vertex-fetch-may-wrap`), once per device, for a draw left so; `runtime_lane::far_vertex_fetches` (both values) | Measured on lavapipe (Mesa 26.2.4, LLVM 23.1.1) on a Core Ultra 9 275HX shared with other jobs (`runtime_lane::far_vertex_fetches::far_reach_costs`): a state drawn without indices and then with `uint` indices makes one pipeline under `Bounded` and two under `Exact`, the pulled variant made at the first `uint`-indexed draw; a pass of one draw of 65,536 `uint`-indexed points, from the encoder's making to the wait's return, takes 2.3 to 2.8 times as long pulled (medians of 20 passes: 0.94 against 2.41 ms beside two builds, 3.5 to 4.8 against 9.7 to 12.0 ms at a load average of 59 on 24 threads). On every other driver neither value changes a draw |
| A draw of triangles in a rasterization-rate-mapped pass that a host step records (an execution whose records the GPU writes or whose range a buffer holds), filled, of one amplification, without a compensation or a band, whose pipeline chooses no slice or viewport and writes no memory from its vertex function, over a map whose layers are alike and whose plan is a grid of at most 128 columns and rows, on a device that enables `geometryShader`, `shaderClipDistance` and `vertexPipelineStoresAndAtomics`, is drawn once and fanned out to the regions its triangles touch (`rate_mapped_pass.rs`, **Fan-out**): its variant's geometry stage emits a copy of each triangle for each region it touches, at most the copies the device's `maxGeometryTotalOutputComponents` allows up to 16, through one viewport over the render area, four clip distances keeping each copy to its region's pixels, where Metal shades each region through its own viewport. A probe recorded before the pass, submitted and waited for, flags a draw a triangle of which crosses `w = 0` or touches more regions than the copies, which is drawn region by region, and marks a draw a triangle of which touches more than four (`bind::fan_out::FEW_COPIES`): a draw it marks none of is drawn through the variant of four copies, whose geometry stage declares the output of fewer vertices, the three variants (the probe's, four copies and the most) begun at `commit`; it stops at a command's barrier and after a draw that writes memory. A copy's window coordinates are the region viewport's computed in the geometry stage, so a pixel centre within a rounding error of a triangle's edge may be covered by one route and not by the other | `rate_map_regions = RateMapRegionPolicy::FanOut` | `rate_map_regions = RateMapRegionPolicy::Exact`: every draw recorded once per region of the map's plan, each through its own viewport and scissor, its vertex function run once per region | No note of its own: the map's creation announces the pass as a near-equivalent (`rasterization-rate-map`). `WorkCounts::rate_map_probes`, `rate_map_flagged_draws` and `rate_map_fanned_draws` count the probes and the draws each route drew, `rate_map_fanned_few_draws` the fanned-out draws of four copies; `WorkCounts::rate_map_probe_gpu_nanos` the probes' GPU time | Measured at the host step, 64 executed commands of 918,108 indices over a 3648 by 1734 screen's 2074 regions (`runtime_lane::rate_mapped_pieces`), each frame cold (its pipelines begun at `commit`) then warm, the command buffer's GPU time under `FanOut` against `Exact`: an Iris Xe's (Mesa 26.2.6) 48 ms cold and 40 ms warm against 510 ms and 498 ms; a Radeon 780M's (Mesa 26.2.6) 40 ms and 30 ms against 299 ms and 233 ms (`Exact`'s from an earlier run); an RTX 3090's (NVIDIA 620.70.06) 29 ms and 6.1 ms against 64 ms and 58 ms, its cold frame's step waiting for the fan-out's pipelines. Every draw of the lane's is of four copies; on the Radeon 780M, in one run, two frames of them took 29.7 ms and 30.8 ms warm, where the same draws through the most copies took 36.8 ms and 34.5 ms (40.2 ms and 43.9 ms cold against 61.9 ms and 62.7 ms). The probe's GPU time 1.3 ms, 0.5 ms and 1.5 ms. Unmeasured on the RTX 5080. Under `Exact` a draw's vertex work is its vertices times the regions its viewport reaches (`rate_mapped_pass::draw_work`), under `FanOut` its vertices once, its triangles' geometry stage, three vertices per copy (`rate_mapped_pass::fan_out_work`) and the probe's run of the same draws, which emits nothing |