|
Loom C API
Public Loom compiler C API
|
Saved vulkaninfo profile importer for SPIR-V targets. More...
Go to the source code of this file.
Data Structures | |
| struct | loomc_spirv_vulkaninfo_profile_options_t |
| Saved vulkaninfo profile import options. More... | |
Functions | |
| loomc_status_t | loomc_target_profile_create_spirv_vulkaninfo (loomc_target_environment_t *target_environment, const loomc_source_t *source, const loomc_spirv_vulkaninfo_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 saved vulkaninfo JSON. | |
Saved vulkaninfo profile importer for SPIR-V targets.
This leaf translates saved Vulkan profile data into normalized SPIR-V profile facts. It does not include Vulkan headers, load a Vulkan loader, or require hardware. The importer accepts immutable loomc_source_t handles so embedders can choose borrowed, copied, memory-mapped, cached, or binding-owned storage using the ordinary source API. Filesystem input should be loaded with loomc_source_create_from_path and then passed to this importer.
The imported facts are intentionally the same public fact rows accepted by loomc_target_profile_create_spirv. The importer is a convenience adapter, not a separate target model. Unknown JSON fields are ignored. Recognized malformed fields produce SPIRV/VULKANINFO diagnostics on the returned result. Contradictory or unsupported normalized facts are then diagnosed by the SPIR-V profile layer using SPIRV/PROFILE diagnostics.
| loomc_status_t loomc_target_profile_create_spirv_vulkaninfo | ( | loomc_target_environment_t * | target_environment, |
| const loomc_source_t * | source, | ||
| const loomc_spirv_vulkaninfo_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 saved vulkaninfo JSON.
| target_environment | SPIR-V-capable target environment. |
| source | Immutable JSON/JSONC source bytes. |
| options | Import options, or NULL for defaults. |
| 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 import and profile preparation. |
Supported input shapes are the common raw vulkaninfo shape with a top-level devices array and the GPUInfo/Vulkan Profiles wrapper shape with top-level capabilities and profiles objects. The importer recognizes currently modeled Loom facts only; unrecognized Vulkan fields are ignored so newer saved profiles remain loadable by older Loom builds.