|
Loom C API
Public Loom compiler C API
|
Raw Vulkan SPIR-V profile adapter. More...
Go to the source code of this file.
Data Structures | |
| struct | loomc_spirv_vulkan_function_table_t |
| Vulkan query functions used by the raw Vulkan SPIR-V profile adapter. More... | |
| struct | loomc_spirv_vulkan_profile_options_t |
| Raw Vulkan profile creation options. More... | |
Functions | |
| loomc_status_t | loomc_target_profile_create_spirv_vulkan (loomc_target_environment_t *target_environment, const loomc_spirv_vulkan_profile_options_t *options, loomc_allocator_t allocator, loomc_target_profile_t **out_profile, loomc_result_t **out_result) |
| Creates a SPIR-V target profile from a raw Vulkan physical device. | |
Raw Vulkan SPIR-V profile adapter.
This optional leaf derives normalized SPIR-V profile facts from a caller-owned VkPhysicalDevice and a small table of Vulkan query functions. It includes Vulkan headers but does not load or link a Vulkan loader. Embedders that already own an instance/device stack can pass their resolved function pointers directly, while offline and cross-compilation flows can keep using header-light profile facts or saved vulkaninfo importers.
The adapter is a convenience layer over loomc_target_profile_create_spirv. It does not expose a second target model: queried Vulkan properties and features are normalized into the same feature, limit, and environment fact rows used by saved profiles and programmatic profile construction.
| loomc_status_t loomc_target_profile_create_spirv_vulkan | ( | loomc_target_environment_t * | target_environment, |
| const loomc_spirv_vulkan_profile_options_t * | options, | ||
| loomc_allocator_t | allocator, | ||
| loomc_target_profile_t ** | out_profile, | ||
| loomc_result_t ** | out_result ) |
Creates a SPIR-V target profile from a raw Vulkan physical device.
| target_environment | SPIR-V-capable target environment. |
| options | Vulkan physical device and function table. Required. |
| allocator | Host allocator used for profile and result storage. |
| out_profile | Receives one retained profile when out_result succeeds. |
| out_result | Receives one retained result describing profile preparation. |
The adapter queries core physical-device properties and feature structs, plus extension structs exposed by the Vulkan headers used to build this leaf. Unsupported or header-absent facts remain unknown. Recognized queried facts use vulkan: provenance strings and are then validated by the shared SPIR-V profile layer.