Commit Graph
1443 Commits
Author SHA1 Message Date
Anees Iqbal 6ae98ac228 📝 Name in D30 the shape kind rt refuses in place on the M3 [ci skip]
The census's kind lines named the one kind of shape whose move in place rt
refused on the M3, as host-memory: RGBA8Unorm, 18 by 18, of usage 0x7 in all
its textures. D30 names it, so it is not found again.
2026-12-02 21:47:26 -08:00
Anees Iqbal 8ad2f6c454 📝 Say in D30 where shapes lie in place and where O still copies [ci skip]
With the shapes' images in place over their pages on a device of one memory,
and a deferred surface's shapes moved there once its pages hold them, D30's
straight download is left on discrete and virtual GPUs, where rt makes no
image in place over host memory, and for the shapes rt refuses in place. The
entry now says so, with the M3 census: 3,729 straight downloads without the
images in place against 24 with them, and the restore copies each make costs.
2026-12-02 21:47:26 -08:00
Anees Iqbal 5c91a5b507 🆕 View a video plane from a texture that writes it
A recording's colour conversion writes its NV12 (or P010) through R8Uint and
RG8Uint (R16Uint and RG16Uint) textures declaring ShaderWrite. Each took the
storage shape of its plane's extent, an image of its own beside the plane, so
rule 1 copied every write into the plane (rt-shape-order-case,
rt-shape-order-copies). The red test lays its surface out as an RTX 3090
recording boot's (m3-max-81235).

