@@ -18,6 +18,7 @@ pub struct Device {
1818 pub ( crate ) device_fn_1_1 : crate :: DeviceFnV1_1 ,
1919 pub ( crate ) device_fn_1_2 : crate :: DeviceFnV1_2 ,
2020 pub ( crate ) device_fn_1_3 : crate :: DeviceFnV1_3 ,
21+ pub ( crate ) device_fn_1_4 : crate :: DeviceFnV1_4 ,
2122}
2223
2324impl Device {
@@ -38,6 +39,7 @@ impl Device {
3839 crate :: DeviceFnV1_1 :: load ( & mut load_fn) ,
3940 crate :: DeviceFnV1_2 :: load ( & mut load_fn) ,
4041 crate :: DeviceFnV1_3 :: load ( & mut load_fn) ,
42+ crate :: DeviceFnV1_4 :: load ( & mut load_fn) ,
4143 )
4244 }
4345
@@ -48,6 +50,7 @@ impl Device {
4850 device_fn_1_1 : crate :: DeviceFnV1_1 ,
4951 device_fn_1_2 : crate :: DeviceFnV1_2 ,
5052 device_fn_1_3 : crate :: DeviceFnV1_3 ,
53+ device_fn_1_4 : crate :: DeviceFnV1_4 ,
5154 ) -> Self {
5255 Self {
5356 handle,
@@ -56,6 +59,7 @@ impl Device {
5659 device_fn_1_1,
5760 device_fn_1_2,
5861 device_fn_1_3,
62+ device_fn_1_4,
5963 }
6064 }
6165
@@ -65,6 +69,274 @@ impl Device {
6569 }
6670}
6771
72+ /// Vulkan core 1.4
73+ impl Device {
74+ #[ inline]
75+ pub fn fp_v1_4 ( & self ) -> & crate :: DeviceFnV1_4 {
76+ & self . device_fn_1_4
77+ }
78+
79+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineStipple.html>
80+ #[ inline]
81+ #[ doc( alias = "vkCmdSetLineStipple" ) ]
82+ pub unsafe fn cmd_set_line_stipple (
83+ & self ,
84+ command_buffer : vk:: CommandBuffer ,
85+ line_stipple_factor : u32 ,
86+ line_stipple_pattern : u16 ,
87+ ) {
88+ ( self . device_fn_1_4 . cmd_set_line_stipple ) (
89+ command_buffer,
90+ line_stipple_factor,
91+ line_stipple_pattern,
92+ )
93+ }
94+
95+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkMapMemory2.html>
96+ #[ inline]
97+ #[ doc( alias = "vkMapMemory2" ) ]
98+ pub unsafe fn map_memory2 (
99+ & self ,
100+ memory_map_info : & vk:: MemoryMapInfo < ' _ > ,
101+ ) -> VkResult < * mut ffi:: c_void > {
102+ let mut data = mem:: MaybeUninit :: uninit ( ) ;
103+ ( self . device_fn_1_4 . map_memory2 ) ( self . handle , memory_map_info, data. as_mut_ptr ( ) )
104+ . assume_init_on_success ( data)
105+ }
106+
107+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUnmapMemory2.html>
108+ #[ inline]
109+ #[ doc( alias = "vkUnmapMemory2" ) ]
110+ pub unsafe fn unmap_memory2 (
111+ & self ,
112+ memory_unmap_info : & vk:: MemoryUnmapInfo < ' _ > ,
113+ ) -> VkResult < ( ) > {
114+ ( self . device_fn_1_4 . unmap_memory2 ) ( self . handle , memory_unmap_info) . result ( )
115+ }
116+
117+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindIndexBuffer2.html>
118+ #[ inline]
119+ #[ doc( alias = "vkCmdBindIndexBuffer2" ) ]
120+ pub unsafe fn cmd_bind_index_buffer2 (
121+ & self ,
122+ command_buffer : vk:: CommandBuffer ,
123+ buffer : vk:: Buffer ,
124+ offset : vk:: DeviceSize ,
125+ size : vk:: DeviceSize ,
126+ index_type : vk:: IndexType ,
127+ ) {
128+ ( self . device_fn_1_4 . cmd_bind_index_buffer2 ) (
129+ command_buffer,
130+ buffer,
131+ offset,
132+ size,
133+ index_type,
134+ )
135+ }
136+
137+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRenderingAreaGranularity.html>
138+ #[ inline]
139+ #[ doc( alias = "vkGetRenderingAreaGranularity" ) ]
140+ pub unsafe fn get_rendering_area_granularity (
141+ & self ,
142+ rendering_area_info : & vk:: RenderingAreaInfo < ' _ > ,
143+ ) -> vk:: Extent2D {
144+ let mut granularity = mem:: MaybeUninit :: uninit ( ) ;
145+ ( self . device_fn_1_4 . get_rendering_area_granularity ) (
146+ self . handle ,
147+ rendering_area_info,
148+ granularity. as_mut_ptr ( ) ,
149+ ) ;
150+ granularity. assume_init ( )
151+ }
152+
153+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceImageSubresourceLayout.html>
154+ #[ inline]
155+ #[ doc( alias = "vkGetDeviceImageSubresourceLayout" ) ]
156+ pub unsafe fn get_device_image_subresource_layout (
157+ & self ,
158+ info : & vk:: DeviceImageSubresourceInfo < ' _ > ,
159+ layout : & mut vk:: SubresourceLayout2 < ' _ > ,
160+ ) {
161+ ( self . device_fn_1_4 . get_device_image_subresource_layout ) ( self . handle , info, layout)
162+ }
163+
164+ // XXX: Replicate comments from VK_EXT_host_image_copy, VK_EXT_image_compression_control
165+ // and VK_KHR_maintenance5 about alternative ways to fetch and use a suffixed vesion of this
166+ // function? And retroactively update those docs?
167+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageSubresourceLayout2.html>
168+ #[ inline]
169+ #[ doc( alias = "vkGetImageSubresourceLayout2" ) ]
170+ pub unsafe fn get_image_subresource_layout2 (
171+ & self ,
172+ image : vk:: Image ,
173+ subresource : & vk:: ImageSubresource2 < ' _ > ,
174+ layout : & mut vk:: SubresourceLayout2 < ' _ > ,
175+ ) {
176+ ( self . device_fn_1_4 . get_image_subresource_layout2 ) ( self . handle , image, subresource, layout)
177+ }
178+
179+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSet.html>
180+ #[ inline]
181+ #[ doc( alias = "vkCmdPushDescriptorSet" ) ]
182+ pub unsafe fn cmd_push_descriptor_set (
183+ & self ,
184+ command_buffer : vk:: CommandBuffer ,
185+ pipeline_bind_point : vk:: PipelineBindPoint ,
186+ layout : vk:: PipelineLayout ,
187+ set : u32 ,
188+ descriptor_writes : & [ vk:: WriteDescriptorSet < ' _ > ] ,
189+ ) {
190+ ( self . device_fn_1_4 . cmd_push_descriptor_set ) (
191+ command_buffer,
192+ pipeline_bind_point,
193+ layout,
194+ set,
195+ descriptor_writes. len ( ) as u32 ,
196+ descriptor_writes. as_ptr ( ) ,
197+ )
198+ }
199+
200+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSetWithTemplate.html>
201+ #[ inline]
202+ #[ doc( alias = "vkCmdPushDescriptorSetWithTemplate" ) ]
203+ pub unsafe fn cmd_push_descriptor_set_with_template (
204+ & self ,
205+ command_buffer : vk:: CommandBuffer ,
206+ descriptor_update_template : vk:: DescriptorUpdateTemplate ,
207+ layout : vk:: PipelineLayout ,
208+ set : u32 ,
209+ p_data : * const ffi:: c_void ,
210+ ) {
211+ ( self . device_fn_1_4 . cmd_push_descriptor_set_with_template ) (
212+ command_buffer,
213+ descriptor_update_template,
214+ layout,
215+ set,
216+ p_data,
217+ )
218+ }
219+
220+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRenderingAttachmentLocations.html>
221+ #[ inline]
222+ #[ doc( alias = "vkCmdSetRenderingAttachmentLocations" ) ]
223+ pub unsafe fn cmd_set_rendering_attachment_locations (
224+ & self ,
225+ command_buffer : vk:: CommandBuffer ,
226+ location_info : & vk:: RenderingAttachmentLocationInfo < ' _ > ,
227+ ) {
228+ ( self . device_fn_1_4 . cmd_set_rendering_attachment_locations ) ( command_buffer, location_info)
229+ }
230+
231+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRenderingInputAttachmentIndices.html>
232+ #[ inline]
233+ #[ doc( alias = "vkCmdSetRenderingInputAttachmentIndices" ) ]
234+ pub unsafe fn cmd_set_rendering_input_attachment_indices (
235+ & self ,
236+ command_buffer : vk:: CommandBuffer ,
237+ input_attachment_index_info : & vk:: RenderingInputAttachmentIndexInfo < ' _ > ,
238+ ) {
239+ ( self
240+ . device_fn_1_4
241+ . cmd_set_rendering_input_attachment_indices ) (
242+ command_buffer,
243+ input_attachment_index_info,
244+ )
245+ }
246+
247+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindDescriptorSets2.html>
248+ #[ inline]
249+ #[ doc( alias = "vkCmdBindDescriptorSets2" ) ]
250+ pub unsafe fn cmd_bind_descriptor_sets2 (
251+ & self ,
252+ command_buffer : vk:: CommandBuffer ,
253+ bind_descriptor_sets_info : & vk:: BindDescriptorSetsInfo < ' _ > ,
254+ ) {
255+ ( self . device_fn_1_4 . cmd_bind_descriptor_sets2 ) ( command_buffer, bind_descriptor_sets_info)
256+ }
257+
258+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushConstants2.html>
259+ #[ inline]
260+ #[ doc( alias = "vkCmdPushConstants2" ) ]
261+ pub unsafe fn cmd_push_constants2 (
262+ & self ,
263+ command_buffer : vk:: CommandBuffer ,
264+ push_constants_info : & vk:: PushConstantsInfo < ' _ > ,
265+ ) {
266+ ( self . device_fn_1_4 . cmd_push_constants2 ) ( command_buffer, push_constants_info)
267+ }
268+
269+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSet2.html>
270+ #[ inline]
271+ #[ doc( alias = "vkCmdPushDescriptorSet2" ) ]
272+ pub unsafe fn cmd_push_descriptor_set2 (
273+ & self ,
274+ command_buffer : vk:: CommandBuffer ,
275+ push_descriptor_set_info : & vk:: PushDescriptorSetInfo < ' _ > ,
276+ ) {
277+ ( self . device_fn_1_4 . cmd_push_descriptor_set2 ) ( command_buffer, push_descriptor_set_info)
278+ }
279+
280+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSetWithTemplate2.html>
281+ #[ inline]
282+ #[ doc( alias = "vkCmdPushDescriptorSetWithTemplate2" ) ]
283+ pub unsafe fn cmd_push_descriptor_set_with_template2 (
284+ & self ,
285+ command_buffer : vk:: CommandBuffer ,
286+ push_descriptor_set_with_template_info : & vk:: PushDescriptorSetWithTemplateInfo < ' _ > ,
287+ ) {
288+ ( self . device_fn_1_4 . cmd_push_descriptor_set_with_template2 ) (
289+ command_buffer,
290+ push_descriptor_set_with_template_info,
291+ )
292+ }
293+
294+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyMemoryToImage.html>
295+ #[ inline]
296+ #[ doc( alias = "vkCopyMemoryToImage" ) ]
297+ pub unsafe fn copy_memory_to_image (
298+ & self ,
299+ copy_memory_to_image_info : & vk:: CopyMemoryToImageInfo < ' _ > ,
300+ ) -> VkResult < ( ) > {
301+ ( self . device_fn_1_4 . copy_memory_to_image ) ( self . handle , copy_memory_to_image_info) . result ( )
302+ }
303+
304+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyImageToMemory.html>
305+ #[ inline]
306+ #[ doc( alias = "vkCopyImageToMemory" ) ]
307+ pub unsafe fn copy_image_to_memory (
308+ & self ,
309+ copy_image_to_memory_info : & vk:: CopyImageToMemoryInfo < ' _ > ,
310+ ) -> VkResult < ( ) > {
311+ ( self . device_fn_1_4 . copy_image_to_memory ) ( self . handle , copy_image_to_memory_info) . result ( )
312+ }
313+
314+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyImageToImage.html>
315+ #[ inline]
316+ #[ doc( alias = "vkCopyImageToImage" ) ]
317+ pub unsafe fn copy_image_to_image (
318+ & self ,
319+ copy_image_to_image_info : & vk:: CopyImageToImageInfo < ' _ > ,
320+ ) -> VkResult < ( ) > {
321+ ( self . device_fn_1_4 . copy_image_to_image ) ( self . handle , copy_image_to_image_info) . result ( )
322+ }
323+
324+ /// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkTransitionImageLayout.html>
325+ #[ inline]
326+ #[ doc( alias = "vkTransitionImageLayout" ) ]
327+ pub unsafe fn transition_image_layout (
328+ & self ,
329+ transitions : & [ vk:: HostImageLayoutTransitionInfo < ' _ > ] ,
330+ ) -> VkResult < ( ) > {
331+ ( self . device_fn_1_4 . transition_image_layout ) (
332+ self . handle ,
333+ transitions. len ( ) as u32 ,
334+ transitions. as_ptr ( ) ,
335+ )
336+ . result ( )
337+ }
338+ }
339+
68340/// Vulkan core 1.3
69341impl Device {
70342 #[ inline]
0 commit comments