Commit Graph
87 Commits
Author SHA1 Message Date
Anees Iqbal e33c569c9c 🐛 Answer the device's own compiler target, never nil
What the guest sees changes: the device answers targetDeviceArchitecture
(MTLDeviceSPI) with an MTLTargetDeviceArchitecture, Metal's own class, of
cpuType 0x01005247, subType 0, version 1.0.0 and driverVersion 0x10000. It
answered nil, the IOGPU base's answer.

Metal's loader ends the process at nil (+[MTLLoader sliceIDForDevice:
legacyDriverVersion:airntDriverVersion:]), and MTLAssetUpgraderD, which asks
Metal's archive reader about every .metallib of an app it is told of for
every device, ended with SIGABRT at each app installed in the guest: 1-2
reports in every walk since pin 70, on Iris and the 3090.

Every Mac answers an object (oracle_archtype: AMD 5300M, Intel UHD 630, M3
Max, dgpu-oracle.md Q42), so nil is outside the envelope. The values name
each GPU's own compiler target, so the device names its own: CPU_ARCH_ABI64
with its PCI device id, which no Metal slice carries, so no archive holds a
slice Metal reads as this device's; one target whatever the host GPU; and
one version for both version fields, as the M3 Max and the Intel 630 answer.
Where the guest's Metal lacks the class or its setters, nil as before.

inherited_tests now checks the answer, and the register's line says why it
changed.
2026-11-14 13:39:38 -08:00
Anees Iqbal 8e97a01eeb 🐛 Drop untouched resolves into textures over a surface's planes
A 4-sample BGRA8Unorm or BGRA8Unorm_sRGB attachment's MultisampleResolve or
StoreAndMultisampleResolve into an RGBA16Float, BGR10_XR or BGR10_XR_sRGB
texture the guest made over an IOSurface ended the process at the pass's
making, named "not measured". The device makes such a texture over the
buffer that stands for the surface (new_texture_over_surface_plane), and
the drop of that resolve was measured only for textures of their own memory,
shareable ones and textures over an OS IOSurface.

oracle_surfresolve measured the rest (dgpu-oracle.md Q41). The M3 Max leaves
the texture untouched over a surface without planes and over planes 0 and 1
of a 420v surface, Shared, Managed and Private, as it does a texture of its
own (m3-max-29682, m3-max-29690). The 5300M and the UHD 630 write
RGBA16Float in every shape and make no XR texture (m3-max-29683, 29684,
29691, 29692). The GPUs differ, and the drop is the M3 Max's answer, which
costs nothing, as the runtime resolves into no other format.

So a texture over a surface's plane now tells itself apart (OverSurface;
Over::Surface and Over::Plane), and the drop takes it in any storage mode,
which the device picks (Private over a device cache), not the guest. A
dropped resolve no longer counts as a store into read-only memory: such a
pass completes with the memory unchanged, as the M3 Max completes it (Q38).

For the guest: such a pass now completes, the texture keeping its texels and
the samples kept as by DontCare or Store, where the process ended. A texture
over a buffer that stands for no surface still dies, named. The Metal
comparison test gets its IOSurface shapes back over stand-ins, and two new
tests hold the drop over surfaces and over read-only memory.
2026-11-14 10:04:24 -08:00
Anees Iqbal a2e110a8db 📝 Record what Metal stores through an argument buffer in Q40 [ci skip]
On the M3 Max a kernel's write through an argument buffer of 500, 503, 507, 523
and 527 stores the same bytes into both planes as the write through a slot: the
4:4:4 formats their codes, 500 nothing. metal2vulkan asked for it before taking
the slot answers for the writes it refuses through an argument buffer; the
platform's own refusal stays as it is until the runtime stores them.
2026-11-14 09:23:30 -08:00
Anees Iqbal 694f2178f3 🐛 Complete a depth resolve into read-only memory as Metal's GPU does
A depth attachment's StoreAndMultisampleResolve into a resolve texture over a
guest's read-only memory (bit 24, or pages mapped read-only) ended the process
where the pass was made, or at the late store action or resolve texture, as the
runtime faulted it where the M3 Max completes it with the texture unchanged.
The runtime now stores the attachment and drops the resolve (metal2vulkan
RUNTIME 2298, in this pin), so the pass is sent and the command buffer
completes with the pages unchanged, for the descriptor's action and a late one,
into the descriptor's resolve texture or one the setter's SPI named. That is the
M3 Max's answer, given to every guest; the x86 Macs write the texture.

Beside a stencil attachment that resolves, or whose store action is still
Unknown, the runtime faults the pass, and nothing measured Metal's GPU there, so
that pairing still dies at the same three sites. A late resolve texture over
such memory for an attachment the pass lacks still dies too: RUNTIME 2298 does
not reach it. The tests that held the death now assert completion with the
pages zeros, and the pairing's death at each site.
2026-11-14 09:23:11 -08:00
Anees Iqbal 51fae61024 📝 Record Q39's two-way failures and Q40's twin writes [ci skip]
Q39 gives what the M3 Max, the AMD 5300M and the Intel UHD 630 answer for a
command buffer that protection options fail, alone and beside a store into
read-only memory, with the job ids and OS builds, and what the platform now
answers. Q40 gives the bytes Metal stores through 523 and 527 on the M3 Max,
which the x86 Macs do not make, and where the runtime refuses those writes.
2026-11-14 09:15:10 -08:00
Anees Iqbal 788561ff8f 📝 Record Metal's order of waits against handlers that block [ci skip]
oracle_waits on the 5300M, the 630 and the M3 Max: a queue's statuses,
handlers and waits run in one order on its completion queue. A status changes
before its stage's handlers, waits return only after them, and a handler that
blocks holds everything of its queue after it. Our delivery keeps that order.
The probe now counts a status its polling thread never read apart.
2026-11-14 07:50:59 -08:00
Anees Iqbal 3ba94c6eb5 📝 Record what each write into read-only memory answers [ci skip]
dgpu-oracle.md Q38 records oracle_readonly's runs on the M3 Max (macOS
27.0.1) and the dGPU oracle's Radeon Pro 5300M and UHD Graphics 630 (macOS
26.7.1), each shape with its class: agreed, divergent or outside the
envelope, and the x86 finding that bit 24 does nothing there. The accuracy
ledger's read-only-pages-written row, the writes module's docs, the command
module's note on read-only store faults and design.md's no-copy buffers say
what the platform now answers: a store-out faults as the M3 Max's does, every
other GPU write completes with its write dropped, a CPU write lands where the
pages are writable, and a depth StoreAndMultisampleResolve into such memory
still ends the process until metal2vulkan completes it.
2026-11-14 07:25:13 -08:00
Anees Iqbal 9e942f2447 🐛 Refuse overlaps of half constants and function tables at newFunction
What changes for the guest: newFunction now answers nil with
MTLLibraryErrorDomain 3 (CompileFailure) and Metal's own lines ("error:
buffer argument b has invalid location (<0,1>) in k\n"), by any way of
making the function, where function constant values put two present
arguments of one argument table at overlapping locations through
(a) a predicate or an index computed from a half constant,
(b) an index computed through a conversion between a float and an integer,
(c) a function table (visible or intersection) or an acceleration
    structure (primitive or instance) at a buffer's location.