On Unix hosts a video cache's surface's planes are now asked ShaderRead |
ShaderWrite | RenderTarget | PixelFormatView (0x17, was 0x15), and a texture
over a plane whole that takes storage while declaring ShaderWrite and no use
the plane's image lacks is a view of the plane (Caches::writable_plane): no
storage shape and no order copy. Such a writer asks the surface where it comes
first. ShaderAtomic and the Unknown usage keep the storage shape, and so does
every texture of an extent whose storage shape the cache holds. The platform
picks the surface's form for that usage: in place, or rt's copy form where the
device holds no linear image for it (NVIDIA's dma-buf route); the path takes
the images rt answers and assumes neither.

The Windows drawn planes keep 0x15 under their own constant, DRAWN_USAGE:
their Direct3D 11 textures are bound RENDER_TARGET | SHADER_RESOURCE, without
UNORDERED_ACCESS, and rt refuses ShaderWrite on such an import, so a texture
that writes one keeps the storage shape and its counted copies, now ledger
line D31 in docs/video/bugs.md.

What changes for the host: the planes' usage the device asks of the
platform's exported surfaces on Unix hosts. For the guest: the same pixels,
through one image where there were two.
2026-12-02 20:05:33 -08:00
Anees Iqbal 0ed439f58c 🐛 Keep the accelerator's region and registers until it is freed
A CPU lock of an IOSurface in any process (the surfaces' control function,
RgfxAcceleratorLocks.cpp) and the release worker reach the accelerator with
no client of their own, and write a block's runs through its region
(writeRuns), which can come after the accelerator's stop. The stop's
teardown released the region and the registers' mapping, so such a write
would reach a released mapping, a kernel panic.

No path in the lab was shown to run this stop while such a write is due:
kmutil refuses to unload the kext from the boot kernel collection, QEMU
refuses device_del, and a restart was not shown to reach stop(). The hole is
in the teardown the tree ships, so it is closed now rather than once a guest
meets it.

The region and the registers' mapping now go at free(), and a failed start
leaves them to it too. Nothing changes for a guest: boots, a restart and a
shutdown, on the fixes' own kext set (potluck job m3-max-80704), are
unchanged.
2026-12-02 20:01:57 -08:00
Anees Iqbal be40fe5013 🐛 Keep the framebuffer's device mappings until it is freed
The accelerator and its user clients are the framebuffer's siblings on the
PCI device, not its clients, so IOKit stops them in no set order. The
framebuffer's stop released its rings, control data, cursor slot, registers
and region while an accelerator client could still post: tryPost reads the
ready flag outside submitLock and the doorbell is rung outside it, so a post
that read it ready as the framebuffer stopped would write through a released
mapping, a kernel panic.

No path in the lab was shown to run this stop with clients alive: kmutil
refuses to unload the kext from the boot kernel collection, QEMU refuses
device_del, and a restart was not shown to reach stop(). The hole is in the
teardown the tree ships, so it is closed now rather than once a guest meets
it.

Teardown now resets the device and lets the work loop go, and the mappings
go at free() (releaseMappings), once nothing holds the framebuffer; a head's
region goes there too. Nothing changes for a guest: boots, a restart with
clients holding the device, and a shutdown, on the fixes' own kext set
(potluck job m3-max-80704), are unchanged.
2026-12-02 20:01:57 -08:00
Anees Iqbal 868ae658ba 🐛 End the process where an encoder goes without its end
Metal ends the process where a blit, compute or render encoder is let go
without its endEncoding, on the M3 Max, the AMD 5300M and the Intel 630, in
_MTLCommandEncoder's dealloc; a parallel render encoder's sub-encoder let go so
ends it at its release on the x86 Macs and at the parallel encoder's end on
the M3 (dgpu-oracle.md, Q53). The bundle's encoders let go silently, and the
buffer went to the host with the encoder open at its commit.

Each encoder now ends the process in its dealloc where its command buffer's
hold, which only its end lets go, is still there, with Metal's words, before
anything reaches the host. A sub-encoder is held by its parallel encoder to
that encoder's end, so one let go without its end ends the process there, as
on the M3. What changes for the guest: such a process ends as the encoder
goes, as on a Mac, where it used to go on until its commit.
2026-12-02 20:01:57 -08:00
Anees Iqbal 1c90b78fb3 🐛 End the process at an encoder made with another open
The M3 Max and the Intel 630 end the process where a command buffer makes an
encoder while one of its encoders is open, a blit in a blit and a compute in a
render encoder measured; the AMD 5300M makes it, and fails the buffer of a
compute encoder made in a render encoder (dgpu-oracle.md, Q53). The bundle
began the second encoder inside the first, so the buffer's stream went to the
host with nested encoders, which it faulted.

Every encoder maker now ends the process there, before the buffer's stream
reaches the host, in the M3's words on every guest: the M3 is the
latest-macOS target, and no guest is given the AMD's second encoder (the
planner's ruling, 12-02). What changes for the guest: such a process ends as
the encoder is made, as on the M3 and the Intel 630, where its buffer used to
reach the host and fault.
2026-12-02 20:01:57 -08:00
Anees Iqbal 47e5f26fb0 🐛 End the process at a commit with an encoder open
Metal ends the process at a commit made with an encoder of the buffer open,
on the M3 Max, the AMD 5300M and the Intel 630, for a blit, compute, render or
parallel render encoder, and at the commit after a parallel render encoder
let go without its end (dgpu-oracle.md, Q53). The bundle posted the buffer,
whose stream then ended with the encoder open, which the host faulted.

The commit now ends the process there with Metal's words, the M3's on a
device that answers as an Apple GPU and the x86 Macs' otherwise, before the
buffer is posted. What changes for the guest: such a process ends at the
commit, as on a Mac, where its buffer used to reach the host and fault.
2026-12-02 20:01:57 -08:00
Anees Iqbal 1008f10458 🐛 End the process at an event call with an encoder open
Metal ends the process at encodeSignalEvent:value: and encodeWaitForEvent:value:
called with an encoder of the buffer open, on the M3 Max, the AMD 5300M and the
Intel 630, for a blit, compute, render or parallel render encoder and a shared
or a plain event, and the M3 at encodeSignalEventScheduled:value: too
(dgpu-oracle.md, Q53). The bundle kept no record of an open encoder, so the
call wrote its event op inside the encoder and the buffer's stream went to the
host, which faulted it as malformed.

The encoder stream now records whether an encoder is open (a begin op to its
end), and the three calls end the process there with Metal's words, the M3's
on a device that answers as an Apple GPU and the x86 Macs' otherwise, before
anything reaches the host. What changes for the guest: such a process ends at
the call, as on a Mac, where its buffer used to reach the host and fault. The
test's death cases fail where the submission ring holds anything.
2026-12-02 20:01:57 -08:00
Anees Iqbal 9d7ee77db0 🆕 Add oracle_cmdbuf's open-encoder cases and Q53
Metal ends the process at some command-buffer calls made with an encoder of
the buffer open, while the bundle keeps no record of an open encoder and sends
the buffer's stream to the host, which faults it as malformed. The probe asks
each GPU what Metal does with an encoder open at the event calls (a shared
event and a plain one, with a blit, compute, render and parallel render
encoder), at encodeSignalEventScheduled:value:, at the commit, at a second
encoder made, at an encoder let go without its end (a parallel encoder's
sub-encoder among them), and at the calls that pass (enqueue, the handlers, a
debug group). Q53 records its answers on the AMD 5300M, the Intel 630 and the
M3 Max, which the four commits after this one follow.
2026-12-02 20:01:57 -08:00
Anees Iqbal 5338b7f585 🐎 Copy dirty shapes straight into the pages at a download
A download or a release of a per-shape cache wrote its dirty shapes into
the cache's buffer, then copied the buffer out: on the rt platform, whose
IOSurface blocks take no view, the GPU into Shared staging pieces and the
host's CPU into the pages. Census B on the M3 (m3-max-81170) counted 3,772
such write-backs, two a recorded frame, each 3.1 MB a 1080p picture, and
the downloads made 119 deferred buffers' memory for them.

Where the buffer holds nothing the pages lack beyond those shapes' writes
(its record of the host's copies is empty, no texture lies over it, its
pages are a view or copied, laid out as the pages), the shapes' rows now
go straight into the pages' view or a staging piece that holds their
extent, and the CPU moves the rows alone into the pages: one GPU copy
less a plane a read-back, and no memory made for the buffer. The pages
take the same bytes as before. The buffer then lacks the shapes' writes,
as after a straight fill, so a copy through it takes the pages first.
The shapes copied are counted as rt-shape-downloads and
rt-shape-download-bytes; docs/video/bugs.md D30 records the copies left.

This is not a keeper: the batch that lays a Mac's surfaces' shapes in
place over an import of their pages deletes it, unless another caller is
named then. Its entry is SurfaceCaches::write_back's, with its own counts
and a test knob, Caches::set_no_straight_downloads, which the twelve
tests of the copy through the buffer now set: the caches still make that
copy wherever a straight one does not go. The red tests take the counts,
and a third holds the copy through the buffer after a write over it and a
release that goes straight.
2026-12-02 19:16:41 -08:00
Anees Iqbal 2221a41c20 📝 Record the slots boot's reading in the memory slots row [ci skip]
The memory slots row said what an iMac20,1 VM's System Information lists with
reims-ctl's slots; this records the boot that read it: one slot before
(m3-max-80826), and with the installed reims-ctl's command four, DIMM 1 to 3
"Empty", on um870's 780M (m3-max-80887).
2026-12-02 17:23:00 -08:00
Anees Iqbal 3e8cbbff4a 🐛 List an iMac20,1 VM's four memory slots, not QEMU's one
An x86-64 guest's System Information listed one memory slot, "DIMM 0": QEMU
makes only the memory devices RAM fills, one on current machines, and
OpenCore copies them into the guest's SMBIOS. An iMac20,1 has four SO-DIMM
slots.

reims-ctl gives -smbios type=17's slots=4,form_factor=13 for an iMac20,1,
read from the VM's OpenCore image at each start, as it gives the memory's
error correction: vendor/qemu's 445170b5 makes the slots past the RAM's
empty. A guest given four such devices lists DIMM 0 with the VM's RAM and
DIMM 1 to 3 as "Empty" (m3-max-80846; with reims-ctl's command,
m3-max-80887). The options go only to a QEMU that takes them, asked once
per binary; another model, an iMacPro1,1 among them, and another QEMU keep
one slot, the command as before.
2026-12-02 17:23:00 -08:00
Anees Iqbal 4ce2543a5e 🆕 Let reims-ctl's resolution give each display a size
A VM's resolution was one size, every window's first size and, on a
headless start, every display's mode, so a VM of displays on screens of
different sizes opened every window at the same size. The resolution
setting now takes one size for every display, as before, or one for each
display, comma-separated in the displays' order (--resolution
2560x1440,1920x1080 on create and set, and the same in the interface's
form). Another count of sizes than the VM's displays is refused with a
message that says what to give. It applies at the next start: the fork's
1d614106 lets reims-graphics-pci's resolution take the list, which
reims-ctl writes with each comma doubled (resolution=2560x1440,,1920x1080).
One size, or sizes that are all one, gives the device string reims-ctl gave
before, byte for byte (each_display_s_size_reaches_the_device). A VM's
summary names each window's size where they differ.

