Files
reims-vgpu/docs
Anees Iqbal b322faafeb 🆕 Align IOSurface rows to the GPU's linear rows on discrete GPUs too
What changes for the guest: a host whose GPU has memory of its own now
answers the device info's linear_row_alignment as a host whose GPU shares
the CPU's memory does, the runtime's minimumLinearTextureAlignmentForPixel
Format: of BGRA8 (256 on RADV, 128 on the RTX 3090 and 2080). The kext then
has IOSurface align the bytes per row it works out for a surface to it,
where it was IOSurface's own 64 bytes on such hosts, and
IOSurfaceGetPropertyAlignment answers it to the processes.

Why: a texture over a surface's bytes takes the GPU's own linear image only
at the GPU's pitch (RADV exactly round_up(row, 256), NVIDIA its own row's
pitch), wherever the bytes lie: in the surface's pages or in a device cache
of the pages' layout, which a discrete GPU's host keeps. At IOSurface's
64-byte rows those textures were the runtime's shadows, copied in at each
command buffer's first use (perf-scout F2). 256 and 128 lie inside what
Macs answer (64 on an Intel Mac, 128 on the M3; an Intel Mac's GPUs answer
256 for minimumLinearTextureAlignmentForPixelFormat:).

The fake device takes a knob for a GPU of its own memory, and a test holds
the answer there. The wire doc, the header and the kext's comment say the
answer is a host's whatever its GPU's memory; the guest sets and the ROM
record are rebuilt with the branch's last commit.
2026-11-12 03:39:49 -08:00
..