Before, newFunction made the function in those three cases and the
pipeline's create refused it later on the host (OverlappingArgument). Metal
refuses at newFunction (oracle Q33), and the bundle already did so for
every other case its AIR reader decides.

Why the bundle missed them: the initialisers' evaluator folded no half
constant's value; the compiler writes a float-integer conversion as a call
(air.convert.u.i32.f.f16 and the like), which it took as any value; and the
reader did not count a function table's or an acceleration structure's
location, whose table and word were not measured.

Q33's probe, oracle_overlap, gains eight functions (k_halfpred, k_halfidx,
k_fidx, k_sidx, k_vft, k_ift, k_pas, k_ias), measured on the 5300M, the 630
and the M3 Max (m3-max-28663, 28662, 28659). The three oracles agree on
every newFunction answer: function tables and acceleration structures take
locations of the buffers' table, with the word `buffer`; a half constant's
predicate and index, and an index through conversions truncated toward
zero (-1.5 gives -1), count as any other. One pipeline differs: the 630
refuses k_vft's compute pipeline where the table is called, its compiler
service dying (CompilerError 1, XPC_ERROR_CONNECTION_INTERRUPTED), while
the 5300M and the M3 make it. Making it stays inside what the x86 Macs
answer, so nothing here follows the 630 there; Q33 records it.

