A guest command buffer the walk cuts into parts went to the GPU as one kernel submission a part: on the Iris Xe's animation page a waited buffer took about 11.6 vkQueueSubmit calls of about 180 us each on ANV. Nothing observes a part's completion but its own handler, which notes its GPU times and error for the last part's record and lets its place among its queue's command buffers go; the last part carries every record, ticket and signal the guest sees. So each part but the last is marked to join the next one's completion (CommandBuffer::set_completion_joins_next), and the runtime may send up to four of a queue's parts found ready together, and the part behind them, in one submission. Never marked: the last part; a part that waits for or signals an event, by an op or from the buffer's begin (a device cache's fill, another queue's buffer in the surface order); and a part the platform keeps whole, whose commit is the whole's. The guest still sees its command buffer complete at its last part's own end, with the same GPU times and the first failed part's error. Tests: a_buffer_s_parts_but_its_last_join_the_next_completion_unless_they_ signal and a_first_part_that_waits_from_its_begin_is_not_marked; the dealt and kept-whole tests check which parts are marked.
44 KiB
Accuracy ledger
A ledger, not a journal: rows are edited in place. Each row is one place where the Vulkan
platform's default trades exactness against Metal for compile time (pipeline making) or GPU
time. The fast form is the default. The accurate form stays behind its opt-in switch, and both
are kept always. An accurate form becomes the default only where it costs nothing measurable in
compile or GPU time. Where the runtime answers with the device's own arithmetic, sampling and
conversions and keeps no exact form (the owner's native-arithmetic rule), the difference is a
precision note within the bound it records, listed under "The device's own answers", with no
switch. An accuracy difference is logged (metal2vulkan-degrade-<code>, first line,
then counted) and the process runs on. The process ends only where Metal itself ends it, or where
an operation cannot run at all. REIMS_VGPU_STRICT=1 ends it at each difference instead, for
tests.
Switches: REIMS_VGPU_EXACT=<field>[,<field>...] sets the runtime's DevicePolicy field to its
exact form at device creation. The runtime's own ledger, with every bound in full, is
metal2vulkan's docs/FAST-PATHS.md at the pinned commit. Costs are the RTX 5080 Laptop GPU's,
cold, from that file: the making of the big glass pipelines (A2X, Xgc14, Xgc15), then GPU time
per draw.
Two runtime defaults are not taken, and have no switch: completion and in-place YCbCr reads. Every
device takes CompletionPolicy::Exact, each command buffer in a kernel submission of its own and
seen complete at its own end, as Metal's, where the runtime's default (Grouped) on Mesa's drivers
sends up to four ready together and sees each but the last complete only once the last completed.
When a command buffer is seen complete is what the guest observes of its work (the completions
our device reports as it completes), and this platform does not diverge from Metal there, in
timing as in order: the rows below trade values alone. Metal's hosts see each command buffer
complete at its own end, whatever is committed after it: of 48 committed back to back on one queue,
each of 0.5-5 ms of GPU work, each was seen complete (its completed handler, its status) 17-41 us
after its own GPU end at the median and at most 141 us on a Radeon Pro 5300M and a UHD Graphics 630
(macOS 26.7.1), 86-106 us and at most 0.8 ms on an M3 Max (macOS 27.0.1), and none only once the
next had ended (2026-11-15). The grouped form sees a member complete late by the GPU time of the
batches after it in its group, up to the runtime's 16 ms bound, outside that envelope, and on RADV
it bought nothing for that: in a guest's Launchpad on a Radeon 780M and an RX 7900 XTX it held at
most 30 batches in a window once Launchpad was open (21.6-24.5 kernel submissions a present either
way) and saved 0.15-1 a present at its first opening, and in Geekbench 7's Metal pass it took 9% and
7% fewer kernel submissions for no shorter run (174.6 s against 172.6 exact on the 780M, 136.0
against 136.1 on the XTX), seeing command buffers complete up to 60 and 17.5 ms after their own GPU
end (2.9 and 3.6 ms exact). Nor did it buy frame rate in a guest's drag on the Iris Xe (15.7-17.3
frames a second grouped, 16.4-17.6 exact), for 0.4-1.7 ms of the runtime's scheduler CPU a frame.
The exact form groups only what its caller marks to join the next: the device marks a guest
command buffer's parts before its last that signal and wait for no event, whose completions the
guest never sees, so the runtime may send up to four of them found ready together in one kernel
submission, the part behind them last in it, and the guest still sees its command buffer complete
at its last part's own end.
Every device also takes YCbCrInPlacePolicy::Exact: a function that reads a YCBCR8_420_2P
(500) or YCBCR10_420_2P (505) texture's planes in place, on a device whose memory is the host's
(MoltenVK, the Iris Xe, the Radeon 780M), converts and filters every tap as Metal does. The
runtime's default (Model) samples by Vulkan's Y'CbCr model in the device's arithmetic, which
reads outside the bounds gpu::ycbcr::sampling's tests hold to Metal's answers (constexpr
samplers, the default filter, YCBCR10_420_2P under every mode).
Heap compression is the runtime's default (HeapCompressionPolicy::Compressed), and only
REIMS_VGPU_EXACT=all takes its exact form, which has no name of its own. On a driver whose
compressed images may keep their texels apart from their memory (ANV, the Iris Xe's; no other driver
here), a heap's colour texture that Metal keeps losslessly compressed (allowGPUOptimizedContents,
no ShaderWrite, PixelFormatView or ShaderAtomic usage, 16 texels or more a side), in a heap of
the device's own memory (a guest's Private heap), takes the driver's compressed image where that
image's 64 KiB alignment fits the heap's answer for it (an image of 64 KiB or more), as Metal keeps
the texture compressed. A smaller one, and every texture of a heap over the guest's pages, takes an
image the driver keeps uncompressed under either form. The bound: a write through a buffer or
texture over its bytes may leave the compressed image's texels as they were
(heap-texture-compressed, relayed), where Metal's compressed texture reads opaque magenta in the
drawn content such a write covered (an M3 Max): neither shows the write as written. The compressed
image moves what heapTextureSizeAndAlignWithDescriptor: answers the guest on the Iris Xe from an
alignment of 0x1000 to 0x10000, its size kept: 0x1020000 bytes for a 2048x2048 RGBA8Unorm render
target, 0x1010000 for a 1920x1080 RGBA16Float one, 0x10200 for a 128x128 RGBA8Unorm texture only
read. A smaller one keeps its answer (0x4080 bytes at 0x1000 for a 64x64 BGRA8Unorm texture,
0x8000 at 0x1000 for a 64x64 R32Uint render target of seven levels), and so does one Metal keeps
uncompressed (0x1000000 at 0x1000 for the 2048x2048 render target with ShaderWrite). An x86 Mac
answers from 4096 (the UHD 630) to 65536 (the Radeon Pro 5300M). The exact form's image,
uncompressed in the heap's bytes, loses the driver's fast clear: on the Iris Xe a guest's clear of
the 2048x2048 render target in a Private heap took 146.9 us of GPU time (as the guest reads it)
against 28.6 us compressed (25.8 to 28.7 us for one in memory of its own), a copy of it into another
294.1 us against 148.2, and the two together 535.7 us against 166.5 (16 a command buffer, the median
of 25).
| Fast default | Accurate switch | Bound of the fast form | Cost of the accurate form (5080) |
|---|---|---|---|
| Batches of one queue ordered by their ends on a driver measured to start no kernel submission of a queue before the one before it completed (ANV, RADV, NVIDIA): each ends with a barrier before every later command of its queue, so a dependent batch begins with no barrier of its own | batch_order (a barrier for each access a batch's work depends on in an earlier batch's) |
none: on those drivers each batch starts once the one before it completed under either form, so order, results and GPU times are the same. Not announced | UHD 770 (ANV), 67 command buffers a frame over 520 host imports: 67 command buffers submitted a frame against 129, a frame through completion 2.13-2.22 ms against 2.27-2.38 ms |
A texture over the guest's pages that samples, reads, renders into them or is written through a shader (ShaderWrite or ShaderAtomic, of texels of 4, 8 or 16 bytes) held as a linear image over the pages, on a device whose own check, run once per driver and release, finds that the operations Vulkan lets read and write every byte bound to the image (its first move; a render pass's load and store; a kernel's storage writes) leave every byte alone while the CPU writes beside it, each access checked apart, and apart for texels that share a line of the device's memory (nonCoherentAtomSize) with bytes beside them and for texels that share none: the Iris Xe (ANV, Mesa 26.2.6), whose clear, store and draws write back whole the 64-byte line that holds a row's last texels, keeps the shadow for a texture it renders or writes whose rows end inside a line, and takes in place one whose rows start and end on lines, a 3840x2160 BGRA8Unorm surface's among them (the owner's rulings, 2026-10-26, 2026-10-27 and 2026-11-07: in place, trusting the driver) |
host_page_textures (a shadow: the texels copied in at each command buffer's first use and merged back after each write, on every device) |
none on a device whose check passes: Vulkan lets an imported image's first layout transition read and write every byte bound to it (VUID-VkImageCreateInfo-pNext-01443), which would undo a CPU write made beside it; the check shows the driver does not, and a texture made before its verdict is a shadow. A texture whose pitch the driver refuses for a linear image is a shadow under either form: on RADV, rows not a multiple of 256 bytes, and on NVIDIA's driver rows other than the tight row rounded up to 128; a guest's IOSurfaces lay their rows out at the device info's linear_row_alignment, to which the guest's kext raises IOSurface's own 64-byte alignment (an AMD Radeon Pro 5300M Mac's), and its frameworks lay out textures over buffers at the platform's linear texture alignment, but a client that names its rows keeps them (crates/reims-vgpu/src/graphics/device_info.rs) |
the copy-in at each command buffer's first use: Safari on testufo.com at 1680x1050 and 120 Hz read about 45 MB a frame from host memory over PCIe on the RTX 5080, against a 7 MB framebuffer (SM 24-34%, metal2vulkan f6a96b7da8) |
A chain of half additions, subtractions and products under fast math, on a device without shaderFloat16, held at float precision and rounded where a value leaves it (FastMathRewrites) |
half_chains (each operation rounded where it is computed, by the device's OpQuantizeToF16) |
the roundings the chain skips, and a value past half's range inside the chain stays finite |
not measured |
| A state's creation returns after 4.5 s with its predicted pipeline still being made, and a commit that records a pass whose executions read the CPU's records waits for its pipelines 4.5 s at most, leaving the pass to its host step past that; under either form a command buffer naming a pipeline still being made waits for it and completes later, and no draw or dispatch is dropped | pipeline_waits (each creation makes its predicted pipeline before it returns, and a commit waits for every pipeline its passes name; a strict process takes it whatever the switch says) |
the creating thread returns with the compile still running, and the command buffers that name the pipeline complete once it is made, as on a slow GPU, holding their queue meanwhile (and, through the surface order, a queue of another process that reads an IOSurface they write): the slowest render state's compile on an M2 Pro's cold boot under MoltenVK took 11.59 s (metal2vulkan's FAST-PATHS) | no GPU cost; the creating thread held for the whole compile, up to 11.59 s on that M2 Pro boot |
A line setLineWidth: widens (a width other than 1, floor(16 w) / 16 as Metal draws it), a triangle's edges in fill mode Lines and a mesh draw's lines drawn by the device's own lines at the width, wherever the device draws it (wideLines, the width in its lineWidthRange), where they differ from Metal's parallelogram: a strict device's rectangle (NVIDIA, lavapipe), lines Vulkan does not state as parallelograms (ANV, and every width below 1), a width off the device's lineWidthGranularity. Announced (device-wide-lines). MoltenVK has no wide lines: on the Mac the band below draws lines at every such width under either form. Where neither the device's lines nor the band draws the width (a mesh draw's lines on MoltenVK, a line or a triangle's edges without tessellationShader or in a pipeline whose band the translator refuses, an execution's lines, lines in a rate-mapped pass), the device's lines draw at the nearest width they draw, 1 pixel without wide lines, announced (lines-at-nearest-width) |
wide_lines (each such line two triangles over Metal's parallelogram, the pipeline's band variant, on a device with tessellationShader; a triangle's edges too, each edge the line's parallelogram, except that a depth bias applies by each band triangle's own slope where Metal's applies by the triangle's, announced (wide-edge-depth-bias); a mesh draw's lines stay the device's; and on a driver not measured to snap a vertex half a 1/256-pixel step off its grid up, as Metal snaps a line's endpoint (every driver but MoltenVK on the M3 Max), the band's corners snapped by the device's rasterizer, so a line whose endpoint lies half a step off the grid can draw a row or a column from Metal's (NVIDIA and lavapipe round the half step down), announced (device-subpixel-snap)) |
up to half the width past each end (square ends), and the width rounded to the granularity | not measured: a second pipeline variant made for each render state that draws such lines, and each line tessellated into four corners |
A blit into or out of a BGRA10_XR (or BGRA10_XR_sRGB) texture Metal keeps compressed (allowGPUOptimizedContents, 16 texels or more a side, no ShaderWrite or PixelFormatView), and a fill of one, keeps the bytes the device's copy moves, announced (extended-range-bits-kept) |
extended_range_blits (a compute pass rewrites what each such blit wrote to Metal's encoding, and a fill's texel is encoded before it is written; a blit the device cannot bind keeps the bytes, announced as before) |
each 16-bit word's low 6 bits as the source held them where Metal's blits clear them, and alpha's code outside 384 to 894 where Metal's blits clamp it (its fills clear the low bits only) | GPU time per blit, Kept to Canonical, 256x256 / 2048x2048 (metal2vulkan e8eb63b8ac's measure): buffer into the texture 11.5 to 23.5 / 244 to 761 us from a Private buffer, 29.7 to 42.1 / 1176 to 1945 us from a Shared one; the texture into a buffer 11.2 to 14.1 / 246 to 287 us Private, 26.8 to 65.7 / 1182 to 3386 us Shared; texture to texture 9.7 to 22.5 / 80 to 630 us. On the M3 Max (MoltenVK, 16 blits a command buffer): 29 to 79 / 171 to 710 us into the texture, 28 to 43 / 171 to 262 us out of it. A blit into an image takes a scratch copy out, a dispatch and a copy back |
Command queues share VkQueues where the device's command buffers write GPU timestamps the host reads (every device but MoltenVK's, whose GPU times the runtime answers from the host: crates/reims-vgpu-vulkan/src/platform.rs, "GPU times are the GPU's") and its own check finds its GPU idle at each switch between queues (the RTX 5080, and the RTX 3090, where a macOS 26.7.2 guest's Launchpad walk moved 9 to 13 queues with its frames and take-to-show times unchanged), so a command buffer of one queue can start on the GPU behind another queue's; a queue the graphics lane's kext asks unshared (WindowServer's) takes a VkQueue no other shares |
queue_sharing (every command queue on the VkQueue it took at its creation) |
no value differs: a command buffer waits on the GPU behind another queue's on its VkQueue, up to that one's GPU time (metal2vulkan measures about 29 ms when a shared queue's first long command buffer arrives) |
small command buffers' rate on a device whose GPU idles at each queue switch, metal2vulkan's FAST-PATHS queue-sharing row (the 5080's spread) |
A colour attachment of a texture's own image that a pass stores DontCare stored as the driver stores it: DONT_CARE on a driver measured to keep one of Metal's two answers (the texels before the pass, or the rendered ones) or to store as Metal's own, else STORE, the rendered texels, Metal's answer where its tiler overflows; announced dont-care-store at the first such pass a driver does not store as Metal's own |
dont_care_colors (the pass renders through a backing its command queue keeps, so the texture keeps the texels it held before the pass, as Apple's GPU leaves them) |
the texels a DontCare store leaves: Metal's documentation leaves them open, and Apple's GPU keeps the earlier ones unless its tiler overflows |
a Load pass's copy into the backing, about 19 us a pass at 1920x1080 and 10 us at 256x256 (metal2vulkan's measure); a Clear or DontCare load about none |
An attachment (not memoryless; an aspect of separate depth and stencil textures in the scratch image the pass renders them through) that a pass loads DontCare and does not store, in a pass whose draws reach a tile, left to the driver's DONT_CARE load on a driver not measured to clear it no slower, and cleared, Metal's answer, on one that is (MoltenVK on the M3 Max, RADV on the Radeon 780M); announced dont-care-unstored-load once per device where it is left |
unstored_dont_care_loads (cleared over the render area on every device, by the pass's first render pass instance's load, or before the pass where that instance leaves the attachment out) |
what the pass's draws read of the attachment: what the driver's DONT_CARE load leaves (lavapipe: its earlier texels), where an M3 Max's draws read zero (a colour) or the clear value (depth, stencil) (metal2vulkan's runtime_lane::dont_care_unstored); the pass stores none of it |
3.2 µs of GPU time a frame of eight 3648x2038 passes (74.4 and 74.6 µs against 71.2 and 71.4); on ANV's Iris Xe 29 to 785 µs a frame more (metal2vulkan's measure) |
A vertex buffer layout a draw fetches in fixed function where its uint indices or indirect arguments state how far it fetches, on a driver whose fixed-function vertex input takes an element's displacement modulo 2^32 (lavapipe): kept in fixed function; a layout whose reach the draw's own values bound is pulled where that reach passes 2^32, and reads zero; announced vertex-fetch-may-wrap once per device where a draw is left so |
vertex_reach (such a layout pulled too, the pipeline's pulled-vertex-buffer variant, so every element reads Metal's bytes) |
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 (metal2vulkan's runtime_lane::far_vertex_fetches); every other driver reads zero under either value |
none on the 5080 (the defect is lavapipe's); on lavapipe a pass of one draw of 65,536 uint-indexed points takes 2.3 to 2.8 times as long pulled, and the state makes a second pipeline (metal2vulkan's measure) |
A rasterization-rate-mapped pass's draw that a host step records (an execution whose records the GPU writes), on a device with geometryShader, shaderClipDistance and vertexPipelineStoresAndAtomics: drawn once, a geometry stage emitting a copy of each triangle for each region of the map it touches through one viewport over the whole target, clip distances keeping each copy to its region's pixels; a probe submitted first sends a draw a triangle of which crosses w = 0 or touches more regions than the copies hold region by region, as every other draw is |
rate_map_regions (every draw region by region, its vertex function run once per region) |
a pixel centre within a rounding error of a triangle's edge covered by one route and not the other: a copy's window coordinates are the region viewport's computed in the geometry stage | not measured on the 5080; on an RTX 3090 a guest-sized pass of 117 pieces takes 332 ms of GPU region by region and 174 ms fanned out (metal2vulkan's lane, m3-max-23744) |
A Managed buffer's range the guest names modified (didModifyRange:) copied into the device's copy by the GPU, from the buffer's host copy (the import of the guest's pages), as the command buffer's submission runs, with no CPU copy |
managed_copy_in (the range copied on the CPU into staging memory at the commit, as the host copy holds it then) |
a CPU write of the range after the commit, before the GPU runs the command buffer, may be read by it, as on the UHD 630 (metal2vulkan's lane measured both oracles: the Radeon Pro 5300M keeps the commit's bytes, the UHD 630 reads the later write) | a CPU copy of the range's bytes at each commit; not measured on the 5080 |
| An indirect command buffer's records, on a device where a held pointer import costs every submission (RADV; ANV on i915), laid in pooled host-visible memory, as the runtime's other buffers lie there; elsewhere in the runtime's own pages imported by their pointer | indirect_records (the records in the runtime's own pages imported by their pointer wherever the device imports host pointers) |
a recovery of such a device loses the records with its VkDevice and writes them again as a new buffer's, its header and every command reset, where Metal keeps them; the device-recovered notice counts such buffers |
the held import in every submission while the buffer lives: on the Radeon 780M (Mesa 26.2.6, Linux 7.3.3) windows of 65 to 140 ms in which every submission waited or failed with EAGAIN while the kernel's compaction moved the records' pages (metal2vulkan's IndirectRecordsPolicy); not measured on the 5080 |
| An extended-range blend source rounded as a loaded colour | none yet: parked (the 5080 effort first; no 5080 boot reaches it) | 1 code | not measured |
| Bicubic near-tie rounding | none yet: parked (the 5080 effort first; no 5080 boot reaches it) | 1 grid step (1/4080) within 2^-21 of a tie | not measured |
all takes every switch at once.
The device's own answers (no switch)
The runtime answers each of these with the device's own arithmetic, sampling or conversion and
records its precision note, within the bound below (metal2vulkan's docs/FAST-PATHS.md at the
pinned commit has each in full). On MoltenVK most are Metal's own answers and announce nothing.
| The device's answer | Bound against Metal's |
|---|---|
| The device's sampler (filter, footprint, level, anisotropy, sRGB, comparisons) | linear filter 1 code, sRGB 1.83; the rest unmeasured |
| The device's filter of a two-plane YCbCr texture, under the device's sampler (on MoltenVK, Metal's own sampler over the texture's converted texels) | 1.18 codes of Metal's sum on the RTX 3090, 0.88 on RADV, 1.06 on ANV; on MoltenVK one step of the format's grid (0.1245 codes on 1/2048, 0.016 on 1/8192), a half result 0.1245 codes, and a half sample of one texel of an _sRGB twin through a runtime sampler rounds a tie to even (one half ulp) |
| The device's conversion of a texel's codes | 1 f32 ulp (8/16-bit), 0.18 code (5/6-bit packed) |
The device's fixed-function conversion of a normalized vertex attribute's codes (UCharNormalized through Short4Normalized, UChar4Normalized_BGRA, Int1010102Normalized, UInt1010102Normalized) |
1 f32 ulp at some codes on a driver whose conversion multiplies by the reciprocal; Metal's and Vulkan's rule is the correctly rounded quotient |
| Device maths library, division, fma | Vulkan's precision table (e.g. Atan 4096 ulp) against Metal's 4-6 |
| Device NaN bits; device min/max/clamp | NaN bits, ±0 and denormal picks; on ANV and RADV a half read from its bits widens by the device's conversion, every value but a NaN exact, a NaN's bits the device's (ANV quiets a signalling one) |
Device dot, mix, fast::sqrt |
dot (3n−1)·2^-24·Σ, mix 2^-21, sqrt 4.5 ulp |
| Device half rounding, widening and folding; a half texel's NaN | AMD and Intel (RADV, ANV) round a computed half through an f32→f16→f32 conversion pair under Vulkan's 16-bit float controls (round to nearest even, denormals and signed zeros kept), which the spec makes exact, under either form and announcing nothing (0 mismatches outside NaN inputs over every half and every half +, −, × pair on Iris Xe, the 780M and the 7900 XTX). The RTX 5080 rounds exactly (8192 of 8192 narrowed sums are Metal's). The RTX 3090, on the same 615.71.09 driver, and lavapipe drop the rounding: a half result keeps float precision, its differences compounding across operations. A value past half's range stays finite until a half store saturates it to infinity. Elsewhere 1 half ulp. NaN bits; half denormals may flush |
| The device's blend of a safe-math half output into a blended 16-bit float attachment | at the largest operand: 16-bit float 2.5 half ulps on NVIDIA (blend-colour factors), 2 on AMD, Intel and lavapipe; 32-bit float 1 ulp on NVIDIA, 2 elsewhere |
The device's decode of a 16-bit float texel (R16Float, RG16Float, RGBA16Float, RGBX16Float) that a half or float read answers |
a NaN texel reads as the decode's NaN, where Metal hands back the texel's own code: 0x7e00 for every NaN on MoltenVK (the M3 Max: 515, 1,026 and 2,045 of 4,096 words at each read site of the R16, RG16 and RGBA16 probes), the texel's bits at RADV's reads; every other value the texel's (DeviceNanEncoding) |
A multisampled Depth32Float texture the program only reads, held in a depth image on a device whose depth images may not keep its texels (no unrestricted depth range, or a driver not measured to keep a denormal) |
a fill's or a copy's denormal stored as a zero, and a value outside [0, 1] as the depth image keeps it (DepthDenormals, RestrictedDepthUpload), measured on RADV for render-target textures, which the switch does not cover |
| A decoded twin of compact codes for a texture of a format the device lacks, which the runtime holds in a carrier: an ASTC LDR texture's (not an sRGB one's) of 8-bit codes, an EAC 11-bit one's of 16-bit normalized codes (Apple's GPUs have the formats: no twin on MoltenVK) | an ASTC channel within 1/510 of Metal's 12-bit value, an EAC 11-bit one within half a 16-bit step (DecodedTexelPrecision) |
The device's load and store of a single-sampled signed normalized (R8Snorm to RGBA16Snorm) or RGB9E5Float colour attachment that a drawing pass loads: the texels its draws do not write keep their bytes (on MoltenVK the pass is Metal's: no difference) |
one code, at a minimum code alone (-128 or -32768 kept where Metal stores -127 or -32767, both -1.0), and a shared-exponent word kept unnormalized (the same value); only uploaded or copied bytes hold either (SnormMinimumKept, SharedExponentKept) |
| The device's lines at width 1, which cover the pixel the driver chooses where a line runs through a vertex two pixels' diamonds share, as Vulkan's open diamond leaves it (on MoltenVK on the M3 Max Metal's own lines: no difference) | such a pixel, and the rest of a line that runs along such vertices, a row or a column from Metal's lower pixel: NVIDIA covers the other pixel, lavapipe leaves out a strip's first pixel where it starts on one; RADV and ANV not measured (DeviceLineTies) |
The device's AVERAGE resolve of a multisampled colour attachment whose format has Metal's resolve rule (on MoltenVK Metal's own resolve: no difference; an attachment a fetching pass holds in sample planes takes Metal's rule under either form) |
at 2 and 4 samples a unorm, snorm or packed 16-bit channel within one code of Metal's and an sRGB one within two (NVIDIA at 4 samples; one elsewhere) on RADV, ANV, NVIDIA and lavapipe, each rounding an 8-bit tie down; a float channel in its last bits, unbounded; wholly at a NaN or infinite sample (DeviceRoundedResolve) |
Differences no switch can fix (device capabilities, undefined values) are not speed choices. They
are listed in the runtime's docs/FAST-PATHS.md, "Not speed choices", and are logged the same way.
Logged gaps on our side (no accurate form yet; not speed choices)
Each is logged once per kind and counted, and the work runs. REIMS_VGPU_STRICT=1 ends the
process there instead.
| What runs instead of Metal's answer | Where |
|---|---|
A half colour output stored past the bound its rounding was measured within, as blended or converted at its attachment, stores the runtime's half rounding |
draw encoding |
A draw in a pass that loads and stores a bfloat colour attachment leaves the codes its draws do not write, where Metal's tile store moves those of the tiles a draw reaches through half |
draw encoding |
A render pass over a rasterization rate map reset after the pass took it and before its command buffer's submission, in an encoder the runtime could not encode again (an encoder opened while a buffer of the device was detached, or one that left work for a host step), draws by the map as it took it, where Metal's GPU draws by the map as reset (rate-map-reset-unencoded) |
the runtime's rate-mapped passes |
Under textureWriteRoundingMode 2, a half-float attachment of a sample count no one measured at the mode resolves by the runtime's rules |
render states |
| A heap texture of unmeasured size or layout takes the runtime's size and layout | heaps |
| A draw or tile dispatch in a varying-rate pass runs on the runtime's own regions | rate maps |
| A blit fill packed in another format repeats the packed texel | blits |
| A late resolve texture beside a dropped resolve leaves the colour resolve dropped | render passes |
An object a creator asks for that the runtime refuses for a gap of its own or of the device's, where Metal makes it (Unsupported, but by a GPU family or a device Metal itself refuses it on; NotImplemented; AppleOnly; a compile's Unsupported), is nil, a pipeline state or library with the runtime's refusal as its NSError: the guest's creation fails, and the work that names the object faults, where Metal makes and runs it (inexact-refused-create) |
creators |
A texture of protection options from newTextureWithDescriptor: or newSharedTextureWithDescriptor: is made unprotected, as Metal's other creators make it, where Metal answers nil without the protected-content entitlement; its contents are not kept from the host |
device textures |
The uniqueIdentifier of a pipeline state made with indirect command buffer support, which the guest reads, is the runtime's offset in its own allocation of such states, not Metal's address (unmeasured-unique-identifier); one value for the state's life, unique among live states, the last released taken again first by kind, as Metal's |
pipeline states |
The uniqueIdentifier of an indirect command buffer made after a command buffer that encoded a render encoder was scheduled, after a resource state encoder opened, or once Metal's encoders' ranges passed what the runtime models, which the guest reads, is the runtime's, where Metal's takes more by what the device drew (unmeasured-unique-identifier); elsewhere it is Metal's address, the encoders before it taking ranges of Metal's range as an M3 Max's take them. Relayed at every such buffer (inexact-icb-identifier-after-encoder) |
indirect command buffers |
A threadgroup memory length of a compute indirect command buffer past its last command's at a word Metal keeps there of a command's pipeline, dispatch or imageblock size, or of a copy, is the runtime's, unwritten, after a setter of the command that writes the word, and after a copy into the command its pipeline words and the copy's word, where Metal's keeps the destination's pipeline words where the source's are 0; over a buffer that inherits its pipeline state a blit's copy or reset moves the words at other places than Metal's, and in a buffer made resident for writing Metal's GPU may write them (measured on the M3 Max, macOS 27.0.1). Relayed at each such read until core sets it again (inexact-icb-length-past-last-command) |
indirect command buffers |
A threadgroup memory length 36 or 37 of a command of a compute indirect command buffer that does not inherit its pipeline state, read after a copy into the command was encoded and before core set it again or a reset cleared it, is the runtime's 0, where Metal's copy carries it from a command that names no pipeline state (measured on the M3 Max, macOS 27.0.1). Relayed at each such read (inexact-icb-copied-length) |
indirect command buffers |
A function that reads a sampler state through its ID in an argument buffer reads the neutral sampler where the device's sampler tables do not map the state for its command: more sampler states live than the command's set-1 sampler arrays hold, an ID the tables do not reach, a sampler the device cannot make, or a cubic state beside a fragment stage (unlisted-argument-sampler) |
argument samplers |
A blit between a buffer and a two-plane XR10 texture that Metal's measured rows do not cover moves the runtime's rows: into a level 32 texels wide or wider whose rows meet at Metal's addresses, the earlier row's bytes stand, where Metal's GPU writes them in an order that varies from run to run; out of a texture of the device's memory, the bytes between its rows that a copy from another texture wrote read as its fills and blits with a buffer left them, where Metal's read the copy's; and a texture of more than one level, a view, a 1D or 3D texture or a surface's moves its texels at the rows it holds them in, where Metal's blit addresses its rows ⌊4w/16⌋·16 bytes apart (two-plane-buffer-blit) |
blits |
A heap's two-plane XR10 texture of more than one level, or a 1D array, keeps its first level's texels in the heap's bytes as Metal's CPU copies and GPU writes lay them and its later levels apart from them, a 1D array's GPU reads reading each texel, where Metal's paths address those texels at bytes that differ by path (heap-two-plane-layout) |
heaps |
A heap's texture of a one-plane YCbCr format the runtime holds for copies alone keeps a 2D texture's or array's rows under 16 bytes one packed row apart, where Metal's blits lay them 16 bytes apart, and a mipmapped or 3D texture's texels apart from the heap's bytes, where Metal lays them at bytes that differ by path; its size answers are Metal's and its copies read what they wrote (heap-one-plane-layout) |
heaps |
A colour texture over a plane of a surface with planes keeps its texels past the surface, and a 2D array's slices past its first, in a tail of its own, zero when made, read and written alike by every path, where Metal's blits read zeros there, its kernels zeros and, 32 KiB past the plane, the plane's rows again, and its writes change no byte of the surface (surface-texels-tail); a colour 2D texture of more than one level, a 3D texture and a 2D multisample one over such a plane keep their texels in memory of their own, zero when made, where Metal lays them out in no one place (surface-texels-apart) |
surfaces |
A draw under the last provoking vertex that the runtime draws otherwise than Metal: a line from its last vertex to its first (provoking-vertex-lines); flat inputs, a computed primitive ID or a selected layer or viewport from another vertex, barycentric weights beside flat inputs Metal's but for rounding, and, at a mode from 2 up (its top bit set or not), which it draws as mode 1 and patches as mode 0, a draw whose shape Metal's third way draws otherwise as far as its state reads it: a triangle strip, lines, sized points, the triangles of a state that selects a layer or viewport, and mesh draws, not measured there (provoking-vertex-unmatched, at the draw) |
the runtime's provoking vertex |
A command predication record of the runtime's whose condition word lies past its buffer, the 256 bytes Metal rounds a lone buffer up to, or its heap reads zero, where Metal reads what its address space holds there (predication-word-past-buffer). No record reaches the runtime's predication yet: this platform's own carries it |
the runtime's predication |
A no-copy buffer or heap over pages the process maps read-only is made over a copy of its pages whose GPU writes the runtime drops, on every device, with or without a dma-buf source, so after its writes the CPU reads the pages as they were, as after Metal's (read-only-pages-written, read from metal2vulkan's code at 158f7220ff, which removed the degradation that once announced writes reaching such pages). What this platform answers for writes into read-only memory instead, on Linux: the guest's read-only objects (a no-copy buffer or heap made with MTLResourceOptions bit 24, or over pages mapped read-only) are made over a copy of their pages whose GPU writes the runtime drops. A render pass's store-out there, an attachment stored (Store, StoreAndMultisampleResolve, a depth attachment's CustomSampleDepthStore) or a resolve into a texture there (a colour or stencil attachment's MultisampleResolve or StoreAndMultisampleResolve, a depth attachment's MultisampleResolve), each by the descriptor's action or a late one, into the descriptor's resolve texture or one a late setter named, fails its command buffer with Metal's page fault (MTLCommandBufferErrorPageFault) from that pass on, every event signal firing, as the M3 Max's GPU faults it and as the runtime faults it itself (which encoders before the pass run is unmeasured for this fault); the fault counts against its queue, as Metal's does: the command buffers committed after it on its queue and on a new queue run, and the queue's second fault revokes it, every later command buffer of that queue failing with MTLCommandBufferErrorAccessRevoked (m3-max-29110, m3-max-28796, m3-max-28797, m3-max-29292 and m3-max-29309, plain Metal; the runtime's store_out.rs and command_buffer/revocation.rs). Every other GPU write there completes with its write dropped: a shader's store into a buffer (through a slot or a loaded address), a draw's or a kernel's write() of a texture, a texture made resident for writing, a blit's copy, fill (of a buffer, or of a texture by a colour or bytes), mipmaps or invalidation, a pass's visibility results, an attachment the pass does not store (DontCare under any load action, a colour or stencil CustomSampleDepthStore set late), and a resolve the pass does not make. The Macs differ there, and this takes an answer inside their envelope (docs/graphics-kext/dgpu-oracle.md Q38): the M3 Max faults a draw's write() of such a texture and drops the rest, and the Radeon Pro 5300M and UHD Graphics 630, on which bit 24 does nothing, complete every one of these writes, store-outs included, writing the pages, and over pages the process maps read-only complete them with the pages unchanged. A CPU write of a texture there (replaceRegion:) writes the pages, which later command buffers read, as on all three Macs, and over pages the process maps read-only ends the process where Metal's write through that mapping does (SIGBUS, all three). A colour or stencil attachment the descriptor keeps by CustomSampleDepthStore ends the process at the runtime's refusal, as Metal's validation does on all three, over any memory. A depth attachment's StoreAndMultisampleResolve into a texture there completes, by the descriptor's action or a late one, into the descriptor's resolve texture or one a late setter named: the runtime (metal2vulkan 5d33e0c74a, its store_out.rs) stores the attachment and drops the resolve, the texture unchanged, as the M3 Max leaves it, for every guest, where the x86 Macs write it. Left: beside a stencil attachment that resolves, or whose store action is still Unknown, it ends the process where the pass is made, or at the late store action or resolve texture, as the runtime faults that pairing and nothing measured Metal's GPU there. Metal measured on the M3 Max, macOS 27.0.1, by metal2vulkan's probes/readonly_gpu_writes.m and by oracle_readonly (m3-max-29292, m3-max-29309), and on the 5300M and the 630, macOS 26.7.1 (m3-max-29293, m3-max-29294, m3-max-29310, m3-max-29311). On macOS none of this is taken: MoltenVK hands Metal the pages, or a read-only view of them, and Metal answers |
host imports (Linux) |
Under textureWriteRoundingMode 2, a pipeline that covers by alpha, whose function writes a float alpha to a half-float colour 0 stored as written, covers by the alpha rounded to the half Metal stores, where Metal's coverage reads it before rounding: a fragment within half a half step of a threshold may cover one sample more or fewer (coverage-reads-rounded-alpha) |
render states |
A multisampled pipeline's fragment function that reads [[sample_mask]], which Metal runs once per covered sample (it reads [[sample_id]] or a sample-qualified varying, or writes memory), and returns an output runs once per pixel, its body once per covered sample, and writes the last pass's outputs to every sample Metal's runs keep, where Metal writes each sample's from its own run: equal where every pass computes the same outputs. On MoltenVK a function that writes memory runs as written, exact (looped-sample-outputs) |
render states |
A blend the fragment function computes, of an attachment it reads through the pixel interlock (MoltenVK, RADV, ANV), in a format whose Metal blend arithmetic the runtime has not built (32-bit float, 16-bit normalized, 8-bit snorm, 10-bit, packed float, A8Unorm, an 8-bit unorm one written by fewer than four lanes, or a 16-bit float or 8-bit unorm one under a blend of the second source), is the shader's generic blend in float, and a four-channel 8-bit _sRGB one's under a blend of the second source in a module compiled with fast math is the 8-bit unorm blend's rounded forms over the decoded texel, where Metal's for these is not measured (unmeasured-fetch-blend) |
draw encoding |
A multisample resolve of an extended-range colour attachment whose resolve Metal averages from values finer than the codes it holds (BGRA10_XR's alpha, an _sRGB twin's colour) is the runtime's resolve of the codes after the pass: where a pixel's samples differ, an alpha within a code of Metal's and an _sRGB colour within a code in 99.5% of channels and up to 7 codes off where the samples' values nearly cancel (measured by the runtime on the M3 Max, macOS 27.0.1); a linear form's colour is Metal's (extended-range-resolve) |
render passes' resolves |
A multisample resolve of a packed 16-bit colour attachment, which the device renders only through the view of its word, is the runtime's resolve of each field's codes after the pass: Metal's code where a pixel's samples hold one word, and within one code of Metal's in every channel where they differ (measured by the runtime on the M3 Max, macOS 27.0.1) (word-resolve) |
render passes' resolves |
A draw or dispatch that binds an ASTC texture at a storage slot its function writes binds the slot's neutral: its writes leave the blocks as they were and its reads answer zero, where Metal stores bytes no format defines into the blocks (astc-storage-neutral) |
ASTC textures at storage slots |
A render pass that loads and stores a two-plane YCbCr colour attachment and draws re-encodes the planes' codes of every 32 by 32 tile of the rectangle bounding its draws' scissors from the texels it loaded, where Metal re-encodes only the tiles a draw's primitives reach and keeps the others' bytes (ycbcr-load-tiles) |
YCbCr passes |
A draw that blends into a two-plane YCbCr colour attachment blends the pass's floats, where Metal's tile blends halfs (an 8-bit format's in half arithmetic, a 10-bit one's in float rounded toward zero): a blended texel's codes can miss Metal's by one (ycbcr-blend-rounding) |
YCbCr passes |
After the runtime recovers the device from the loss of its VkDevice, as Metal's device survives its GPU's recovery (its command buffers in flight failed, the oldest incomplete one as the hang, GpuHang, and the rest as its victims, GpuRecoveryVictim; announced at each recovery, device-recovered, relayed), an object made before the recovery is refused where it meets the new VkDevice (an encoder's bind, a pipeline made from its functions, a buffer or texture placed in its heap) or needs the lost one (MadeBeforeRecovery), where Metal's objects go on: a creator that meets one answers nil (inexact-refused-create), and any other call that meets one dies at its selector. The runtime makes most of the guest's objects again there itself (metal2vulkan's device/line.rs): buffers over guest pages and heaps over the caller's memory keep their contents, pipeline and sampler states are made again, a texture of new_texture of any storage mode reads as a new one and a Private buffer or heap reads zero, their contents lost, where Metal's contents after its GPU's recovery are not measured; the host fills a Managed texture's GPU copy and its IOSurface device caches again from their CPU copies. It leaves pooled Shared or Managed buffers and textures over the caller's VkImage, among others: a reset provoked on i915 left 2 and 4 of them, and the guest ran on (qemu.md, "Linux hosts: Intel GPUs on i915: a reset of QEMU's context") |
device recovery |
The runtime's answers passed on where Metal's differ (no fix of ours)
Where the runtime answers otherwise than Metal and the difference is the runtime's to fix, this platform passes its answer on, as it passes on every refusal of the runtime's: it adds no fallback or death of its own until the pin carries the runtime's fix. Nothing logs these. Each has a test that compares the cases with Metal's answers; its ignore reason names the runtime commit with the fix, and it is un-ignored at the pin that carries that commit. None is open at the pinned commit.