What the user sees: each display's window opens at its own size, and a
headless start offers each display its own mode.
2026-12-02 17:19:47 -08:00
Anees Iqbal dc87082ea8 🆕 Let a windowless device give each display its own first mode
A device without a window offered every display the one headless mode its
config gave (headless_mode_width and _height), so a host could not give a
VM's displays different sizes without windows. RvgGraphicsDeviceConfig's
eighth version appends headless_modes: NULL, or an array of display_count
sizes, display i's at i, each taken as the one mode is (a 0 in either side
is 1920 x 1080), in its place. NULL, and a host built before the field,
keeps every display at the one mode; with a window the field is unread, as
the one mode is. The Rust API's GraphicsConfig gains headless_modes beside
headless_mode, and refuses a list of another count than the displays.

What a host sees: a new optional field; a host that leaves it NULL gets the
device it got before.
2026-12-02 17:19:47 -08:00
Anees Iqbal c5a3079426 📝 Drop indexed patch draws from the unbuilt render commands [ci skip]
The accuracy ledger listed drawIndexedPatches, direct and indirect, under
rt-unbuilt-render-command. The platform draws them through rt since the
commit before this one, so the row lists only what is still not built.
2026-12-02 17:04:32 -08:00
Anees Iqbal 179324bb46 🐛 Write an Accumulate pass's visibility results as a Reset pass does
At pin I the runtime writes a visibility mode's result in a pass whose
visibilityResultType is Accumulate as it does in a Reset pass, in place of the
word at the mode's offset. Until now such a mode was rt's gap: it encoded
nothing, was counted under rt-refused-gap, and the guest's buffer kept its
bytes.

What the guest sees: an occlusion query in an Accumulate pass now answers its
count, or a non-zero Boolean, at its offset. That is Metal's answer on a
Radeon Pro 5300M and a UHD Graphics 630. Metal on an Apple M3 Max adds a
Counting result into the word and ORs a Boolean one; the accuracy ledger
records the difference. The render test that held the gap now holds the
written results with no gap counted.
2026-12-02 16:08:20 -08:00
Anees Iqbal 260cdc8789 🐛 Give an x86-64 VM's memory the presented Mac's ECC, not QEMU's
System Information showed an x86-64 guest's memory as "ECC: Enabled": QEMU's
SMBIOS type 16 says multi-bit ECC on every machine, and OpenCore copies it
into the guest's tables, where an iMac20,1, the Mac a VM presents for macOS
10.15.6 and later, has RAM without ECC. vendor/qemu's d72b4ac3 lets
-smbios type=16,error_correction set the field, and reims-ctl now gives the
presented Mac's: 3, none, for an iMac20,1, and 6 for an iMacPro1,1, whose RAM
has ECC. It reads the model from the OpenCore image's PlatformInfo at each
start, gives nothing for a model whose RAM it does not know, and asks each
QEMU once whether it takes the option (-smbios type=16,error_correction=3
-version), as it asks for memory_type; another QEMU's guest keeps ECC.