For the overlap check alone (rgfxAirConstantGlobals) the evaluator now
folds a half constant's value, rounds each half result to the nearest half
as LLVM folds a half, and folds air.convert of scalars between floats and
integers (a float to an integer only where the truncated value is in the
integer's range); the bodies' specialisation (reflection's used arguments)
still takes those as any value. The reader counts a function table's or an
acceleration structure's location in the buffers' table, and the check
names it `buffer`. test_overlapping_arguments_refused_as_metal compares
the eight new functions with this Mac's Metal for every value and way, and
checks the x86 Macs' words.

Still left to the host, written in Q33: an initialiser operation the
evaluator does not fold (vector or array elements, conversions of two
integers or of vectors, other calls), an air.buffer with no address space
(no form built writes one), and a function of a library Metal's link made,
which keeps no bytes.
2026-11-14 01:59:32 -08:00
Anees Iqbal 493f91acd9 📝 Tag Q37's answers by class, with the arm64 guest's [ci skip]
The order of encoders' writes is all three Macs' answer (class 3), the bytes
past a plane's texels the Macs' divergent one (class 2). An arm64 macOS 27.0.1
guest on the M3 now answers the eight aliasing cases as the M3 does natively
(a64walk oracles step, m3-max-27485; before, m3-max-27484, the wide texture
was refused).
2026-11-13 17:49:41 -08:00
Anees Iqbal 7809cef902 📝 Record what aliased surface textures see in one command buffer [ci skip]
dgpu-oracle Q37 records oracle_surftex's aliasing cases on the three Macs: a
write through one texture over a plane reaches the next encoder's read through
another, tracked or behind a fence, on all three; the bytes past the plane's
texels are the surface's own on the M3 and the GPU's own on the x86 Macs. It
says which answer each wide home gives. Decided 14 in the device's design and
the oracle tools' list name the wide home and its copies.
2026-11-13 17:49:41 -08:00
Anees Iqbal b7572e8312 📝 Record which usage bits a texture answers and ends the process at [ci skip]
Q36 holds oracle_surftex's sixth and seventh rounds on the M3 Max, the AMD
5300M and the Intel UHD 630: the atomic bit and 0x8 left out of every
texture's answer, the formats the atomic bit takes, and the usage bits
Metal's validation ends the process at.
2026-11-13 16:44:56 -08:00
Anees Iqbal e617b1a999 🐛 Keep no-copy buffers and function tables NonVolatile
Metal's no-copy buffers answer NonVolatile to every purgeable state they are
told, on the M3 Max, the AMD Radeon Pro 5300M and the Intel UHD 630 alike
(oracle_bundle purgeable.kinds), as views, textures over buffers and heaps'
resources already do here: the host backs none of them with a purgeable
allocation of its own. The bundle's no-copy buffers kept the state told.

A visible function table answers NonVolatile on the M3 Max and the Intel 630,
where the AMD 5300M keeps the state told; the bundle answered the AMD's (2,
then 3 when asked). It now answers the M3's and the Intel's on every guest.

What the guest sees: setPurgeableState: on a no-copy buffer or a visible
function table answers NonVolatile, whatever was set before, and isPurgeable
answers NO. Every other resource keeps the state told, as before. The oracle
doc records the measurement (Q35), and both guest sets are rebuilt.
2026-11-13 14:24:45 -08:00
Anees Iqbal 75629b2f32 📝 Record what Metal's base answers under the M3 Max's profile [ci skip]
The arm64 guest's device answers the x86 Macs' feature profile, 10002,
where the M3 Max answers 10. oracle_profile measured what Metal's base
device answers under each: under 10 it answers 123 members the device
leaves to it as an Apple GPU's, memoryless targets, tile memory, sparse
textures, Metal 4 queues and mesh commands in indirect command buffers
among them, which the host's GPU lacks. So the profile, and the tiled
texture SPI WindowServer asks under 10002, stay as they are until the
device answers those members itself.
2026-11-13 13:05:57 -08:00
Anees Iqbal 674370fdc2 📝 Record the M3 Max's answers to the rest of the x86 rules [ci skip]
Q34 gains the answers arm64rules2 measured on the M3 Max under macOS 27.0.1:
the depth/stencil queries, ids and words the arm64 guest now takes, and
those the M3 gives as the x86 Macs do (a state's resourceIndex and
uniqueIdentifier, dynamic library refusals, a dylib's exported function,
texture addresses, the indirect command read-back), so they stay as they
are.
2026-11-13 13:02:55 -08:00
Anees Iqbal e5bcaf123d 📝 Record an Apple GPU's answers where x86 rules differ [ci skip]
dgpu-oracle.md gets Q34: what the M3 Max under macOS 27.0.1 answers, with no
validation layer, where the bundle took the x86 Macs' rules for an arm64 guest,
measured on 11-13 by oracle_surftex's fourth and fifth rounds and
oracle_bundle's new cases, its argbuf.ds.* and oracle_mesh's icb (m3-max-26136,
26149, 26152, 26237, 26239): textures over a surface, views, Shared heaps,
linear alignments, depth textures over a buffer, depth/stencil states in
argument buffers, mesh indirect command buffers, option bits 17 to 19, the
IOSurface buffer and tiled texture SPI, and the register's x86
respondsToSelector verdicts the M3 answers otherwise (50 of 67). Each row says
what an arm64 guest's device now answers. Q9 and Q20 point there; the probes'
README names the new cases, and the device's comment on rgfxAppleRules names the
rules it now covers.
2026-11-13 12:10:36 -08:00
Anees Iqbal c178927136 🐎 Check argument overlaps without following the entry's body
Batch 41's overlap check (1fc43b257) runs at every newFunction with constant
values whose arguments may overlap. It ran rgfxAirSpecialise, which runs the
module's initialisers and then follows the entry point's body twice, with the
values and blind. The check reads only the initialisers' globals: each
argument's predicate, index and count. The body passes were 99.5% of its cost.
For VideoToolbox's VTMTSComputeFunction, which its pixel transfers make for
every tile of a HEIC decode, a specialisation took 35.6 ms against 0.19 ms for
the initialisers alone (measured on the M3 Max, macOS 27). The guests' heic
step slowed from 6-7 ms a tile to 52-104 ms on every GPU.

rgfxAirConstantGlobals runs the initialisers alone, through the same
Specialiser and the same reading of its memory that rgfxAirSpecialise uses for
its globals. RgfxOverlappingArgumentError takes its globals from it. The
answers are unchanged, and test_overlapping_arguments_refused_as_metal still
compares each against Metal's. A new shell test counts the bodies followed over
sixteen makes each of a function that is made and one that is refused, with the
same values: none.
2026-11-13 11:19:22 -08:00
Anees Iqbal 170976bcae 🆕 Measure where Metal refuses arguments at one location
oracle_overlap makes functions whose arguments of one argument table take
overlapping locations under function constants, by every way of making a
specialised function, and prints each answer and error. The AMD 5300M and the
Intel 630 on macOS 26.7.1 and the M3 Max on macOS 27.0.1 answer the same: Metal
refuses such values where it makes the function, with one line per argument
that overlaps an earlier present one. The guest's bundle accepted them, so the
host refused the pipeline later instead. Q33 records the answers. [ci skip]
2026-11-13 08:43:21 -08:00
Anees Iqbal b592e96aa0 📝 Record what our two-copy guests answer to the capture probe [ci skip]
Q2 recorded which CPU bytes the 5300M's and the 630's GPU copies take of a
Managed buffer written again after its didModifyRange:. The same probe in
an x86-64 macOS 26.7.2 guest gives the 5300M's answers on the RX 7900 XTX
at metal2vulkan 38ab829481 (m3-max-22650), and on the RX 550 at 86d01646ae
(m3-max-22791) for the four steps the RX 550 ran: its fourth step's 2 s
spin ended in the driver's soft recovery, and the fifth step's command
buffer was discarded as its victim.
2026-11-12 14:35:55 -08:00
Anees Iqbal 349d509475 📝 Record when an x86 Mac takes a Managed buffer's CPU bytes [ci skip]
Q2 said a didModifyRange: before the commit reaches a command buffer encoded
before it; it did not say which CPU bytes the GPU's copy takes. oracle_storage
capture (m3-max-22553 on the Radeon Pro 5300M, 22554 on the UHD 630) writes
the buffer again after its didModifyRange:, before the commit or 30 ms after
it while the command buffer's first kernel holds the GPU. The 5300M's kernel
reads the bytes of the commit, whether the command buffer was encoded before
the second write or after it; the 630, one copy, reads the latest.
2026-11-12 13:43:49 -08:00
Anees Iqbal d96a612b55 🐛 Check compute pipelines' threadgroup fields as Metal does
The bundle kept requiredThreadsPerThreadgroup guest-side and sent the host
none of it, so a compute pipeline whose required size is past its kernel's
[[max_total_threads_per_threadgroup(n)]] was made, where Metal's compile
refuses it. maxTotalThreadsPerThreadgroup against the kernel's attribute and
the device's limit went unchecked guest-side too, and macOS 27's
forwardProgressUsage and contentionRelief were taken whatever their value.

oracle_threads measured each case on the AMD 5300M, the Intel 630 and the
M3 Max (m3-max-22216, 22217, 22214; dgpu-oracle.md Q32). The AIR reader now
reads a kernel's attribute (air.max_work_group_size), and the bundle checks
the fields before it posts the create, in the x86 guest the AMD GPU's way
and in the arm64 guest the M3's, as its validation and compiler do.

What the guest observes: a required size with an axis of 0, past the
device's limit or past the descriptor's maximum ends the process at Metal's
failed assertion; a required size past the kernel's attribute, a descriptor
maximum other than the kernel's or past the device's limit, and a forward
progress usage or contention relief Metal does not name are refused with
the device's error, and nothing is posted; a pipeline of a required size
answers its threads as maxTotalThreadsPerThreadgroup; and forwardProgressUsage
Automatic answers Weak. The tests that held the old answers change with it.
2026-11-12 12:45:37 -08:00
Anees Iqbal 7ff8cfb02e 🐛 Reflect post-tessellation vertex functions' control points
A post-tessellation vertex function's control point input
(air.patch_control_point_input) takes two nodes the AIR reader did not
follow, its control point function's and its attributes', so the reader
gave up on the whole entry point and its pipelines got no reflection: a
creator asked for reflection answered nil where Metal answers one.

The reader now follows them, keeping each attribute of the control point,
and reads the entry's patch type (air.patch). The reflection answers what
the AMD 5300M, the Intel 630 and the M3 Max agree on, measured with
pipeline_reflection_check's patch cases (m3-max-22312, 22313, 22314): the
control points and the patch's attributes are no bindings, the vertex
descriptor's buffers are unused though the function reads them,
position_in_patch and patch_id are built-ins 14 and 13, and the dump stride
adds the patch's position, 12 bytes for a triangle and 8 for a quad, taken
or not. Two new probe functions (a triangle patch that takes no position,
and a quad that takes one it never reads) pin the last rule.

What the guest observes: those pipelines' reflection, where it got nil.
2026-11-12 12:45:37 -08:00
Anees Iqbal 640bfdce4a 📝 Record what the M3 and our arm64 guest answer for residency sets [ci skip]
Q31 records the M3 Max's residency sets as oracle_residency measured them,
what the x86 Macs answer, what the arm64 device's set answers and where it
departs from the M3 inside the envelope, why a layer's set stays nil on our
arm64 guest (QuartzCore makes one only for a device answering Apple6), and
the guest run that checks the set against the M3's answers.
2026-11-12 10:21:20 -08:00
Anees Iqbal a5c9010efc 🆕 Answer each format's own minimum linear texture alignment
The device answered minimumLinearTextureAlignmentForPixelFormat: with
linearTextureAlignmentBytes, the largest of every format's, for each format. On
a host GPU whose linear images ask more of larger texels that is too much for
the smaller ones: a Radeon RX 550 answers 256 bytes for texels of 1 to 4 bytes,
512 for 8 and 1024 for 16, and Geekbench's MPSImageGaussianBlur source, an
RGBA8Unorm texture over a buffer with rows of 7680 bytes, was nil against 1024.

What the guest observes changes:
- each format answer of the device info carries the runtime's alignment of
  that format in its last two bytes (0x3e, `linear_alignment`, which were
  zero): 0 where the runtime has none (compressed, depth and stencil formats)
  or one past 65535;
- the bundle answers minimumLinearTextureAlignmentForPixelFormat: with the
  format's own, and with linearTextureAlignmentBytes where the blob has none,
  so the video output planes align to R8/RG8/R16/RG16's own answers too;
- linearTextureAlignmentBytes and deviceLinearTextureAlignmentBytes stay the
  largest of every format's.
2026-11-12 09:19:28 -08:00
Anees Iqbal bd4006d53b 📝 Record the x86 Macs' function pointer and dylib answers [ci skip]
The lane's function pointers and dynamic libraries copy the AMD Radeon Pro
5300M's and the Intel UHD Graphics 630's answers, and the oracle notes keep
what was measured and where our stack differs. Q29 records oracle_fnptr's
function pointer answers on both Macs and in the guests; Q30 its dynamic
library answers: which install names Metal loads (a library read from a file
alone), what a preloaded library links on each, the one message a compile of
source sends a dynamic library and who owns its answer, and the refusals.
2026-11-12 08:14:32 -08:00
Anees Iqbal 2021c68def 🆕 Probe what a device's rasterization rate maps answer and draw
A probe of our own for the dGPU oracle, oracle_ratemap: the layer counts a
device supports, its maps' and descriptors' classes and members, a map's
answers and parameter data, a triangle drawn through a map and decoded in the
shader, and the calls that may end the process, each in a child process. It
runs the same on the guest's device.

What the AMD Radeon Pro 5300M answers (macOS 26.7.1) is Q28 of
docs/graphics-kext/dgpu-oracle.md: its maps are the identity whatever their
samples, 16,472 bytes of parameter data aligned to 256, layer counts 0 to 2,
and the process ends at a map of no layers' creation, at a copy into a Private
buffer and at the physical-to-screen map past the layers. Where the M3's
compile (the platform's) answers otherwise, both bound the contract; the doc
says what the lane answers of each.
2026-11-12 08:14:05 -08:00
Anees Iqbal 580927122d 📝 Record the rows IOSurface works out on the oracles
oracle_rows ran on the 5300M, the 630 and the M3 Max: a surface made with no
rows named takes IOSurface's own 64-byte rows on the Intel Mac (192 bytes for
an RGhA surface 18 texels wide), whichever GPU's process made it, though both
GPUs align a linear texture's rows to 256; the M3 takes 128. So no Mac's GPU
sets the rows, and the rows a client names (CoreAnimation's, CoreVideo's)
stay its own. Q27 records the numbers; build.sh builds the probe and the
README lists it.
2026-11-12 07:56:02 -08:00
Anees Iqbal d22ca5ea27 🆕 Answer the host GPU's own linear texture alignment
The guest's device answered 256 bytes for
minimumLinearTextureAlignmentForPixelFormat: and the SPI
linearTextureAlignmentBytes and deviceLinearTextureAlignmentBytes on every
host, the Radeon Pro 5300M's and the UHD 630's answer, raising the
platform's wherever it was less. The answer describes the GPU: each Mac
answers its own (the M3 Max 16), and the runtime now answers the alignment
at which the host GPU's linear images hold a texture's reads, renders and
shader writes in place, at least the device's nonCoherentAtomSize, asking
the driver. The floor dates from when the platform answered Metal's 16 on
every host, and was chosen for RADV, which takes rows only at multiples of
256. The runtime answers that 256 on RADV itself now. NVIDIA's driver takes
a linear image in place only at its own pitch, the tight row rounded up to
128, so rows a guest lays out at 256 are the runtime's shadow wherever that
pitch is not a multiple of 256.

What the guest sees: its device answers the platform's alignment, the
largest of the formats a buffer backs: 128 on NVIDIA's driver, 64 on ANV
and 16 on MoltenVK, where it answered 256; 64 on lavapipe; and 256 on RADV
as before. Its frameworks lay out their linear textures' rows by it, and
its device makes a texture over a buffer at any offset and rows that are
multiples of it, where it answered nil to those off 256.

No guest reason held the floor: no doc comment or test named a framework
that relies on 256 (docs/architecture.md 17.2), and the oracle doc called
it a choice inside the envelope for the host's cost. Its test, renamed,
now holds the platform's 16 and 128.
2026-11-12 05:04:34 -08:00
Anees Iqbal ff69cbb3a2 📝 Cite the oracle_complete runs behind Q26 [ci skip]
Q26's numbers came from the same probe under the lane's harness name; the
runs of guest/bundle/tools/oracle/oracle_complete.m itself (m3-max-17599 to
17601) agree on every answer, and their times replace the earlier ones.
2026-11-11 15:20:18 -08:00
Anees Iqbal 3ccb00e7c7 🐛 Wait for a resource's command buffers in flight, as the 630 does
The resource SPI's isComplete and isWriteComplete answered YES, and its
waitUntilComplete returned at once, as an M3 probe measured right after a
commit. Apple's GL renderer on macOS 11.7.11 reads a drawable back with the
texture's waitUntilComplete after commitAndWaitUntilSubmitted, then a
synchronizeTexture: on a queue of its own and getBytes:. On a unified-memory
host that synchronize has nothing to copy and finished before the draw, so
about 2.5% of Safari's WebGL readPixels on a 780M returned the canvas as it
was before the draw.

What the guest sees now: once a command buffer that names a resource, or a
view of its memory, is submitted (commitAndWaitUntilSubmitted returned, or it
is scheduled), the resource answers isComplete and isWriteComplete NO and its
waitUntilComplete waits, until the bundle takes the buffer's completion and
has written back its copies; for any use. That is the Intel 630's answer once
the buffer is scheduled (macOS 26.7.1, oracle_complete, dgpu-oracle.md Q26).
The M3 answers the same, except isWriteComplete YES for a read-only use,
which arm64 guests do not get: it only adds waiting for readers, and the
register lists it as a gap. Before submission, and for a resource no buffer in
flight names, the answers stay YES at once, as all three Macs answer. The wait
ends at the completion's take, not behind an earlier buffer's handlers, as the
630's returns with the buffer still Scheduled; where no thread takes the
completions any more, waits end. A debug line counts the waits and the NO
answers.

The tests that held the old answers keep them for a resource no buffer in
flight names; test_resources_wait_for_their_buffers_in_flight holds the new
ones, with the draw's buffer unretained as the GL renderer's is, and
resource_tests holds a view's and a buffer texture's shared count.
2026-11-11 15:20:18 -08:00
Anees Iqbal fedd9e8410 🐛 Make no-copy Managed buffers over app pages Managed on the host
A no-copy Managed buffer over writable app pages was one copy on every host:
the bundle sent its BUFFER_OVER_PAGES with Shared storage, and its
didModifyRange: and a blit's synchronize of it, or of a texture over it, sent
nothing (e828db91b). Apple's OpenCL makes each default cl_mem such a buffer and
binds it to every kernel, so on a host GPU with memory of its own the kernels
read and wrote it across the bus in system memory. CL makes the calls Metal
requires of a Managed buffer: synchronizeResource: before a map, and
didModifyRange: after a map for writing (measured with cl_bw on a macOS 26.6.1
guest on the RTX 5080 host).

The buffer is now a Managed buffer over a Shared one, as the pages slabs'
large Managed buffers are: the BUFFER_OVER_PAGES buffer, still Shared, is its
CPU copy, and a MANAGED_BUFFER_CREATE over it, at an address of its own that
keeps the pointer's offset in its page, is the buffer the app gets. At its
release the Managed buffer goes first, then its CPU copy, then the pages
block. A device that makes no Managed buffer over a Shared one gives such
memory the shadow, as read-only memory has.

What the guest sees: the host's object for the buffer has storageMode Managed,
and the buffer's didModifyRange:, a replaceRegion: of a texture over it, and a
blit's synchronizeResource: or synchronizeTexture: of it or of such a texture
now reach the host. On a host GPU of its own memory the buffer is two copies,
as the AMD 5300M's is: the GPU sees a CPU write only after a didModifyRange:,
and the CPU a GPU write only after a synchronize. On a GPU that shares the
CPU's memory it stays one copy, as the Intel 630's is.

The shell tests that held one copy now hold the two messages, the ranges and
synchronizes sent, the release order, and the shadow where the device makes
no Managed buffer over a Shared one; the serializer tests hold the Managed
create's offset.
2026-11-11 12:20:36 -08:00
Anees Iqbal c1da5cf831 🐛 Take a tiled texture's copy again after a replaceRegion of level 0
On the x86 Macs a replaceRegion: of a mipmapped tiled texture's level 0
writes the buffer's bytes, and the texture's copy of them is taken again at
its next GPU use, every level made from the new bytes, with no didModifyData
(measured on the AMD 5300M and the Intel 630 under macOS 26.7.1, added to
docs/graphics-kext/dgpu-oracle.md Q11 with what getBytes: and replaceRegion:
of each level reach there). The bundle wrote the buffer's bytes and told only
the buffer, so the host's copy kept the old texels.

What changes for the host: a replaceRegion: of level 0 of a texture over a
buffer of more than one level now also sends TEXTURE_DID_MODIFY_DATA, where
the host carries it. getBytes: and replaceRegion: of level 0 still address the
buffer's bytes, as both x86 GPUs' do. The levels above it stay the device
copy's; both x86 GPUs keep a replaceRegion: of those from the GPU, which no
app is known to make.

The shell test of the tiled form checks the message after a replaceRegion: of
level 0, and none for a texture of one level or where the host does not
carry it.
2026-11-11 11:46:13 -08:00
Anees Iqbal d4bc329148 🆕 Carry a mipmapped tiled texture's didModifyData to the host
A 2D texture of more than one level over a buffer (Metal's
newTiledTextureWithDescriptor:offset:bytesPerRow:) holds a copy of the
buffer's bytes on the x86 Macs, every level made from them, taken at its first
GPU use, and taken again at its first use after didModifyData (measured on
the AMD 5300M and the Intel 630, docs/graphics-kext/dgpu-oracle.md Q11). The
host's platform makes that copy since metal2vulkan's Texture::did_modify_data,
but the bundle sent nothing at didModifyData, so a texture whose bytes the CPU
changed after its first use kept the old ones for good.

What changes for the guest: the device offers feature bit 36,
TEXTURE_DID_MODIFY_DATA (FEATURES_HI bit 4), on every host, and the kext takes
it. Where taken, ring 0 carries a new command, TEXTURE_DID_MODIFY_DATA (0x232,
RgfxTextureDidModifyData, 24 bytes: the header and the texture's obj_id),
which the submit gate admits. The bundle sends it for didModifyData on a
texture over a buffer of more than one level; a one-level one tells its
buffer's didModifyRange as before. The host calls Texture::did_modify_data
in the context's order, before the next command buffer it carries out, and
refuses a texture it does not hold. Not answered.

TEXTURE_FROM_BUFFER's doc now says what the tiled form holds: a copy taken at
its first use and again after the new message, not its first level in the
buffer.

New tests: the message's order against a later command buffer
(a_texture_s_modified_data_is_carried_out_before_a_later_command_buffer), the
rows and second level a tiled texture holds after it, on Vulkan
(on_vulkan_a_tiled_texture_takes_the_rows_again_after_did_modify_data), the
header's checks of the new names, and the kext's and the bundle's tests of the
feature, the gate and the message.
2026-11-11 11:46:13 -08:00
Anees Iqbal 744f81eba6 ⬆️ Build on metal2vulkan 30cadd8dda's runtime
Pin move 37: metal2vulkan ef7af82fe4..30cadd8dda (its round's go; the two
commits past 79ff44b04c re-bless its own test tables), RUNTIME_VERSION
2014 -> 2034, SEMANTICS_VERSION 2019 -> 2032 (translations are made again
once), ARTIFACT_FORMAT_VERSION 499 -> 500, the in-place check's
CHECK_VERSION 17 -> 18 and the submission check's 5 -> 6 (each device checks
again on its first run). What changes for the guest and the host:
- A texture of more than one level over a buffer (the tiled form) is a copy
  of the buffer's bytes taken at its first GPU use, every level made by
  blits, as both x86 Macs make it (dgpu-oracle Q11): macOS 26's Safari no
  longer draws minified pictures black or dark (9 of 9 pictures right on
  each of 4 loads, on um870's and gem10's 780M and 3090, at the runtime's
  e5091e4221). A blit's write of its first level stays in the texture and
  the buffer keeps its bytes, so the decoder's test of that case is renamed
  for it and asserts the oracle's answer, and Q11 and the platform's
  new_tiled_texture docs say so. The runtime's Texture::did_modify_data
  takes the copy again, for the wire message to come.
- iosurfaceTextureAlignmentBytes and iosurfaceReadOnlyTextureAlignmentBytes
  answer the device's linear row alignment (256 on RADV, GFX9 to 11), where
  Metal answers 16 on Apple's GPUs and on the x86 Macs: a layout answer is
  the host GPU's own. The guest sees them once its Metal device passes them
  on. private_properties_are_the_runtimes_where_it_answers_them holds every
  texture row alignment, the IOSurface ones now among them, to at least
  Metal's.
- On NVIDIA, a dma-buf import that backs one buffer is retried dedicated where
  the driver refuses it plain (the RTX 5080 Laptop's refuses small undedicated
  udmabuf imports), an exportable buffer takes a dedicated allocation only
  where the device needs one, and a dma-buf import tries the dma-buf's other
  memory types after its class's. Our views of guest pages on NVIDIA still map
  from their files, since its driver pins no pointer into a dma-buf's mapping
  (the Linux vm module's "Imports of views"), so a walk there retries no
  import dedicated (dma_buf_buffer_imports_dedicated 0, m3-max-16097). In a
  26.x Safari video walk on the RTX 5080 Laptop, shadow texels first copied in
  host pages fall from 132.3M at pin 36 (16132) to 102.1M, and no opaque-fd
  line is logged.
- Images' pooled blocks are 64 MiB, as every pool's (68 MiB before), and a
  host-transfer image keeps to its class's own memory types, never overflow
  ones.
- No-copy buffers on a device without VK_EXT_external_memory_host take the
  dma-buf route, and those with no dma-buf source are copies there.
- A read-only device buffer may be a constant-space pointer, so the AIR check
  no longer refuses Core Image's ciKernelMain pipelines: macOS 13.7.8's Music,
  Notes and Freeform first runs log none (m3-max-16092).
- OpenCL mode answers image format and channel queries, reads 1D images over
  2D bindings, has the native_ and half_ functions, vector loads and stores
  and vstore_half, and honours air.convert's directed roundings and .sat.
- Framebuffer fetch between draws takes its barrier on every driver, and on a
  device with neither ordered form (the runtime names Honeykrisp) reads input
  attachments ordered between draws, the overlapping fragments of one draw
  left unordered, which the runtime notes as unordered-fetch-within-draw. On
  MoltenVK, a fragment stage that writes a set-0 storage buffer in its
  interlock has set 0 pushed, the one form MoltenVK orders; where it cannot be
  pushed, the runtime announces interlocked-buffer-order. answer.rs places
  both new kinds among those that die: a fragment may read what an earlier
  overlapping fragment of its draw had not yet written, which is not Metal's
  answer. No driver we ship on announces either.
- A rerouted draw draws through its own scissor rectangles, a flat compute
  grid counts in 32 bits where the dispatch fits, a call only helper
  invocations may make before a storage write is fenced, and on ANV a
  product by a constant -0.0 keeps its sign.
- Four of the runtime's messages are said once per device and kind, later
  ones counted.

Cold boots at this runtime log no fatal line: the x86 guests 11.7.11 to 26.7.2
on a Radeon 780M and 26.7.2 on an RTX 3090 (m3-max-16090 to 16095, 16119), and
the arm64 guests 14.6.1 to 27.2.1 under HVF (16078 to 16082), which against
development's runtime (16112 to 16116) log no new degradation code and drop
helper-branch-drops-simdgroup-stores.
2026-11-11 08:23:37 -08:00
Anees Iqbal 5ccec4fc3b 📝 Record what an x86 Mac's tiled buffer texture holds [ci skip]
Both x86 oracle GPUs make a mipmapped tiled texture over a buffer as a copy
of the bytes with every level generated from level 0, taken at the first GPU
use after the make and after each didModifyData, which no later CPU write
reaches. Safari 26's CoreGraphics relies on the generated levels when it
draws a picture below its size, and the host's platform leaves them zero, so
those pictures draw black or dark. The fix is the runtime's; the record says
so, with the walks that show it.
2026-11-11 06:49:23 -08:00
Anees Iqbal cd6b7bb2bf 🐛 Answer framebuffer read to an arm64 guest as its host GPU can
arm64 guests drew WindowServer's menu bar, and some widgets, 100% black.
CoreAnimation compiles framebuffer fetch into its generic shader by
isFramebufferReadSupported, and that shader blends against the fetched
destination whatever the answer. The device answered no to every guest,
so the destination was the AIR's NaN. Metal on the M3 Max writes the same
NaN for that pipeline and its buffers, so the translation was right; the
answer was not one an Apple silicon Mac gives.

The x86 Macs split on it (AMD 5300M no, Intel UHD 630 yes, measured again
today), and x86 guests keep the AMD answer, which keeps their frameworks
off the platform's costly fetch. So the answer now follows the guest:

- The C API's RvgGraphicsDeviceConfig gains guest_arch (RvgGuestArch:
  RVG_GUEST_ARCH_X86_64 0, RVG_GUEST_ARCH_ARM64 1), its second version: a
  host built before it, whose struct_size ends before the field, serves an
  x86-64 guest; any other value is RVG_ERR_INVALID_ARGUMENT. The Rust API's
  GraphicsConfig gains GuestArch alike.
- The device-info blob answers isFramebufferReadSupported with the
  platform's answer for an arm64 guest (yes on MoltenVK, RADV, ANV and
  NVIDIA, which fetch through the pixel interlock), and no for an x86-64
  guest as before.

