Files
reims-vgpu/docs
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
..