What the guest sees: an iMac20,1 VM's memory reads "ECC: Disabled" in
System Information. The part number stays OpenCore's "Unknown": a made-up
one would be a false answer.
2026-12-02 15:53:57 -08:00
Anees Iqbal 6317f0e84f 🐛 Keep a guest's emulated TPR write under WHPX without irqchip
The fork's 79d47edf: under WHPX with QEMU's own APIC (kernel-irqchip=off),
a TPR the guest wrote through an instruction QEMU emulates (a
read-modify-write of the xAPIC's TPR, an x2APIC WRMSR) never reached CR8,
and the next exit put the old TPR back, so the guest's write was undone.
reims-ctl starts WHPX with the in-kernel irqchip, which keeps the TPR in
Hyper-V's APIC, but QEMU keeps its own APIC on a Windows 10 host, where the
machine has a PIC, and on a Hyper-V that offers no local APIC emulation; a
command that turns the irqchip off gets it too. Those hosts' guests lost
such TPR writes. Now the TPR the guest wrote stays, as it does under
kernel-irqchip=on.

Checked on an i7-8700B under Windows 11 with QEMU built as install-ctl.sh
builds it in MSYS2's CLANG64, and a guest of our own that ORs 0x50 into the
TPR and reads it back: kernel-irqchip=off read 0x00 in 3 of 3 runs before
(m3-max-80368) and 0x50 in 3 of 3 after; kernel-irqchip=on read 0x50 in
every run (m3-max-80485).
2026-12-02 15:32:21 -08:00
Anees Iqbal 4a61b65037 🆕 Add oracle_aborts and Q52, where Metal ends what the bundle refused
The probe asks each GPU what Metal answers at the calls where the bundle
answered nil or refused while Metal may end the process: the linear SPI at more
than one level, a texture over a buffer of rows shorter than its texels' bytes
by every form, a pipeline of a function made by name that declares a constant
(compute, render, mesh, a binary archive's add) and one linking such a
function, a view with a lowest level of detail, and the format view of a
linear 2D array's every slice, each against a control. Q52 records its answers
on the AMD 5300M, the Intel 630 and the M3 Max, which the five commits before
this one follow, and Q11's rows it corrects: a texture buffer's short rows end
the process on the three, and the M3 ends it at that format view.
2026-12-02 15:12:02 -08:00
Anees Iqbal bcd48cd69f 📝 Record that Metal orders no write across aliased no-copy buffers
The host's runtime holds two imports of the same guest pages for two pages
blocks that overlap, and its hazard tracking does not tie them together
(row 403). oracle_aliasbuf asks what Metal does with a write through one
no-copy buffer and a read through another over the same pages: the M3 Max
never orders the read after the write, not even in the next command buffer
of the queue; the 5300M does not before a blit's read; the UHD 630 orders
every encoder (m3-max-80200, 80202 and 80204). Metal's tracking is the
resources', and the Macs differ past it, so the runtime's answer is the
M3's. dgpu-oracle.md Q51 holds the table, and overlaps.rs's doc the fact.
Nothing changes in what the host does.
2026-12-02 14:31:10 -08:00
Anees Iqbal 054f8a71d0 🐛 Pause a VM where an NVMe or firmware-variable write fills the disk
The fork's nvme device completed a write that found the host disk full to the
guest as Write Fault, and pflash_cfi01 logged 'Could not update PFLASH' and
dropped the variable. Both now follow the drive's error action: under -drive's
default werror=enospc the VM pauses (io-error, the drive's io-status nospace,
which reims-ctl reads to name the file), and the resume runs the write again
(fork 51d47e28, 1e223049, 0beafad0).
2026-12-02 14:31:10 -08:00
Anees Iqbal 81c12ee542 🐛 Give a context's number out again once its close is answered
The kext gave each process's context a number once, counting up from 1, and
never again. A number is the top 24 bits of the context's 64-bit object ids
(RGFX_CONTEXT_OBJ_ID_SHIFT) and of its doorbell page's bind, so the 2^24th open
of a boot carried ids past 64 bits, onto other contexts' ids.

Numbers now run below 2^24, in turn from where the last was taken, wrapping
past the last to 1 and skipping those held. A number is held from its open
until both the device has answered its close OK (no framebuffer started, or a
late answer, counts as well; a refused close keeps it) and its user client is
freed, so no call of the client's, and no create it posted behind its close,
can reach the device once another process takes the number. Where every number
is held, or the 2048 the kext keeps, the open is refused with
kIOReturnNoResources, as when no unit of GPU addresses is free: the bundle
answers that process no Metal device, and a later open takes a number once one
is given back. A live number is never given out twice.

context_numbers_test pins it near the top: the last numbers below 2^24, the
wrap to 1 past those held, a number reused only after both holds drop, and
every number held refused with nothing changed.
2026-12-02 14:31:03 -08:00
Anees Iqbal 7399b4fc60 🐛 End the process at a view of several slices of a linear array
A view of a range of more than one slice of a 2D array over a buffer, made
by the linear form, answered nil. Metal asserts at it on the M3 Max and an M4,
plain and validated ("sliceRange.length == 1", measured by metal2vulkan), and
neither x86 Mac makes such an array, so every Mac on record ends the process
there. The bundle now ends it too, before anything is sent, after the view
rules both x86 Macs share.

A view of every slice named by its pixel format alone still answers nil:
Metal's answer for that form is not measured, and it goes to the oracle
probe.

For the guest: a process that asks for such a view now ends at the call, as
on a Mac, where it went on with nil. The shell test that held the nil keeps
only the pixel-format form, and a death test checks the range.
2026-12-02 14:03:22 -08:00
Anees Iqbal 4b7790b4ef 🐛 Make a linked function with its constant values, none too
A linked function made with constant values that set none of the constants
it declares, or by a descriptor without values, options or a specialized
name, reached the host with no constants. The host then made it by its name,
and the Vulkan runtime refused the pipeline that linked it, where Metal makes
that pipeline and the function reads its unset constants as undefined. Stage
functions were fixed the same way in e6d1572dd5. This was the last path that
still made a function by name.

The host now makes each linked function as it makes a stage's function: with
its constant values, even when there are none. That covers pipelines and
function handles. A function made by name that declares constants would then
be made with them undefined. So the bundle now refuses a pipeline that links
such a function, as it refuses one of such a stage function, in the same
words with the role "linked function", and sends nothing. Metal's answer for
a linked function made that way is not measured; the host's runtime refused
that pipeline before this change too.

For the guest: a pipeline that links a function made with values that set
none is made, and the function reads its unset constants as undefined, as on
Metal. The decoder test links tests/shaders/linked_optional.metal's function
by name, sent with no constants and then with one, on the Vulkan platform.
The two fake-platform tests that held the by-name make now expect the make
with constant values. The bundle's shell test checks the refusal in each list
of each creator, and the record sent for a function made with no values.
2026-12-02 14:03:22 -08:00
Anees Iqbal 5b1067a787 📝 Say Metal leaves a write into read-only memory undefined [ci skip]
No header of the macOS 27.2 SDK states what a GPU write into memory a
process maps read-only, or into a no-copy buffer of bit 24, does:
MTLDevice.h says only that newBufferWithBytesNoCopy wraps an existing part
of the address space, and bit 24 is no public MTLResourceOptions value. The
accuracy ledger's read-only-pages-written entry now says so, and words the
known gap as the planner ruled it: a GPU write into memory the guest mapped
read-only stays visible until the next commit that uses the copy.
2026-12-02 13:57:07 -08:00
Anees Iqbal 5deffb45a2 📝 Record the arm64 guest's boot on the M3 for the Mac arm [ci skip]
An arm64 macOS 27.0.1 guest's boot on the M3 (m3-max-80121) decoded seven
H.264 and HEVC streams to ffmpeg's MD5s on the arm and played and recorded a
movie of each codec with no bad frame, so formats.md's H.264 and HEVC Main and
Main 10 cells name it, and D29 gives its count of GPU-copied pictures and KiB.
formats.md also names the arm's caps_of among the arms' caps.
2026-12-02 13:55:34 -08:00
Anees Iqbal c83dc74d31 📝 Say which video caps the Mac arm writes [ci skip]
devices.md's Mac arm paragraph now says which caps entries the arm writes and
that the arm64 kext serves its paravirtual decoders from them.
2026-12-02 13:55:34 -08:00
Anees Iqbal f9af79118f 📝 Document the VideoToolbox arm on Mac hosts [ci skip]
devices.md says what the arm offers, how the host answers it and how a
picture lands; formats.md fills the M3 Max's column and narrows N2 to what is
not built; bugs.md records the GPU copy as D29 with its bytes a picture; and
conventions.md and answer.rs name the arm's counts' codes.
2026-12-02 13:55:34 -08:00
Anees Iqbal cba3a88875 📝 Say a pinned bit-24 buffer takes writes as the x86 Macs do
A no-copy buffer or heap of option bit 24 pinned in a known block of
writable pages keeps the GPU's writes. The docs and the line counted under
rt-no-copy-read-only said Metal's GPU drops them, which is the M3 Max's
answer alone: on the 5300M and the UHD 630 bit 24 does nothing, and every
GPU write lands in the buffer's pages (dgpu-oracle.md, Q38). The case is
inside what the Macs answer, so nothing changes in what it does; the docs,
the accuracy ledger and the line now say whose answer it is.
2026-12-02 13:51:13 -08:00
Anees Iqbal 0898313d14 🐛 Answer raster order groups only where rt orders them
The device answered areRasterOrderGroupsSupported yes on every host, the
M3 Max's answer. But rt's translator orders a fragment function's raster
order groups only inside the fragment shader pixel interlock, and refuses
a pipeline of them on a device without it. An RX 550 on RADV (Mesa
26.2.6) reports no pixel interlock, so a guest there that was told yes
had its raster-ordered pipelines refused.

The device now answers yes where rt's device creation enabled
fragmentShaderPixelInterlock, and no elsewhere, as Metal has a GPU
without raster order groups answer; the bundle's SPI raster order groups
feature follows the same flag. The answer stays yes on the 780M, the RX
7900 XTX, the Iris Xe and the NVIDIA cards, and is now no on the RX 550
(RADV POLARIS12) and on a Mac host over KosmicKrisp, which lists neither
VK_EXT_fragment_shader_interlock nor the feature. x86-64 and arm64 guests
read the same flag, so both are told no there.
The AMD Radeon Pro 5300M and the Intel UHD 630 answer yes (macOS 26.7.1,
oracle_caps, potluck jobs m3-max-79873 and 79874); neither lacks them.
raster_order_groups_are_rt_s_answer holds the answer; no test held the
old one.
2026-12-02 13:49:00 -08:00
Anees Iqbal 65cbf3220e 🐛 Make a pages block's view after its answer on a worker of its own
Where the guest took IMPORT_ADDRESSES_LATER, a pages block's SURFACE_PAGES was
answered as soon as its runs were carried out, and its view was then mapped
and imported on the same surface worker job before the block settled. The
surface worker runs at most four threads, so four blocks' view makes held
every thread, and the next block's SURFACE_PAGES waited for one behind them,
however short its own carry-out. On the RTX 3090's gcl boot (rowb-3090,
m3-max-79853) carry-outs took at most 2.1 ms, view makes 14.9 ms at the
median and up to 351 ms, and 64 answers took over 50 ms, up to 133 ms: of the
225 over 20 ms, 163 waited while four or more other blocks' views were being
made.

The view made after the answer now runs on the views worker
(reims-vgpu.graphics-views-<i>), a worker of its own under the block's key,
which holds the block's settle until the view is made: the messages that
name the block wait for it as before, and the surface worker's thread goes
on to other blocks' SURFACE_PAGES. A job of the block's on the surface worker
(its BUFFER_OVER_PAGES, or its next SURFACE_PAGES) that finds one of the
block's on the views worker runs behind it there (Worker::behind, one step
under the worker's lock), so the block's jobs keep their order across the two
workers; a SURFACE_PAGES run there makes its view itself, so no views
worker's job hands one to the views worker. The views worker runs at most
POOL_THREADS (4) threads, as every worker does, and holds at most
VIEWS_WAITING (256) jobs waiting (Worker::bounded): a hand-over that finds
that many waits on its surface worker's thread until one is taken, counted
and logged at debug. The busiest 100 ms of the same boot carried out 140
SURFACE_PAGES. No setting changes either number. The view's make takes the
reset gate shared, recursively, as the surface worker's jobs do, and where
the device was reset since the SURFACE_PAGES' begin it makes nothing.

What the guest observes: a LATER SURFACE_PAGES is answered without waiting
for other blocks' views; its own block's later messages wait for its view as
before. What the host observes: raise_interrupt may come on a views worker's
thread (a SURFACE_PAGES or a BUFFER_OVER_PAGES run behind a view there posts
its answer or its command buffer's failure), named in reims_vgpu.h, api.md
and RAISE_THREADS. QEMU's raise_interrupt callback takes a call from any of
the library's threads (the irqfd's write, the WHPX request under msi_lock, or
a BH), as it does from the surface workers', so its side needs no change.
Nothing changes where the guest did not take IMPORT_ADDRESSES_LATER.

Tests:
- a_pages_block_s_answer_waits_for_no_other_block_s_view: four blocks' view
  imports held, a fifth block's SURFACE_PAGES is answered, no surface worker
  cap hit, the views worker at four threads, and a BUFFER_OVER_PAGES over a
  held block made only after its view.
- a_reset_ends_pages_views_made_after_their_answers_cleanly: a reset waits
  for the view being made; the view waiting on the views worker and the
  buffer behind it make nothing after the reset; both blocks settle.
- a_device_released_while_pages_views_are_made_after_their_answers_ends_clean:
  the release waits for neither view, and the device's control goes once
  both views' jobs end.
- worker: a_bounded_worker_s_hand_over_waits_for_room,
  a_job_behind_a_key_runs_after_its_jobs_or_here_where_it_has_none.
2026-12-02 13:39:08 -08:00
Anees Iqbal 3d37c928b4 🐛 Keep every write the kext refuses in order until it goes
A refused write into an object was lost. An indirect command buffer's
records and slots and a visible function table's entries were dropped with a
log line, and a shared event's setSignaledValue: was dropped with none. The
kext refuses a control-ring post once its ring has stayed full for 5 s, or
once the device has stopped. Later command buffers then ran the ICB's old
commands or the table's old entries. A buffer already posted that waited on
the event's value never ran, even once the host read again.

Row 318's queue of refused Managed notes now holds every such write, in one
first-in-first-out order: ICB_WRITE, ICB_SLOTS(_IN_PAGES), FUNCTION_TABLE_SET
and SHARED_EVENT_SET_VALUE besides the range, region and didModifyData. A
waiting write is posted before the next write, a destroy or a commit, and
from a timer once a second while any waits. The timer means an event's value
still reaches the host when nothing else is posted. A destroy now waits behind
the waiting writes, since a record or a table entry may name its object, and
drops the writes into its own object. A refused ICB_SLOTS of several buffers
waits as one message for each buffer. The device's stop ends the timer and
drops what waits.

What changes for the guest: while such a write waits, a commit fails its
command buffer unposted with MTLCommandBufferStatusError and
MTLCommandBufferErrorInternal, as for a refused Managed note before. Once the
kext takes posts again, the writes go in order before the next buffer. At
most 4096 writes or 16 MiB wait. Past that, a write is lost and every later
commit fails Internal. After the device's stop every commit fails the same
way. A write is never dropped while later work runs. Nothing changes where
the kext takes every post.
2026-12-02 13:39:07 -08:00
Anees Iqbal d39e13c4cf 📝 Say the guest answers the info's threadgroup memory [ci skip]
The bundle now answers maxComputeThreadgroupMemory from the device info, so
the oracle table's row gives the device info's answer for each guest instead
of the Metal base's 65536. This lands in one batch with the bundle's getter.
2026-12-02 13:14:23 -08:00
Anees Iqbal baf08a4d11 🐛 Give an x86-64 guest's device info its threadgroup memory limit
The device info's max_compute_threadgroup_memory slot carried the
platform's 65536 bytes, Metal's on the M3 Max, on every host, while the
runtime refuses a kernel's threadgroup memory past
maxThreadgroupMemoryLength, which the device answers as rt's told limit
(32,752 or 32,768 bytes). Both x86 Macs answer the two alike, 65536 and
65536 (AMD Radeon Pro 5300M and Intel UHD 630, macOS 26.7.1, oracle_caps,
potluck jobs m3-max-79873 and 79874), so an x86-64 guest's framework may
size a kernel by either.

For an x86-64 guest the slot now holds the device's
maxThreadgroupMemoryLength; an arm64 guest's keeps the platform's 65536,
the M3 Max's pair. No guest reads the slot yet: the guest's
maxComputeThreadgroupMemory is still its Metal base's 65536, until the
bundle answers it from the slot.
compute_threadgroup_memory_follows_the_guest holds the new slot; no test
held the old one.
2026-12-02 13:14:23 -08:00
Anees Iqbal 5a2b9f99f7 🐛 Answer no to the texture write rounding modes
The device answered supportsTextureWriteRoundingMode: yes for modes 1
and 2, the M3 Max's answer. No pipeline create on the wire carries a
rounding mode, so the host's pipelines round as the runtime's default,
toward zero, whatever the descriptor asks: a guest told yes for mode 2
(round to nearest even) got a pipeline that rounds toward zero, and the
bundle logged the mode as unsupported.

The guest's device now answers no for modes 1 and 2, for both guests and
on every host, as the AMD Radeon Pro 5300M and the Intel UHD 630 answer
(macOS 26.7.1, oracle_caps, potluck jobs m3-max-79873 and 79874). The
answer is the lane's, in device_info's table, until a pipeline create
carries the mode to the runtime, which takes it. No test held the old
answer; no_texture_write_rounding_mode_is_carried holds the new one.
2026-12-02 13:14:22 -08:00
Anees Iqbal e3d002fae7 🐛 Answer no to the raw primitive types 5 to 9
The device answered supportsPrimitiveType: yes for the raw types 5 to 8,
the M3 Max's answer, but the runtime draws only the public types 0 to 4
and refuses a draw of any other as a primitive type Metal has none of. A
guest framework told yes would have encoded draws that drew nothing.

The guest's device now answers yes for 0 to 4 and no for 5 to 9, as the
AMD Radeon Pro 5300M answers (macOS 26.7.1, oracle_caps, potluck job
m3-max-79873); the Intel UHD 630 answers yes for 5 to 9 (m3-max-79874).
The answer is the same on every host and for both guests.
a_roomy_device_answers_metal_s_counts held the old answer.
2026-12-02 13:14:22 -08:00
Anees Iqbal 456e995096 🐛 Fail commits behind a Managed write the kext did not take
A Managed texture's replaceRegion:, a texture's didModifyData and a Managed
buffer's didModifyRange: tell the host to copy the CPU's bytes to the GPU's
copy. The kext refuses a post once its control ring has stayed full for 5 s
(a host that stopped reading), and also once the device has stopped. On a
refusal the bundle dropped the message without a word: the region and
didModifyData always, and the range when the held messages would not fit
with it. Every command buffer committed afterwards read a stale GPU copy.

Such a write now waits in the serializer (postWaitingNotes). It goes first
at the next such write and at each commit, and is dropped when its object is
destroyed. What changes for the guest: while a write waits, a command
buffer's commit fails it unposted with MTLCommandBufferStatusError and
MTLCommandBufferErrorInternal, as a buffer behind a held create already
fails. Once the kext takes posts again, the writes go before the next buffer,
which runs as before. Past 4096 waiting writes, the next one is lost and
every later commit fails. Nothing changes where the kext takes every post.
test_commit_behind_an_untaken_managed_write_fails covers each kind.
2026-12-02 13:14:22 -08:00
Anees Iqbal c0dcc030cd 🐛 End a commit's wait for ring room at the device's stop
A commit that found its queue's submission ring full waited for the host to
take from it, with no deadline: on the host's room record where the device
holds SUBMIT_ROOM, else in sleeps between looks. Once the device stopped,
the host took nothing more, and the ring may already be gone from the
process with the context's window, so the committing thread looked at it for
good. The same held for a waiting thread's scheduled ask.

A queue's reader now stops the ring's room events with itself
(RgfxReplyReader::stop). A post waiting for room ends there, and a post
after it answers at once, looking at no ring word and ringing no doorbell
(RgfxRingWriter::post). Every queue now has room events, as the stop's
channel; whether the post waits for room records still follows SUBMIT_ROOM,
so the waiting is unchanged.

What changes for the guest: a commit waiting for room on its queue's ring
at the device's stop returns, and its command buffer fails with
MTLCommandBufferErrorInternal ("Discarded (victim of GPU error/recovery)"),
as a buffer committed after the stop does (previous commit). Before, the
commit never returned. serializer_tests' new test runs the writer's wait
across the stop with and without room records, and queue_tests' new test
runs a commit's.
2026-12-02 13:14:22 -08:00
Anees Iqbal ac7885c79b 🐛 Fail a queue's buffers in flight at the device's stop
When the kext closed a process's completions (the device's stop, or the
context's release), the completion thread ended and left its readers
undriven, so each wait for a command buffer took the queue's ring itself.
No record could come there any more, and the kext also takes the context's
window, the rings in it, out of the process. waitUntilCompleted,
waitUntilScheduled and commitAndWaitUntilSubmitted spun on the ring for
good, -commandBuffer polled it every millisecond for slots the buffers in
flight never gave back, and the queue's finish slept for good, where they
did not read memory the process no longer mapped.

The completion thread now stops every reader at that point, and each one
added after (RgfxReplyReader::stop). A stopped reader reads its ring no
more and fails every command buffer it still awaits, in ring order, as a
GPU recovery's victim. A buffer committed after the stop fails at its
commit, with nothing put on its ring. Such a failure touches nothing of
the buffer's surfaces or copies.

What changes for the guest: at the device's stop, each command buffer in
flight or committed afterwards completes with MTLCommandBufferStatusError
and MTLCommandBufferErrorInternal ("Discarded (victim of GPU
error/recovery)"), the bundle's answer for work a stopped device never
took. Its scheduled and completed handlers run, and every wait for it
returns. Before, the buffer never completed. A buffer committed after
the stop no longer goes on its ring, and its waiter no longer takes
records from the ring.

shell_tests' test_completion_thread_stops held the old behaviour (a buffer
committed after the stop completed from a record its waiter read off the
ring). It now holds the failure, and keeps the ring-taking waiter for a
destroyed thread. queue_tests' new test runs every wait above across the
stop, alone with `shell_tests --waits`.
2026-12-02 13:14:22 -08:00
Anees Iqbal c9e1b356b5 🐛 Fail a buffer whose cache fill gets no command buffer
What the guest observes changes. A fill of a surface's device cache from its
pages, or of a new shape from the cache, that the platform made no transfer
queue or command buffer for was left unmade with nothing said: the command
buffer whose begin asked it ran over the cache's older bytes, or the shape's
zeros, and completed with no error. A fill whose command the platform refused
already fails that buffer with MTLCommandBufferErrorInternal (ac5b41b2ed), so
the fill no command buffer could carry now takes the same answer: the buffer
fails with the internal error, the miss is counted under surface-copy-refused,
and the cache keeps its older generation, or the shape owes its fill still,
for the next use to make. A refused buffer memory keeps OutOfMemory.

