declare_introspection_queries!() { /* proc-macro */ }Expand description
Declare the required introspection queries for Android given an instantiated
vulkan_layer::Global type.
All functions are defined without name mangling, so that they are exported as C symbols in the generated dynamic library. This is recommended by the Vulkan loader doc:
These introspection functions are not used by the Khronos loader but should be present in layers to maintain consistency. The specific “introspection” functions are called out in the Layer Manifest File Format table.
According to the the Vulkan loader doc, introspection queries include:
vkEnumerateInstanceLayerPropertiesvkEnumerateInstanceExtensionPropertiesvkEnumerateDeviceLayerPropertiesvkEnumerateDeviceExtensionPropertiesvkGetInstanceProcAddrvkGetDeviceProcAddr
§Examples
#[derive(Default)]
struct MyLayer(StubGlobalHooks);
impl Layer for MyLayer {
// ...
}
type MyGlobal = Global::<MyLayer>;
declare_introspection_queries!(MyGlobal);