@@ -14,23 +14,27 @@ extern crate ash;
14
14
15
15
#[ cfg( feature = "vulkan" ) ]
16
16
use ash:: vk:: {
17
- Device as VkDevice , Format as VkFormat , Image as VkImage ,
18
- ImageCreateFlags as VkImageCreateFlags , ImageTiling as VkImageTiling ,
19
- ImageUsageFlags as VkImageUsageFlagBits , Instance as VkInstance , PFN_vkGetInstanceProcAddr ,
20
- PhysicalDevice as VkPhysicalDevice ,
21
- DeviceMemory as VkDeviceMemory ,
22
- MemoryPropertyFlags as VkMemoryPropertyFlagBits ,
23
- AccessFlags as VkAccessFlagBits ,
24
- ImageLayout as VkImageLayout ,
25
- Semaphore as VkSemaphore ,
26
- QueueFlags as VkQueueFlagBits ,
27
- VideoCodecOperationFlagsKHR as VkVideoCodecOperationFlagBitsKHR
17
+ AccessFlags as VkAccessFlagBits , Device as VkDevice , DeviceMemory as VkDeviceMemory ,
18
+ Format as VkFormat , Image as VkImage , ImageCreateFlags as VkImageCreateFlags ,
19
+ ImageLayout as VkImageLayout , ImageTiling as VkImageTiling ,
20
+ ImageUsageFlags as VkImageUsageFlagBits , Instance as VkInstance ,
21
+ MemoryPropertyFlags as VkMemoryPropertyFlagBits , PFN_vkGetInstanceProcAddr ,
22
+ PhysicalDevice as VkPhysicalDevice , QueueFlags as VkQueueFlagBits , Semaphore as VkSemaphore ,
23
+ VideoCodecOperationFlagsKHR as VkVideoCodecOperationFlagBitsKHR ,
28
24
} ;
29
25
26
+ // the generated bindgen structs need these types that have lifetimes in them,
27
+ // but there is no way within bindgen to propagate those lifetimes out into the structs
28
+ // that contain these structs
29
+ //
30
+ // so, just put 'static to let it compile. Making sure the lifetimes are actually
31
+ // check out nicely is now part of the checks an author must do when using the unsafe
32
+ // functions that take in these structs or any other structs that contain them.
33
+
30
34
#[ cfg( feature = "vulkan" ) ]
31
- type VkAllocationCallbacks = ash:: vk:: AllocationCallbacks < ' static > ; // hack!
35
+ type VkAllocationCallbacks = ash:: vk:: AllocationCallbacks < ' static > ;
32
36
#[ cfg( feature = "vulkan" ) ]
33
- type VkPhysicalDeviceFeatures2 = ash:: vk:: PhysicalDeviceFeatures2 < ' static > ; // hack!
37
+ type VkPhysicalDeviceFeatures2 = ash:: vk:: PhysicalDeviceFeatures2 < ' static > ;
34
38
35
39
include ! ( concat!( env!( "OUT_DIR" ) , "/bindings.rs" ) ) ;
36
40
0 commit comments