This is the fill half of the class 3f446e1e70 fixed for downloads (ledger row
1193). Two fake-platform tests: red at c1de973e24 (m3-max-79907, both failed
on the missing count), green with the fix (m3-max-79910, the surface, shape,
pages, order, command buffer, video and graphics tests, 668 passed).
2026-12-02 13:06:15 -08:00
Anees Iqbal 216197c62a 🐛 Answer a download refused where no copy into its pages is made
What the guest observes changes. A SURFACE_DOWNLOAD whose copy of a device
cache into the surface's pages got no transfer queue or command buffer from the
platform, or whose cache's buffer the platform refused its memory, was answered
RGFX_STATUS_OK at once, over the pages' older bytes: the CPU lock that asked
went on reading what the CPU had last written, without the GPU's writes. rt
answers no command buffer at a wait for room on its own handler thread, where
a download carried out in a writer's finish can ask for one, and on a quiesced
device.

Such a download is now answered failed (RGFX_STATUS_REFUSED, the kext's
existing copy-refused path) where the pages lack a write of the cache's,
counted under surface-copy-refused as a refused copy is since aaedba617b, and
the cache stays written, so the next download or release copies it. A cache
whose buffer holds no memory, so no work wrote it, and whose shapes hold no
write is answered done as before: the pages hold all it holds. A release's
copy so is logged, as a refused one's is.

