"""Records for the objects the exec, info and ICB scenarios name: functions, pipelines, samplers, depth-stencil states, rate maps, heaps, textures over buffers, CPU buffers and indirect command buffers (docs/testing.md, sections 6.11, 6.17-6.19), plus the info decoder's records and a task that holds them all. Every layout names the reims-vgpu-core module or item that reads it; nothing is imported from the library's code. """ import struct from . import abi from .abi import PAGE from .task import GPUTask, rec, seg # ---- object records ---- def function_record(va, length): """Type 6: {u64 task VA of the metallib, u32 length, u32 commandType 15, u32 unread}, 20 bytes (resources::manager::create::function).""" return struct.pack(". With icb, supportIndirectCommandBuffers (key 7) as well: 02 07 04 01000000 00 04 (serialized on this host by -[MTLDevice serializeComputePipelineDescriptor:]).""" if icb: return bytes([2, 7, 4, 1, 0, 0, 0, 0, 4]) + struct.pack("