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