Ledger row "a SURFACE_DOWNLOAD whose copy gets no command buffer, or whose
buffer memory is refused, is answered done" (audit, 12-02). Two fake-platform
tests: red at b7ff9acca9 (m3-max-79892, both failed), green with the fix
(m3-max-79896, the surface, shape, pages, order and command buffer tests,
411 passed).
2026-12-02 13:06:15 -08:00
Anees Iqbal 22cfe51a54 📝 Delete B96; say how each arm decodes resizing VP9 [ci skip]
B96 is fixed: one NVDEC decoder, or one VA context and pool, takes a VP9
stream's frames at every size up to the largest so far. nvidia.md says what
NVDEC still refuses (an inter frame larger than every frame before it, which
libvpx never codes) and lists the new test; vaapi.md says how the context grows,
with radeonsi's wrong frames under a context for each size (potluck jobs
m3-max-79740 and m3-max-79744), and where the resizing stream decodes (a Radeon
780M, m3-max-79777; the Iris Xe, m3-max-79848); backends.md lists the stream.
2026-12-02 12:46:12 -08:00
Anees Iqbal f6955b031f 📝 Cite an arm64 guest's 4:2:2 export on the Iris Xe [ci skip]
The listing of HEVC Main 4:2:2 10 came back with its hold's lift, and its
ordinary proof is a guest's export of that format on the Iris Xe: an arm64
macOS 26 guest's hardware session coded 10 frames at 640x360 that decoded back
frame for frame at 65.1 to 68.3 dB luma and 59.0 to 60.7 dB chroma, with no
engine reset in the host's kernel log (potluck job m3-max-79800). formats.md's
row and text cite it.
2026-12-02 12:46:12 -08:00
Anees Iqbal 108a8bcb8a 📝 Keep NVDEC's per-set current references off as D28 [ci skip]
An HEVC decode entry answers 8 current references on both arms, and the guest's
video driver fails the schedule of a picture whose sets name more. NVDEC holds 8
pictures in each of its three sets, so lifting the bound there was on the list as
a per-set wire field. Such a picture lies outside the profiles the host lists:
va.h bounds NumPocTotalCurr at 8, and the one stream here that names more,
kvazaar's --ref 15, does what Main does not allow (vaapi.md). So the change, a
wire field with the kexts and both prebuilt sets, buys nothing a listed profile
reaches, and it is put off with what would lift it.
2026-12-02 12:46:12 -08:00
Anees Iqbal 1bb64aaa55 🆕 List HEVC Main 4:2:2 10 for arm64 guests on the Iris Xe again
The hold on HEVC Main 4:2:2 10 (b675d53fff) waited for one encode of the arm64
guest's session that hung the Iris Xe's render engine (boot m3-max-79085:
640x360, a constant QP of 10, a Quality of 0.9, VA quality level 2), run under
the quality-level fix (201d165e47), which renders the level alone and codes at
the nearest level the driver takes. With the owner's word, that case ran once on
the Iris Xe (iHD 26.3.5, Linux 7.3.1, potluck job m3-max-79699): the driver
refused level 2 and took 1, the 10 frames, each repacked by the GPU, coded a
Main 4:2:2 10 stream that decoded back at 65.1 to 68.3 dB luma and 59.5 to 60.2
dB chroma, and the kernel logged no hang or reset. So the refused level was the
trigger, and the hold comes off.

