simvx.graphics.gpu.device¶
Physical/logical device selection and queue management.
Module Contents¶
Classes¶
Functions¶
Pick a suitable VkPhysicalDevice. Returns (physical_device, queue_families). |
|
Create a VkDevice. Returns |
Data¶
API¶
- simvx.graphics.gpu.device.__all__¶
[‘select_physical_device’, ‘create_logical_device’, ‘QueueFamilies’]
- simvx.graphics.gpu.device.log¶
‘getLogger(…)’
- simvx.graphics.gpu.device.select_physical_device(instance: Any, surface: Any) tuple[Any, simvx.graphics.gpu.device.QueueFamilies][source]¶
Pick a suitable VkPhysicalDevice. Returns (physical_device, queue_families).
- simvx.graphics.gpu.device.create_logical_device(physical_device: Any, queue_families: simvx.graphics.gpu.device.QueueFamilies, *, compute_qf: int | None = None, transfer_qf: int | None = None, external_memory_fd: bool = False) tuple[Any, Any, Any, Any, Any][source]¶
Create a VkDevice. Returns
(device, graphics_queue, present_queue, compute_queue, transfer_queue).compute_qf/transfer_qfare the dedicated queue families probed by- Func:
probe_dedicated_queue_families(RenderCapabilities.dedicated_*_qf). When supplied (the async-compute / dedicated-DMA path on multi-queue GPUs), a queue is created on each and its handle returned; otherwise the corresponding return isNone. A family that coincides with graphics or present is ignored (it is already covered by the universal queue), so on a single-universal-family box (compute_qf=transfer_qf=None) the queue set is exactly graphics+present as before: byte-identical device creation.
external_memory_fdaddsVK_KHR_external_memory_fd(and theVK_KHR_external_memorydependency) to the enabled device extensions. It is requested only by the D8 multi-GPU path so the dma-buf zero-copy cross-device transfer can later export/import image memory as an fd; the staging-copy floor needs nothing extra. DefaultFalsekeeps single-GPU device creation byte-identical. The extension must be enabled here (not merely probed) for- Class:
~simvx.graphics.gpu.multi_device.TransferMethod.DMABUFselection to be valid; until both devices enable it the staging-copy floor is chosen.