What the guest sees: an arm64 guest's MTLDevice answers
isFramebufferReadSupported yes where the host GPU fetches, once the host
names the guest arm64 (QEMU, next commit). An x86-64 guest's blob is byte
for byte what it was. On ANV and NVIDIA a pipeline that fetches an
attachment of a format the runtime does not fetch there (R8/RG8 sRGB, and
on NVIDIA the packed 16-bit formats and RGB9E5) is answered nil, relayed.
2026-11-09 18:15:57 -08:00
Anees Iqbal a544e8dad5 🐛 Validate textures by an Apple GPU's rules on an Apple GPU
On 27.0.1 WindowServer died 17.7 s in, in our descriptor validation, at
CoreAnimation's create_surface_with_properties. The bundle checked every
texture descriptor by the x86 Macs' rules, while in an arm64 guest the
device answers an Apple family, and CoreAnimation asks such a device for
what an Apple GPU makes: an XR10 format where it answers
supportsExtendedXR10Formats (read from 27.0.1's QuartzCore), and
Memoryless textures. The x86 Macs lack both.

oracle_texdesc on the M3 Max under 27.0.1, at the device's, a heap's and a
buffer's creators, measured the Apple GPU's rules: the same words and
order, but it has every format the x86 Macs lack except Invalid, D24S8
and X24S8; answers nil for two-plane formats and Unspecialized; makes
multisample BGR5A1 and RGB9E5, depth and multisample textures in Shared
and Managed storage, and Memoryless ones, in a Private heap too; makes 2
and 4 samples but not 8; and over a buffer answers nil for every
compressed format. Where the device answers Apple7 (rgfxAppleGPU) the
bundle now takes those rules; elsewhere they stay the x86 Macs'. The
test runs every descriptor case under an Apple GPU against the M3's
answers, and the doc records them (Q24).

A validation death also writes Metal's words and the descriptor to the
unified log: WindowServer's stderr is kept nowhere, so the boot showed
only that the validation ended it.
2026-11-09 09:41:26 -08:00
Anees Iqbal a5988ff35e ✨ Answer the x86 Macs' feature profile, 10002, from macOS 13 on
What changes for the guest: the device's featureProfile is 10002 where it was
the host's, 10 on every host so far, wherever the guest's Metal has the
MTLArchitecture class (macOS 13 and later), on every host. Where it lacks the
class (macOS 11 and 12) the device still answers 10001. Both x86 Macs of the
oracle answer 10002 under macOS 26.7.1 (the Radeon Pro 5300M and the UHD 630),
and the guest's Metal keys its limits, families and feature queries on the
profile. 10 was the M3 Max's, kept only because macOS 26's WindowServer, under
10002, asks for tiled textures of 6 and 7 levels over a buffer, which the
device answered nil; the host makes those now (the two commits before), and
26.7.2 composes its desktop under 10002 with them.

The answer is made in one place, RgfxFeatureProfile.hpp, which no longer takes
the host's profile: the bundle stops reading it from the device info, whose
field the host still fills with its Metal device's or the M3 Max's.

The profile's unit test, which held the host's answer from macOS 13 on, holds
10002 there and 10001 below; the guest's kext set is built again with it.
2026-11-08 03:29:59 -08:00
Anees Iqbal 50982ff795 🆕 Make the bundle's tiled textures of more than one level
WindowServer on macOS 26 asks newTiledTextureWithDescriptor:offset:
bytesPerRow: for textures of 6 and 7 levels over a buffer under the x86 Macs'
feature profile. The AMD and the Intel GPU make them, level 0 over the
buffer's bytes; the bundle answered nil, logged once, as the host made only
one level. The host makes them now, so the bundle sends the descriptor's
levels in TEXTURE_FROM_BUFFER and answers the texture, logging the first of
each process with its levels, size, format, offset and pitch.

A CPU copy of such a texture's level 0 still goes through the buffer's bytes;
one of a level past 0, which only these textures have, goes through a blit,
as any texture's of the device's own memory, where it was refused before.

The public form keeps ending the process at more than one level, as Metal
does on all three Macs. The shell test that held the nil now holds the
message's levels and level 0's bytes. The oracle doc's Q11 says what the
stack does. The prebuilt set is rebuilt with make -C guest prebuilt (KDK
25G241): RgfxGate carries the new bundle.
2026-11-08 03:29:02 -08:00
Anees Iqbal d507d7f650 🐛 Answer a feature profile macOS 12's Metal has limits for
macOS 12's Metal keys every limit of a device on its feature profile and has
none for the M3 Max's 10, which the device answered on every guest: it left
the limits 0 and ended WindowServer at device creation, so 12.x guests never
reached a desktop (launchd gave up after 14 runs).

The device now answers the host's profile only where the guest's Metal knows
it, told by what that Metal has: the MTLArchitecture class, which macOS 13
and later have (13.7.8, 14.8.9 and 26.7.2 boot with 10). Elsewhere (macOS 11
and 12) it answers 10001, as 12's drivers for the 5300M and the UHD 630 do.
26 keeps 10 rather than the x86 Macs' 10002: under 10002 its WindowServer
still asks for a mipmapped tiled texture over a buffer, which the device
refuses (dgpu-oracle.md, Q11, rechecked).

What changes for the guest: featureProfile on macOS 11 and 12 is 10001; on
13 to 26 it is unchanged.
2026-11-08 01:57:20 -08:00
Anees Iqbal acd9919a93 📝 Say the library runs on the Vulkan platform alone [ci skip]
The Metal platform is gone (the commit before): AGENTS.md, README.md and the
docs now say the library carries out the guest's calls on the Vulkan
platform, on Linux and on a Mac over MoltenVK for development and tests;
that the display's shaders live in the Vulkan crate; that `cargo xtask
dist` writes target/dist-vulkan on every OS; and that the tests of the
Vulkan platform compare with Metal's recorded answers. architecture.md's
section 4.6 describes the answer layer and the macOS message layer in
place of the metal crate's. conventions.md keeps "core changes as little as
the Vulkan and Linux work allows" without its reason, the Metal product.
2026-11-07 23:22:28 -08:00
Anees Iqbal 4e1f847978 🐛 Answer nil for a device texture of more bytes than maxBufferLength
The device's newTextureWithDescriptor: sent every texture its validation
passed to the host, posted, and answered a texture, however many bytes it took.
Metal answers nil for one too large to make: the Intel 630 past its
maxBufferLength, the AMD 5300M past 16 GiB (the previous commit's
measurement). A texture whose create the host's platform refused for its size
was then one the app held, and the draws of every command buffer naming it
were dropped (refused.rs), where Metal's app would have seen nil and taken
another path.

What the guest sees: the device's creator answers nil, sending nothing, for a
texture whose bytes, every level of every slice and sample in its format's
blocks (its allocatedSize), are more than the device's maxBufferLength, as the
Intel does and as the bundle answers a buffer and a heap past it. It is inside
both x86 GPUs' answers, and keeps a texture within three quarters of the host
GPU's working set, which our maxBufferLength is. A heap's, a buffer's and an
IOSurface's creators place a texture in memory of their own size, and are
unchanged. test_textures_past_max_buffer_length_are_nil expects it.

guest/prebuilt is rebuilt from the tree (make -C guest prebuilt, the macOS
26.7.1 KDK): RgfxGate, which carries the bundle, and the record.
2026-11-07 11:07:32 -08:00
Anees Iqbal 8b59610c48 ✅ Measure where Metal answers nil for a large texture
The bundle sends a texture create to the host posted and answers a texture
whatever the host's platform then does with it, so a texture Metal answers nil
for by its descriptor alone has to be answered nil in the bundle. The
descriptor's rules were copied on 11-05 (Q24); what Metal answers for a texture
too large to make had not been measured.

oracle_texdesc's 13 new cases are RGBA32Float textures within every rule, of
2 GiB to 8 TiB, at the device's creator; each prints the size
heapTextureSizeAndAlignWithDescriptor: answers, and a made one its
allocatedSize and the process's footprint. On macOS 26.7.1 the Intel 630 makes
2 GiB, its maxBufferLength, and answers nil a row taller; the AMD 5300M makes
16 GiB and answers nil from 20 GiB, its maxBufferLength 3.2 GB. A texture that
is made commits no memory. The M3 Max answers nil for the 128 GiB and 8 TiB
ones. dgpu-oracle.md, Q24, records the table.
2026-11-07 11:07:32 -08:00
Anees Iqbal 1c77a6d25a ✅ Measure a long command buffer's GPU times on x86 Macs
A command buffer the host commits in parts answers GPU times from its first
part's start to its last part's end, which hold the host's walk between parts:
game_6000's gpu_p50 went from under 1 ms to 5.4-8.5 ms with car 12's split.
What a Mac answers for one long buffer had not been measured.

oracle_cmdbuf's new gputimes case commits K encoders of about 0.5 ms each (K
= 1, 8, 32; compute and render passes) in one buffer, and the same encoders
one buffer each, back to back. On both x86 Macs (macOS 26.7.1, the AMD Radeon
Pro 5300M and the Intel UHD Graphics 630) one buffer spans its encoders' GPU
time summed, as the back-to-back buffers do, within the GPUs' clock ramp; the
CPU's encoding time never counts; GPUStartTime comes 0.08 to 0.40 ms after
the commit. dgpu-oracle.md, Q7, records the table.
2026-11-07 11:01:27 -08:00
Anees Iqbal 450661e889 🐛 Answer nil for a texture buffer past its buffer's bytes
Both x86 Macs make a texture buffer by the public form even when its texels
lie past the buffer's bytes (measured: macOS 26.7.1, 4 RGBA32Float texels at
offset 4064 of a 4096-byte buffer). metal2vulkan refuses such a texture
(TexelsPastLength), and the Vulkan host ends its process at a refusal by this
creator. So the bundle answers nil, logged once, and sends nothing, as it does
for the other textures over a buffer the host does not carry.
2026-11-07 09:11:16 -08:00
Anees Iqbal 55bbbd0f82 🆕 Make texture buffers over a buffer by the public form
A buffer's newTextureWithDescriptor:offset:bytesPerRow: answered nil for a
texture buffer, logged as a type the host does not carry. The GL renderer
makes each GL texture buffer this way: gl_cases' texbuffer case got nil, and
the renderer drew it in software (RTX 5080 host, m3-max-3947).

Both x86 Macs make one by this form (measured: macOS 26.7.1, RGBA32Float and
RGBA8Unorm):
- over a Shared or a Managed buffer, at any offset (0, 4, 16, 64, 100, 256);
- with rows of at least its texels' bytes (64 and 4096);
- and their kernels read the buffer's bytes from the offset.

The host's platform makes one by the same form, at any offset, so the create
now goes to the host as TEXTURE_FROM_BUFFER with its type. For rows of 0 bytes
both Macs end the process with the same words, and the bundle does too. For
fewer bytes than the texels need, the AMD answers nil where the Intel ends
the process; the bundle answers nil, as the AMD does.
2026-11-07 09:11:16 -08:00
Anees Iqbal 892a0eefb0 🐛 Make BC textures over a surface where they answered nil
Since c13-contract (ae37ce1c2) the bundle answered nil for a BC1 to BC7
texture over an IOSurface or one of its planes, before it took a view of the
surface. Metal on the x86 Macs makes these wherever the rows fit, over a
surface with planes or without, in Managed or Private storage
(oracle_surftex, Q20). The nil was the host's limit: pin 14's runtime made
no texture of one over a surface's rows (NotLinear). metal2vulkan's stack
34, at this branch's pin, makes them in the x86 Macs' form, row j of blocks
at the plane's row j (on MoltenVK as a shadow image), and the bundle's own
CPU access takes the same rows since 187d1ee33. Runtime gaps are
metal2vulkan's, and ours go at the pin that fixes them.

What changes for the guest: newTextureWithDescriptor:iosurface:plane: of a
BC format answers a texture and posts its create, where it answered nil and
logged "no texture (descriptor)". The shapes stack 34 still refuses (a BC
texture over a plane at an offset or rows off 16 bytes, or wider than the
plane's rows) are posted and refused as the host's other refused shapes are
(decode/refused.rs). On the Metal platform, whose buffer creator answers nil
for BC as Metal's IOSurface creator does (87b24e27e), the texture is a
refused create too.

Test: test_iosurface_block_compressed_textures_are_made fails at the base,
where the bundle answers nil.
2026-11-05 21:59:37 -08:00
Anees Iqbal 9beab79d22 📝 Number texture-nil's oracle sections Q24 and Q25 after shared events
c14-shared-events and c14-texture-nil each added a Q23 to dgpu-oracle.md. The
car keeps shared events' Q23 and numbers texture-nil's two sections after it:
the texture descriptors each creator refuses are Q24, and what a command buffer
does with nil objects is Q25. The references in dgpu-oracle.md, design.md, the
decoder's refused.rs and the shell tests follow, and the report's probe list
names oracle_events, which shared events added to the oracle's README and
build.sh.
2026-11-05 21:59:37 -08:00
Anees Iqbal 9e226f2f98 📝 Record what a command buffer does with nil objects [ci skip]
oracle_nilbind measured what the AMD 5300M and the Intel 630 do with nil where a
command buffer names an object: Q25 records it and what the decoder now does with
a refused one. Q24 adds the block-compressed and texture-buffer answers over a
buffer, and where the bundle answers nil beside them.

Car 14's stack: Q25 and Q24 were the lane's Q24 and Q23; c14-shared-events
holds Q23 on the car.
2026-11-05 21:59:37 -08:00
Anees Iqbal 5a208f8829 📝 Record which texture descriptors each creator refuses [ci skip]
oracle_texdesc measured the descriptor validation every texture creator runs on
the AMD 5300M and the Intel 630, rule by rule and in order, which the bundle now
copies. Q24 records it, and Q12 says whose words the bundle now gives.

Car 14's stack: c14-shared-events holds Q23 on the car, so the lane's Q23 and
Q24 are Q24 and Q25 here, in these commits' bodies and in car 14's doc fix after
the lane's commits, which renumbers the doc's headings and references; the doc
keeps both sections, shared events' first.
2026-11-05 21:59:36 -08:00
Anees Iqbal 023663e5ad 📝 Describe shared events across processes [ci skip]
design.md's new section says how a shared event crosses processes: the port
is a connection of the kext's, which the bundle checks before it calls on it,
one host event per name, its values posted to every holder, and the port's
hold of the event, which outlives a maker killed with SIGKILL; and the residual
of a value read across processes. The user client table lists the 'RGSE'
selectors and kext feature 1 << 6. dgpu-oracle.md's Q23 records what the 5300M
and the 630 answered.
2026-11-05 21:59:36 -08:00