repacked_profiles again keeps Main 4:2:2 10 where the runtime device's GPU makes
an encode session's filler, and leaves it out, said once, where it makes none.
B102 is deleted; formats.md lists the profile as offered on the Iris Xe, and the
lesson on the quality level cites the run.

For the guest: an arm64 guest's paravirtual HEVC encoder lists Main 4:2:2 10
again where the host's VA-API driver encodes it (the Iris Xe's iHD), and a
session of HEVC_Main42210_AutoLevel encodes in hardware. Other profiles and
hosts see no change.

Tests: Main 4:2:2 10 is listed where the device makes a filler and left out
where it makes none, the driver's other profiles listed either way (a unit
test). Build, unit tests and clippy on Linux and the Windows target: potluck
jobs m3-max-79811 and m3-max-79842; rustfmt passes with 68b40ffd56 on top
(m3-max-79842). An arm64 macOS 26 guest booted on the Iris Xe with the change
(m3-max-79800) listed the profile, and its VideoToolbox session of
HEVC_Main42210_AutoLevel, which requires hardware, coded 10 frames at 640x360
on the paravirtual encoder that decoded back frame for frame at 65.1 to 68.3 dB
luma and 59.0 to 60.7 dB chroma; the boot passed its 17 checks, and the host's
kernel logged no engine reset.
2026-12-02 12:46:12 -08:00
Anees Iqbal e76d7e3ab1 📝 Delete B95, fixed by early completion; B41 becomes D27 [ci skip]
B95 said a VA-API reference picture's command buffer completes only once
video processing has copied the picture into its output. 359ac7817e (11-19)
posts the CB_COMPLETE of a command buffer holding only that decode as the
decode is done and the copy issued (runs_behind_the_decode's decoded_now,
Landing::decode_done, ahead_at_decode), and readers of the output wait for
the copy and its acquire at the buffer's platform end: the fix B95 named.
Boots on a Radeon 780M then counted 893 decodes completed ahead and no
buffer or present held (walks 55149 and 55141). The 4K start's first long
gap, read by refresh, was 198.4 ms with it and 197.7 without; its share of
surface makes, first decodes and first video-processing runs is in the
ledger, unmeasured since 6bdfdcd49e and ff96c37f07. The decode wait's cost
B95 held (Iris Xe, m3-max-78524) moves to vaapi.md's zero-copy paragraph.

B41, a truncated slice decoding on VA-API with no error, is put off as D27,
as decided on 2026-12-02: a Mac's hardware H.264 decoder does the same
(measured, D25); a Mac's answer for HEVC is not measured. Its citations in
nvidia.md, vaapi.md and T3 now name D27.
2026-12-02 12:46:12 -08:00
Anees Iqbal 29de5f36e0 🐛 End the commit order's waits at a device reset
A buffer answered CB_SUBMITTED on its doorbell's thread keeps its ticket in
the commit order on its queue until its begin. Where the device's reset ends
the queue before the queue's thread takes the buffer, it is never begun, and
its ticket is given back only as the control thread's reset drops the
queue's tables, holding the reset gate. A walk of the same process on
another queue, begun after that answer, waits at its commit for the ticket
(Sequencer::wait_for, or wait_for_ranges for a range message behind it)
while it holds the gate. The control thread's reset then waited for the walk
and the walk for that reset: on development a deadlock of the reset, and
with the host's settle waiting for the walks begun before the reset, a
death at its 30 s bound. A reboot between a doorbell's answer and its
queue's take meets it, as when the queue's thread is still walking the
buffer before it in place.

The sequencer's two waits now take the decoder's count of resets
(commit_order::Cancel) and end while a reset is under way, or once one came
since they began, as the waits for COMMIT_ORDER, SURFACE_ORDER and the video
caches already did. Decoders::resetting, which both the settle and the
control thread's reset call before they wait, wakes them (Sequencer::wake,
under the order's lock, so no waiter misses it). Its doc already said every
wait for another queue's buffers ends; these two did not.

What the host observes: a reset that comes between a doorbell's answer and
its queue's take no longer deadlocks the control thread's reset, nor ends
the process at the settle's bound ("the device's reset: after 30s, ... queue
walks begun before the reset"). Nothing changes outside a reset.

Tests:
- sequencer::a_reset_ends_a_commit_s_wait_for_tickets_and_range_messages: a
  wait under way as a reset begins ends, one begun during it does not wait,
  and waits wait again once it has ended, for tickets and range messages.
- reset_walks::a_reset_ends_a_walk_s_wait_for_a_buffer_answered_at_its_
  doorbell: queue 1's short buffer walked in place and held, the asking
  buffer behind it answered at its doorbell, queue 2's buffer waiting for
  its ticket, the control thread's reset held; the reset returns inside its
  bound.
Job m3-max-79774 (homelab-um870-1, fake platform): green, 178 passed (the
sequencer's, reset_walks', reset_chain's, commit_order's and the answer,
doorbell and range tests); red, with the waits not ended, both new tests
fail, the reset dying at the bound. fmt, the header's check and clippy on
the host and the Windows target are clean (79783, after the fmt fix); the
workspace's 3169 tests pass on homelab-um870-1's Radeon 780M (79801).
2026-12-02 12:46:12 -08:00
Anees Iqbal 1e8853cd04 🆕 Keep the AIR of states rt refuses for unsupplied draw input
REIMS_VGPU_REFUSED_AIR_DIR kept the AIR and record of a pipeline state only
where the translator refused it. A state rt refuses as reading what a draw or
a dispatch does not supply yet (Gap::RenderPipeline, Gap::KernelInput, such
as DrawInput) names no cause: it is one of a function table, a translation
table, a long parameter block, an unfilled push field or an unnormalized
constexpr sampler, which only the functions' AIR tells apart. A usdz preview
in Quick Look on an x86-64 guest met one (DrawInput) that no log could
explain.

The switch now keeps those states' AIR and records too. It is a diagnostic,
off by default: nothing the guest or host observes changes.
2026-12-02 12:28:20 -08:00
Anees Iqbal ea27c4943e 🐛 Make a heap's texture buffer over the heap's bytes
A guest's texture buffer (MTLTextureTypeTextureBuffer) placed in a heap was
refused: rt makes a texture buffer only over a buffer its consumer places, and
the platform passed the heap's to rt's heap-texture calls, which refuse it
(Refusal::TextureBufferNotOverBuffer). A usdz preview in Quick Look on an
x86-64 macOS 26.7.2 guest showed it six times: the size query was refused,
the bundle laid the texture out by its own bound, and the posted
TEXTURE_CREATE stood refused, so the guest's texture named nothing on the
host and what bound it bound nothing.

What the guest gets now:
- heapTextureSizeAndAlignWithDescriptor: of a texture buffer answers the
  bytes of its row of texels rounded up to the format's texture-buffer
  alignment (minimumTextureBufferAlignmentForPixelFormat:), at a heap
  buffer's alignment of 256 or that alignment, the larger; one of no texels
  stays Metal's refusal.
- MTLHeap newTextureWithDescriptor:offset: of a texture buffer makes it as
  the device's is composed: rt's texture over a buffer of the heap's bytes at
  the offset (rt's new_heap_buffer), answering the heap's modes and tracked
  as the heap. Its texels are the heap's bytes there, in a Private or a
  Shared heap, as a texture buffer's are its buffer's. Bytes past the heap's
  end stay Metal's refusal.
2026-12-02 12:28:20 -08:00