diff --git a/analysis/src/to_rust.rs b/analysis/src/to_rust.rs index 5855df631..f84c0a44b 100644 --- a/analysis/src/to_rust.rs +++ b/analysis/src/to_rust.rs @@ -15,8 +15,12 @@ use syn::Ident; pub trait RustTranslator { fn var_name_to_rust(&self, name: VariableName) -> Ident; + fn trimmed_var_name_to_rust(&self, name: VariableName) -> Ident; + fn type_to_rust(&self, name: TypeName, qualified: bool, lifetime: &Lifetime) -> TokenStream; + fn type_to_rust_without_bit_flags_replacement(&self, name: TypeName, qualified: bool, lifetime: &Lifetime) -> TokenStream; + fn func_pointer_to_rust(&self, name: FuncPointerName, qualified: bool) -> TokenStream; fn command_to_rust(&self, name: CommandName, qualified: bool) -> TokenStream; diff --git a/ash-rewrite/src/device.rs b/ash-rewrite/src/device.rs index d9eb46761..d28cebaa9 100644 --- a/ash-rewrite/src/device.rs +++ b/ash-rewrite/src/device.rs @@ -1,2754 +1,2754 @@ -#![allow( - clippy::trivially_copy_pass_by_ref, - clippy::missing_safety_doc, - clippy::too_many_arguments -)] -use crate::read_into_uninitialized_vector; -use crate::vk; -use crate::RawPtr; -use crate::VkResult; -use alloc::vec::Vec; -use core::ffi; -use core::mem; -use core::mem::{size_of, size_of_val}; // TODO: Remove when bumping MSRV to 1.80 -use core::ptr; - -/// -#[derive(Clone)] -pub struct Device { - pub(crate) handle: vk::Device, - - pub(crate) device_fn_1_0: crate::DeviceFnV1_0, - pub(crate) device_fn_1_1: crate::DeviceFnV1_1, - pub(crate) device_fn_1_2: crate::DeviceFnV1_2, - pub(crate) device_fn_1_3: crate::DeviceFnV1_3, -} - -impl Device { - pub unsafe fn load(instance_fn: &crate::InstanceFnV1_0, device: vk::Device) -> Self { - Self::load_with( - |name| mem::transmute((instance_fn.get_device_proc_addr)(device, name.as_ptr())), - device, - ) - } - - pub unsafe fn load_with( - mut load_fn: impl FnMut(&ffi::CStr) -> *const ffi::c_void, - device: vk::Device, - ) -> Self { - Self::from_parts_1_3( - device, - crate::DeviceFnV1_0::load(&mut load_fn), - crate::DeviceFnV1_1::load(&mut load_fn), - crate::DeviceFnV1_2::load(&mut load_fn), - crate::DeviceFnV1_3::load(&mut load_fn), - ) - } - - #[inline] - pub fn from_parts_1_3( - handle: vk::Device, - device_fn_1_0: crate::DeviceFnV1_0, - device_fn_1_1: crate::DeviceFnV1_1, - device_fn_1_2: crate::DeviceFnV1_2, - device_fn_1_3: crate::DeviceFnV1_3, - ) -> Self { - Self { - handle, - - device_fn_1_0, - device_fn_1_1, - device_fn_1_2, - device_fn_1_3, - } - } - - #[inline] - pub fn handle(&self) -> vk::Device { - self.handle - } -} - -/// Vulkan core 1.3 -impl Device { - #[inline] - pub fn fp_v1_3(&self) -> &crate::DeviceFnV1_3 { - &self.device_fn_1_3 - } - - /// - #[inline] - pub unsafe fn create_private_data_slot( - &self, - create_info: &vk::PrivateDataSlotCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut private_data_slot = mem::MaybeUninit::uninit(); - (self.device_fn_1_3.create_private_data_slot)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - private_data_slot.as_mut_ptr(), - ) - .assume_init_on_success(private_data_slot) - } - - /// - #[inline] - pub unsafe fn destroy_private_data_slot( - &self, - private_data_slot: vk::PrivateDataSlot, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_3.destroy_private_data_slot)( - self.handle, - private_data_slot, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn set_private_data( - &self, - object: T, - private_data_slot: vk::PrivateDataSlot, - data: u64, - ) -> VkResult<()> { - (self.device_fn_1_3.set_private_data)( - self.handle, - T::TYPE, - object.as_raw(), - private_data_slot, - data, - ) - .result() - } - - /// - #[inline] - pub unsafe fn get_private_data( - &self, - object: T, - private_data_slot: vk::PrivateDataSlot, - ) -> u64 { - let mut data = mem::MaybeUninit::uninit(); - (self.device_fn_1_3.get_private_data)( - self.handle, - T::TYPE, - object.as_raw(), - private_data_slot, - data.as_mut_ptr(), - ); - data.assume_init() - } - - /// - #[inline] - pub unsafe fn cmd_pipeline_barrier2( - &self, - command_buffer: vk::CommandBuffer, - dependency_info: &vk::DependencyInfo<'_>, - ) { - (self.device_fn_1_3.cmd_pipeline_barrier2)(command_buffer, dependency_info) - } - - /// - #[inline] - pub unsafe fn cmd_reset_event2( - &self, - command_buffer: vk::CommandBuffer, - event: vk::Event, - stage_mask: vk::PipelineStageFlags2, - ) { - (self.device_fn_1_3.cmd_reset_event2)(command_buffer, event, stage_mask) - } - - /// - #[inline] - pub unsafe fn cmd_set_event2( - &self, - command_buffer: vk::CommandBuffer, - event: vk::Event, - dependency_info: &vk::DependencyInfo<'_>, - ) { - (self.device_fn_1_3.cmd_set_event2)(command_buffer, event, dependency_info) - } - - /// - #[inline] - pub unsafe fn cmd_wait_events2( - &self, - command_buffer: vk::CommandBuffer, - events: &[vk::Event], - dependency_infos: &[vk::DependencyInfo<'_>], - ) { - assert_eq!(events.len(), dependency_infos.len()); - (self.device_fn_1_3.cmd_wait_events2)( - command_buffer, - events.len() as u32, - events.as_ptr(), - dependency_infos.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_write_timestamp2( - &self, - command_buffer: vk::CommandBuffer, - stage: vk::PipelineStageFlags2, - query_pool: vk::QueryPool, - query: u32, - ) { - (self.device_fn_1_3.cmd_write_timestamp2)(command_buffer, stage, query_pool, query) - } - - /// - #[inline] - pub unsafe fn queue_submit2( - &self, - queue: vk::Queue, - submits: &[vk::SubmitInfo2<'_>], - fence: vk::Fence, - ) -> VkResult<()> { - (self.device_fn_1_3.queue_submit2)(queue, submits.len() as u32, submits.as_ptr(), fence) - .result() - } - - /// - #[inline] - pub unsafe fn cmd_copy_buffer2( - &self, - command_buffer: vk::CommandBuffer, - copy_buffer_info: &vk::CopyBufferInfo2<'_>, - ) { - (self.device_fn_1_3.cmd_copy_buffer2)(command_buffer, copy_buffer_info) - } - /// - #[inline] - pub unsafe fn cmd_copy_image2( - &self, - command_buffer: vk::CommandBuffer, - copy_image_info: &vk::CopyImageInfo2<'_>, - ) { - (self.device_fn_1_3.cmd_copy_image2)(command_buffer, copy_image_info) - } - /// - #[inline] - pub unsafe fn cmd_copy_buffer_to_image2( - &self, - command_buffer: vk::CommandBuffer, - copy_buffer_to_image_info: &vk::CopyBufferToImageInfo2<'_>, - ) { - (self.device_fn_1_3.cmd_copy_buffer_to_image2)(command_buffer, copy_buffer_to_image_info) - } - /// - #[inline] - pub unsafe fn cmd_copy_image_to_buffer2( - &self, - command_buffer: vk::CommandBuffer, - copy_image_to_buffer_info: &vk::CopyImageToBufferInfo2<'_>, - ) { - (self.device_fn_1_3.cmd_copy_image_to_buffer2)(command_buffer, copy_image_to_buffer_info) - } - /// - #[inline] - pub unsafe fn cmd_blit_image2( - &self, - command_buffer: vk::CommandBuffer, - blit_image_info: &vk::BlitImageInfo2<'_>, - ) { - (self.device_fn_1_3.cmd_blit_image2)(command_buffer, blit_image_info) - } - /// - #[inline] - pub unsafe fn cmd_resolve_image2( - &self, - command_buffer: vk::CommandBuffer, - resolve_image_info: &vk::ResolveImageInfo2<'_>, - ) { - (self.device_fn_1_3.cmd_resolve_image2)(command_buffer, resolve_image_info) - } - - /// - #[inline] - pub unsafe fn cmd_begin_rendering( - &self, - command_buffer: vk::CommandBuffer, - rendering_info: &vk::RenderingInfo<'_>, - ) { - (self.device_fn_1_3.cmd_begin_rendering)(command_buffer, rendering_info) - } - - /// - #[inline] - pub unsafe fn cmd_end_rendering(&self, command_buffer: vk::CommandBuffer) { - (self.device_fn_1_3.cmd_end_rendering)(command_buffer) - } - - /// - #[inline] - pub unsafe fn cmd_set_cull_mode( - &self, - command_buffer: vk::CommandBuffer, - cull_mode: vk::CullModeFlags, - ) { - (self.device_fn_1_3.cmd_set_cull_mode)(command_buffer, cull_mode) - } - - /// - #[inline] - pub unsafe fn cmd_set_front_face( - &self, - command_buffer: vk::CommandBuffer, - front_face: vk::FrontFace, - ) { - (self.device_fn_1_3.cmd_set_front_face)(command_buffer, front_face) - } - - /// - #[inline] - pub unsafe fn cmd_set_primitive_topology( - &self, - command_buffer: vk::CommandBuffer, - primitive_topology: vk::PrimitiveTopology, - ) { - (self.device_fn_1_3.cmd_set_primitive_topology)(command_buffer, primitive_topology) - } - - /// - #[inline] - pub unsafe fn cmd_set_viewport_with_count( - &self, - command_buffer: vk::CommandBuffer, - viewports: &[vk::Viewport], - ) { - (self.device_fn_1_3.cmd_set_viewport_with_count)( - command_buffer, - viewports.len() as u32, - viewports.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_scissor_with_count( - &self, - command_buffer: vk::CommandBuffer, - scissors: &[vk::Rect2D], - ) { - (self.device_fn_1_3.cmd_set_scissor_with_count)( - command_buffer, - scissors.len() as u32, - scissors.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_bind_vertex_buffers2( - &self, - command_buffer: vk::CommandBuffer, - first_binding: u32, - buffers: &[vk::Buffer], - offsets: &[vk::DeviceSize], - sizes: Option<&[vk::DeviceSize]>, - strides: Option<&[vk::DeviceSize]>, - ) { - assert_eq!(offsets.len(), buffers.len()); - let p_sizes = if let Some(sizes) = sizes { - assert_eq!(sizes.len(), buffers.len()); - sizes.as_ptr() - } else { - ptr::null() - }; - let p_strides = if let Some(strides) = strides { - assert_eq!(strides.len(), buffers.len()); - strides.as_ptr() - } else { - ptr::null() - }; - (self.device_fn_1_3.cmd_bind_vertex_buffers2)( - command_buffer, - first_binding, - buffers.len() as u32, - buffers.as_ptr(), - offsets.as_ptr(), - p_sizes, - p_strides, - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_test_enable( - &self, - command_buffer: vk::CommandBuffer, - depth_test_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_depth_test_enable)(command_buffer, depth_test_enable.into()) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_write_enable( - &self, - command_buffer: vk::CommandBuffer, - depth_write_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_depth_write_enable)(command_buffer, depth_write_enable.into()) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_compare_op( - &self, - command_buffer: vk::CommandBuffer, - depth_compare_op: vk::CompareOp, - ) { - (self.device_fn_1_3.cmd_set_depth_compare_op)(command_buffer, depth_compare_op) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_bounds_test_enable( - &self, - command_buffer: vk::CommandBuffer, - depth_bounds_test_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_depth_bounds_test_enable)( - command_buffer, - depth_bounds_test_enable.into(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_stencil_test_enable( - &self, - command_buffer: vk::CommandBuffer, - stencil_test_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_stencil_test_enable)(command_buffer, stencil_test_enable.into()) - } - - /// - #[inline] - pub unsafe fn cmd_set_stencil_op( - &self, - command_buffer: vk::CommandBuffer, - face_mask: vk::StencilFaceFlags, - fail_op: vk::StencilOp, - pass_op: vk::StencilOp, - depth_fail_op: vk::StencilOp, - compare_op: vk::CompareOp, - ) { - (self.device_fn_1_3.cmd_set_stencil_op)( - command_buffer, - face_mask, - fail_op, - pass_op, - depth_fail_op, - compare_op, - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_rasterizer_discard_enable( - &self, - command_buffer: vk::CommandBuffer, - rasterizer_discard_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_rasterizer_discard_enable)( - command_buffer, - rasterizer_discard_enable.into(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_bias_enable( - &self, - command_buffer: vk::CommandBuffer, - depth_bias_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_depth_bias_enable)(command_buffer, depth_bias_enable.into()) - } - - /// - #[inline] - pub unsafe fn cmd_set_primitive_restart_enable( - &self, - command_buffer: vk::CommandBuffer, - primitive_restart_enable: bool, - ) { - (self.device_fn_1_3.cmd_set_primitive_restart_enable)( - command_buffer, - primitive_restart_enable.into(), - ) - } - - /// - #[inline] - pub unsafe fn get_device_buffer_memory_requirements( - &self, - memory_requirements: &vk::DeviceBufferMemoryRequirements<'_>, - out: &mut vk::MemoryRequirements2<'_>, - ) { - (self.device_fn_1_3.get_device_buffer_memory_requirements)( - self.handle, - memory_requirements, - out, - ) - } - - /// - #[inline] - pub unsafe fn get_device_image_memory_requirements( - &self, - memory_requirements: &vk::DeviceImageMemoryRequirements<'_>, - out: &mut vk::MemoryRequirements2<'_>, - ) { - (self.device_fn_1_3.get_device_image_memory_requirements)( - self.handle, - memory_requirements, - out, - ) - } - - /// Retrieve the number of elements to pass to [`get_device_image_sparse_memory_requirements()`][Self::get_device_image_sparse_memory_requirements()] - #[inline] - pub unsafe fn get_device_image_sparse_memory_requirements_len( - &self, - memory_requirements: &vk::DeviceImageMemoryRequirements<'_>, - ) -> usize { - let mut count = mem::MaybeUninit::uninit(); - (self - .device_fn_1_3 - .get_device_image_sparse_memory_requirements)( - self.handle, - memory_requirements, - count.as_mut_ptr(), - ptr::null_mut(), - ); - count.assume_init() as usize - } - - /// - /// - /// Call [`get_device_image_sparse_memory_requirements_len()`][Self::get_device_image_sparse_memory_requirements_len()] to query the number of elements to pass to `out`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. - #[inline] - pub unsafe fn get_device_image_sparse_memory_requirements( - &self, - memory_requirements: &vk::DeviceImageMemoryRequirements<'_>, - out: &mut [vk::SparseImageMemoryRequirements2<'_>], - ) { - let mut count = out.len() as u32; - (self - .device_fn_1_3 - .get_device_image_sparse_memory_requirements)( - self.handle, - memory_requirements, - &mut count, - out.as_mut_ptr(), - ); - assert_eq!(count as usize, out.len()); - } -} - -/// Vulkan core 1.2 -impl Device { - #[inline] - pub fn fp_v1_2(&self) -> &crate::DeviceFnV1_2 { - &self.device_fn_1_2 - } - - /// - #[inline] - pub unsafe fn cmd_draw_indirect_count( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - count_buffer: vk::Buffer, - count_buffer_offset: vk::DeviceSize, - max_draw_count: u32, - stride: u32, - ) { - (self.device_fn_1_2.cmd_draw_indirect_count)( - command_buffer, - buffer, - offset, - count_buffer, - count_buffer_offset, - max_draw_count, - stride, - ) - } - - /// - #[inline] - pub unsafe fn cmd_draw_indexed_indirect_count( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - count_buffer: vk::Buffer, - count_buffer_offset: vk::DeviceSize, - max_draw_count: u32, - stride: u32, - ) { - (self.device_fn_1_2.cmd_draw_indexed_indirect_count)( - command_buffer, - buffer, - offset, - count_buffer, - count_buffer_offset, - max_draw_count, - stride, - ) - } - - /// - #[inline] - pub unsafe fn create_render_pass2( - &self, - create_info: &vk::RenderPassCreateInfo2<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut renderpass = mem::MaybeUninit::uninit(); - (self.device_fn_1_2.create_render_pass2)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - renderpass.as_mut_ptr(), - ) - .assume_init_on_success(renderpass) - } - - /// - #[inline] - pub unsafe fn cmd_begin_render_pass2( - &self, - command_buffer: vk::CommandBuffer, - render_pass_begin_info: &vk::RenderPassBeginInfo<'_>, - subpass_begin_info: &vk::SubpassBeginInfo<'_>, - ) { - (self.device_fn_1_2.cmd_begin_render_pass2)( - command_buffer, - render_pass_begin_info, - subpass_begin_info, - ) - } - - /// - #[inline] - pub unsafe fn cmd_next_subpass2( - &self, - command_buffer: vk::CommandBuffer, - subpass_begin_info: &vk::SubpassBeginInfo<'_>, - subpass_end_info: &vk::SubpassEndInfo<'_>, - ) { - (self.device_fn_1_2.cmd_next_subpass2)(command_buffer, subpass_begin_info, subpass_end_info) - } - - /// - #[inline] - pub unsafe fn cmd_end_render_pass2( - &self, - command_buffer: vk::CommandBuffer, - subpass_end_info: &vk::SubpassEndInfo<'_>, - ) { - (self.device_fn_1_2.cmd_end_render_pass2)(command_buffer, subpass_end_info) - } - - /// - #[inline] - pub unsafe fn reset_query_pool( - &self, - query_pool: vk::QueryPool, - first_query: u32, - query_count: u32, - ) { - (self.device_fn_1_2.reset_query_pool)(self.handle, query_pool, first_query, query_count) - } - - /// - #[inline] - pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult { - let mut value = mem::MaybeUninit::uninit(); - (self.device_fn_1_2.get_semaphore_counter_value)(self.handle, semaphore, value.as_mut_ptr()) - .assume_init_on_success(value) - } - - /// - #[inline] - pub unsafe fn wait_semaphores( - &self, - wait_info: &vk::SemaphoreWaitInfo<'_>, - timeout: u64, - ) -> VkResult<()> { - (self.device_fn_1_2.wait_semaphores)(self.handle, wait_info, timeout).result() - } - - /// - #[inline] - pub unsafe fn signal_semaphore( - &self, - signal_info: &vk::SemaphoreSignalInfo<'_>, - ) -> VkResult<()> { - (self.device_fn_1_2.signal_semaphore)(self.handle, signal_info).result() - } - - /// - #[inline] - pub unsafe fn get_buffer_device_address( - &self, - info: &vk::BufferDeviceAddressInfo<'_>, - ) -> vk::DeviceAddress { - (self.device_fn_1_2.get_buffer_device_address)(self.handle, info) - } - - /// - #[inline] - pub unsafe fn get_buffer_opaque_capture_address( - &self, - info: &vk::BufferDeviceAddressInfo<'_>, - ) -> u64 { - (self.device_fn_1_2.get_buffer_opaque_capture_address)(self.handle, info) - } - - /// - #[inline] - pub unsafe fn get_device_memory_opaque_capture_address( - &self, - info: &vk::DeviceMemoryOpaqueCaptureAddressInfo<'_>, - ) -> u64 { - (self.device_fn_1_2.get_device_memory_opaque_capture_address)(self.handle, info) - } -} - -/// Vulkan core 1.1 -impl Device { - #[inline] - pub fn fp_v1_1(&self) -> &crate::DeviceFnV1_1 { - &self.device_fn_1_1 - } - - /// - #[inline] - pub unsafe fn bind_buffer_memory2( - &self, - bind_infos: &[vk::BindBufferMemoryInfo<'_>], - ) -> VkResult<()> { - (self.device_fn_1_1.bind_buffer_memory2)( - self.handle, - bind_infos.len() as _, - bind_infos.as_ptr(), - ) - .result() - } - - /// - #[inline] - pub unsafe fn bind_image_memory2( - &self, - bind_infos: &[vk::BindImageMemoryInfo<'_>], - ) -> VkResult<()> { - (self.device_fn_1_1.bind_image_memory2)( - self.handle, - bind_infos.len() as _, - bind_infos.as_ptr(), - ) - .result() - } - - /// - #[inline] - pub unsafe fn get_device_group_peer_memory_features( - &self, - heap_index: u32, - local_device_index: u32, - remote_device_index: u32, - ) -> vk::PeerMemoryFeatureFlags { - let mut peer_memory_features = mem::MaybeUninit::uninit(); - (self.device_fn_1_1.get_device_group_peer_memory_features)( - self.handle, - heap_index, - local_device_index, - remote_device_index, - peer_memory_features.as_mut_ptr(), - ); - peer_memory_features.assume_init() - } - - /// - #[inline] - pub unsafe fn cmd_set_device_mask(&self, command_buffer: vk::CommandBuffer, device_mask: u32) { - (self.device_fn_1_1.cmd_set_device_mask)(command_buffer, device_mask) - } - - /// - #[inline] - pub unsafe fn cmd_dispatch_base( - &self, - command_buffer: vk::CommandBuffer, - base_group_x: u32, - base_group_y: u32, - base_group_z: u32, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ) { - (self.device_fn_1_1.cmd_dispatch_base)( - command_buffer, - base_group_x, - base_group_y, - base_group_z, - group_count_x, - group_count_y, - group_count_z, - ) - } - - /// - #[inline] - pub unsafe fn get_image_memory_requirements2( - &self, - info: &vk::ImageMemoryRequirementsInfo2<'_>, - out: &mut vk::MemoryRequirements2<'_>, - ) { - (self.device_fn_1_1.get_image_memory_requirements2)(self.handle, info, out) - } - - /// - #[inline] - pub unsafe fn get_buffer_memory_requirements2( - &self, - info: &vk::BufferMemoryRequirementsInfo2<'_>, - out: &mut vk::MemoryRequirements2<'_>, - ) { - (self.device_fn_1_1.get_buffer_memory_requirements2)(self.handle, info, out) - } - - /// Retrieve the number of elements to pass to [`get_image_sparse_memory_requirements2()`][Self::get_image_sparse_memory_requirements2()] - #[inline] - pub unsafe fn get_image_sparse_memory_requirements2_len( - &self, - info: &vk::ImageSparseMemoryRequirementsInfo2<'_>, - ) -> usize { - let mut count = mem::MaybeUninit::uninit(); - (self.device_fn_1_1.get_image_sparse_memory_requirements2)( - self.handle, - info, - count.as_mut_ptr(), - ptr::null_mut(), - ); - count.assume_init() as usize - } - - /// - /// - /// Call [`get_image_sparse_memory_requirements2_len()`][Self::get_image_sparse_memory_requirements2_len()] to query the number of elements to pass to `out`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. - #[inline] - pub unsafe fn get_image_sparse_memory_requirements2( - &self, - info: &vk::ImageSparseMemoryRequirementsInfo2<'_>, - out: &mut [vk::SparseImageMemoryRequirements2<'_>], - ) { - let mut count = out.len() as u32; - (self.device_fn_1_1.get_image_sparse_memory_requirements2)( - self.handle, - info, - &mut count, - out.as_mut_ptr(), - ); - assert_eq!(count as usize, out.len()); - } - - /// - #[inline] - pub unsafe fn trim_command_pool( - &self, - command_pool: vk::CommandPool, - flags: vk::CommandPoolTrimFlags, - ) { - (self.device_fn_1_1.trim_command_pool)(self.handle, command_pool, flags) - } - - /// - #[inline] - pub unsafe fn get_device_queue2(&self, queue_info: &vk::DeviceQueueInfo2<'_>) -> vk::Queue { - let mut queue = mem::MaybeUninit::uninit(); - (self.device_fn_1_1.get_device_queue2)(self.handle, queue_info, queue.as_mut_ptr()); - queue.assume_init() - } - - /// - #[inline] - pub unsafe fn create_sampler_ycbcr_conversion( - &self, - create_info: &vk::SamplerYcbcrConversionCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut ycbcr_conversion = mem::MaybeUninit::uninit(); - (self.device_fn_1_1.create_sampler_ycbcr_conversion)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - ycbcr_conversion.as_mut_ptr(), - ) - .assume_init_on_success(ycbcr_conversion) - } - - /// - #[inline] - pub unsafe fn destroy_sampler_ycbcr_conversion( - &self, - ycbcr_conversion: vk::SamplerYcbcrConversion, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_1.destroy_sampler_ycbcr_conversion)( - self.handle, - ycbcr_conversion, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn create_descriptor_update_template( - &self, - create_info: &vk::DescriptorUpdateTemplateCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut descriptor_update_template = mem::MaybeUninit::uninit(); - (self.device_fn_1_1.create_descriptor_update_template)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - descriptor_update_template.as_mut_ptr(), - ) - .assume_init_on_success(descriptor_update_template) - } - - /// - #[inline] - pub unsafe fn destroy_descriptor_update_template( - &self, - descriptor_update_template: vk::DescriptorUpdateTemplate, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_1.destroy_descriptor_update_template)( - self.handle, - descriptor_update_template, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn update_descriptor_set_with_template( - &self, - descriptor_set: vk::DescriptorSet, - descriptor_update_template: vk::DescriptorUpdateTemplate, - data: *const ffi::c_void, - ) { - (self.device_fn_1_1.update_descriptor_set_with_template)( - self.handle, - descriptor_set, - descriptor_update_template, - data, - ) - } - - /// - #[inline] - pub unsafe fn get_descriptor_set_layout_support( - &self, - create_info: &vk::DescriptorSetLayoutCreateInfo<'_>, - out: &mut vk::DescriptorSetLayoutSupport<'_>, - ) { - (self.device_fn_1_1.get_descriptor_set_layout_support)(self.handle, create_info, out) - } -} - -/// Vulkan core 1.0 -impl Device { - #[inline] - pub fn fp_v1_0(&self) -> &crate::DeviceFnV1_0 { - &self.device_fn_1_0 - } - - /// - #[inline] - pub unsafe fn destroy_device(&self, allocation_callbacks: Option<&vk::AllocationCallbacks>) { - (self.device_fn_1_0.destroy_device)(self.handle, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn destroy_sampler( - &self, - sampler: vk::Sampler, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_sampler)( - self.handle, - sampler, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn free_memory( - &self, - memory: vk::DeviceMemory, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.free_memory)(self.handle, memory, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn free_command_buffers( - &self, - command_pool: vk::CommandPool, - command_buffers: &[vk::CommandBuffer], - ) { - (self.device_fn_1_0.free_command_buffers)( - self.handle, - command_pool, - command_buffers.len() as u32, - command_buffers.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn create_event( - &self, - create_info: &vk::EventCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut event = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_event)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - event.as_mut_ptr(), - ) - .assume_init_on_success(event) - } - - /// - /// - /// # Returns - /// Returns [`true`] if the event is _signaled_ ([`vk::Result::EVENT_SET`]), [`false`] if the - /// event is _unsignaled_ ([`vk::Result::EVENT_RESET`]), or [`Err`] on failure. - #[inline] - pub unsafe fn get_event_status(&self, event: vk::Event) -> VkResult { - let err_code = (self.device_fn_1_0.get_event_status)(self.handle, event); - match err_code { - vk::Result::EVENT_SET => Ok(true), - vk::Result::EVENT_RESET => Ok(false), - _ => Err(err_code), - } - } - - /// - #[inline] - pub unsafe fn set_event(&self, event: vk::Event) -> VkResult<()> { - (self.device_fn_1_0.set_event)(self.handle, event).result() - } - - /// - #[inline] - pub unsafe fn reset_event(&self, event: vk::Event) -> VkResult<()> { - (self.device_fn_1_0.reset_event)(self.handle, event).result() - } - /// - #[inline] - pub unsafe fn cmd_set_event( - &self, - command_buffer: vk::CommandBuffer, - event: vk::Event, - stage_mask: vk::PipelineStageFlags, - ) { - (self.device_fn_1_0.cmd_set_event)(command_buffer, event, stage_mask) - } - /// - #[inline] - pub unsafe fn cmd_reset_event( - &self, - command_buffer: vk::CommandBuffer, - event: vk::Event, - stage_mask: vk::PipelineStageFlags, - ) { - (self.device_fn_1_0.cmd_reset_event)(command_buffer, event, stage_mask) - } - - /// - #[inline] - pub unsafe fn cmd_wait_events( - &self, - command_buffer: vk::CommandBuffer, - events: &[vk::Event], - src_stage_mask: vk::PipelineStageFlags, - dst_stage_mask: vk::PipelineStageFlags, - memory_barriers: &[vk::MemoryBarrier<'_>], - buffer_memory_barriers: &[vk::BufferMemoryBarrier<'_>], - image_memory_barriers: &[vk::ImageMemoryBarrier<'_>], - ) { - (self.device_fn_1_0.cmd_wait_events)( - command_buffer, - events.len() as _, - events.as_ptr(), - src_stage_mask, - dst_stage_mask, - memory_barriers.len() as _, - memory_barriers.as_ptr(), - buffer_memory_barriers.len() as _, - buffer_memory_barriers.as_ptr(), - image_memory_barriers.len() as _, - image_memory_barriers.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_fence( - &self, - fence: vk::Fence, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_fence)(self.handle, fence, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn destroy_event( - &self, - event: vk::Event, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_event)(self.handle, event, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn destroy_image( - &self, - image: vk::Image, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_image)(self.handle, image, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn destroy_command_pool( - &self, - pool: vk::CommandPool, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_command_pool)( - self.handle, - pool, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_image_view( - &self, - image_view: vk::ImageView, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_image_view)( - self.handle, - image_view, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_render_pass( - &self, - renderpass: vk::RenderPass, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_render_pass)( - self.handle, - renderpass, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_framebuffer( - &self, - framebuffer: vk::Framebuffer, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_framebuffer)( - self.handle, - framebuffer, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_pipeline_layout( - &self, - pipeline_layout: vk::PipelineLayout, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_pipeline_layout)( - self.handle, - pipeline_layout, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_pipeline_cache( - &self, - pipeline_cache: vk::PipelineCache, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_pipeline_cache)( - self.handle, - pipeline_cache, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_buffer( - &self, - buffer: vk::Buffer, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_buffer)(self.handle, buffer, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn destroy_shader_module( - &self, - shader: vk::ShaderModule, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_shader_module)( - self.handle, - shader, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_pipeline( - &self, - pipeline: vk::Pipeline, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_pipeline)( - self.handle, - pipeline, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_semaphore( - &self, - semaphore: vk::Semaphore, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_semaphore)( - self.handle, - semaphore, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_descriptor_pool( - &self, - pool: vk::DescriptorPool, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_descriptor_pool)( - self.handle, - pool, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_query_pool( - &self, - pool: vk::QueryPool, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_query_pool)( - self.handle, - pool, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn destroy_descriptor_set_layout( - &self, - layout: vk::DescriptorSetLayout, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_descriptor_set_layout)( - self.handle, - layout, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn free_descriptor_sets( - &self, - pool: vk::DescriptorPool, - descriptor_sets: &[vk::DescriptorSet], - ) -> VkResult<()> { - (self.device_fn_1_0.free_descriptor_sets)( - self.handle, - pool, - descriptor_sets.len() as u32, - descriptor_sets.as_ptr(), - ) - .result() - } - - /// - #[inline] - pub unsafe fn update_descriptor_sets( - &self, - descriptor_writes: &[vk::WriteDescriptorSet<'_>], - descriptor_copies: &[vk::CopyDescriptorSet<'_>], - ) { - (self.device_fn_1_0.update_descriptor_sets)( - self.handle, - descriptor_writes.len() as u32, - descriptor_writes.as_ptr(), - descriptor_copies.len() as u32, - descriptor_copies.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn create_sampler( - &self, - create_info: &vk::SamplerCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut sampler = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_sampler)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - sampler.as_mut_ptr(), - ) - .assume_init_on_success(sampler) - } - - /// - #[inline] - pub unsafe fn cmd_blit_image( - &self, - command_buffer: vk::CommandBuffer, - src_image: vk::Image, - src_image_layout: vk::ImageLayout, - dst_image: vk::Image, - dst_image_layout: vk::ImageLayout, - regions: &[vk::ImageBlit], - filter: vk::Filter, - ) { - (self.device_fn_1_0.cmd_blit_image)( - command_buffer, - src_image, - src_image_layout, - dst_image, - dst_image_layout, - regions.len() as _, - regions.as_ptr(), - filter, - ) - } - - /// - #[inline] - pub unsafe fn cmd_resolve_image( - &self, - command_buffer: vk::CommandBuffer, - src_image: vk::Image, - src_image_layout: vk::ImageLayout, - dst_image: vk::Image, - dst_image_layout: vk::ImageLayout, - regions: &[vk::ImageResolve], - ) { - (self.device_fn_1_0.cmd_resolve_image)( - command_buffer, - src_image, - src_image_layout, - dst_image, - dst_image_layout, - regions.len() as u32, - regions.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_fill_buffer( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - size: vk::DeviceSize, - data: u32, - ) { - (self.device_fn_1_0.cmd_fill_buffer)(command_buffer, buffer, offset, size, data) - } - - /// - #[inline] - pub unsafe fn cmd_update_buffer( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - data: &[u8], - ) { - (self.device_fn_1_0.cmd_update_buffer)( - command_buffer, - buffer, - offset, - data.len() as u64, - data.as_ptr() as _, - ) - } - - /// - #[inline] - pub unsafe fn cmd_copy_buffer( - &self, - command_buffer: vk::CommandBuffer, - src_buffer: vk::Buffer, - dst_buffer: vk::Buffer, - regions: &[vk::BufferCopy], - ) { - (self.device_fn_1_0.cmd_copy_buffer)( - command_buffer, - src_buffer, - dst_buffer, - regions.len() as u32, - regions.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_copy_image_to_buffer( - &self, - command_buffer: vk::CommandBuffer, - src_image: vk::Image, - src_image_layout: vk::ImageLayout, - dst_buffer: vk::Buffer, - regions: &[vk::BufferImageCopy], - ) { - (self.device_fn_1_0.cmd_copy_image_to_buffer)( - command_buffer, - src_image, - src_image_layout, - dst_buffer, - regions.len() as u32, - regions.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_copy_buffer_to_image( - &self, - command_buffer: vk::CommandBuffer, - src_buffer: vk::Buffer, - dst_image: vk::Image, - dst_image_layout: vk::ImageLayout, - regions: &[vk::BufferImageCopy], - ) { - (self.device_fn_1_0.cmd_copy_buffer_to_image)( - command_buffer, - src_buffer, - dst_image, - dst_image_layout, - regions.len() as u32, - regions.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_copy_image( - &self, - command_buffer: vk::CommandBuffer, - src_image: vk::Image, - src_image_layout: vk::ImageLayout, - dst_image: vk::Image, - dst_image_layout: vk::ImageLayout, - regions: &[vk::ImageCopy], - ) { - (self.device_fn_1_0.cmd_copy_image)( - command_buffer, - src_image, - src_image_layout, - dst_image, - dst_image_layout, - regions.len() as u32, - regions.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn allocate_descriptor_sets( - &self, - allocate_info: &vk::DescriptorSetAllocateInfo<'_>, - ) -> VkResult> { - let mut desc_set = Vec::with_capacity(allocate_info.descriptor_set_count as usize); - (self.device_fn_1_0.allocate_descriptor_sets)( - self.handle, - allocate_info, - desc_set.as_mut_ptr(), - ) - .set_vec_len_on_success(desc_set, allocate_info.descriptor_set_count as usize) - } - - /// - #[inline] - pub unsafe fn create_descriptor_set_layout( - &self, - create_info: &vk::DescriptorSetLayoutCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut layout = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_descriptor_set_layout)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - layout.as_mut_ptr(), - ) - .assume_init_on_success(layout) - } - - /// - #[inline] - pub unsafe fn device_wait_idle(&self) -> VkResult<()> { - (self.device_fn_1_0.device_wait_idle)(self.handle).result() - } - - /// - #[inline] - pub unsafe fn create_descriptor_pool( - &self, - create_info: &vk::DescriptorPoolCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut pool = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_descriptor_pool)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - pool.as_mut_ptr(), - ) - .assume_init_on_success(pool) - } - - /// - #[inline] - pub unsafe fn reset_descriptor_pool( - &self, - pool: vk::DescriptorPool, - flags: vk::DescriptorPoolResetFlags, - ) -> VkResult<()> { - (self.device_fn_1_0.reset_descriptor_pool)(self.handle, pool, flags).result() - } - - /// - #[inline] - pub unsafe fn reset_command_pool( - &self, - command_pool: vk::CommandPool, - flags: vk::CommandPoolResetFlags, - ) -> VkResult<()> { - (self.device_fn_1_0.reset_command_pool)(self.handle, command_pool, flags).result() - } - - /// - #[inline] - pub unsafe fn reset_command_buffer( - &self, - command_buffer: vk::CommandBuffer, - flags: vk::CommandBufferResetFlags, - ) -> VkResult<()> { - (self.device_fn_1_0.reset_command_buffer)(command_buffer, flags).result() - } - - /// - #[inline] - pub unsafe fn reset_fences(&self, fences: &[vk::Fence]) -> VkResult<()> { - (self.device_fn_1_0.reset_fences)(self.handle, fences.len() as u32, fences.as_ptr()) - .result() - } - - /// - #[inline] - pub unsafe fn cmd_bind_index_buffer( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - index_type: vk::IndexType, - ) { - (self.device_fn_1_0.cmd_bind_index_buffer)(command_buffer, buffer, offset, index_type) - } - - /// - #[inline] - pub unsafe fn cmd_clear_color_image( - &self, - command_buffer: vk::CommandBuffer, - image: vk::Image, - image_layout: vk::ImageLayout, - clear_color_value: &vk::ClearColorValue, - ranges: &[vk::ImageSubresourceRange], - ) { - (self.device_fn_1_0.cmd_clear_color_image)( - command_buffer, - image, - image_layout, - clear_color_value, - ranges.len() as u32, - ranges.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_clear_depth_stencil_image( - &self, - command_buffer: vk::CommandBuffer, - image: vk::Image, - image_layout: vk::ImageLayout, - clear_depth_stencil_value: &vk::ClearDepthStencilValue, - ranges: &[vk::ImageSubresourceRange], - ) { - (self.device_fn_1_0.cmd_clear_depth_stencil_image)( - command_buffer, - image, - image_layout, - clear_depth_stencil_value, - ranges.len() as u32, - ranges.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_clear_attachments( - &self, - command_buffer: vk::CommandBuffer, - attachments: &[vk::ClearAttachment], - rects: &[vk::ClearRect], - ) { - (self.device_fn_1_0.cmd_clear_attachments)( - command_buffer, - attachments.len() as u32, - attachments.as_ptr(), - rects.len() as u32, - rects.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_draw_indexed( - &self, - command_buffer: vk::CommandBuffer, - index_count: u32, - instance_count: u32, - first_index: u32, - vertex_offset: i32, - first_instance: u32, - ) { - (self.device_fn_1_0.cmd_draw_indexed)( - command_buffer, - index_count, - instance_count, - first_index, - vertex_offset, - first_instance, - ) - } - - /// - #[inline] - pub unsafe fn cmd_draw_indexed_indirect( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - draw_count: u32, - stride: u32, - ) { - (self.device_fn_1_0.cmd_draw_indexed_indirect)( - command_buffer, - buffer, - offset, - draw_count, - stride, - ) - } - - /// - #[inline] - pub unsafe fn cmd_execute_commands( - &self, - primary_command_buffer: vk::CommandBuffer, - secondary_command_buffers: &[vk::CommandBuffer], - ) { - (self.device_fn_1_0.cmd_execute_commands)( - primary_command_buffer, - secondary_command_buffers.len() as u32, - secondary_command_buffers.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_bind_descriptor_sets( - &self, - command_buffer: vk::CommandBuffer, - pipeline_bind_point: vk::PipelineBindPoint, - layout: vk::PipelineLayout, - first_set: u32, - descriptor_sets: &[vk::DescriptorSet], - dynamic_offsets: &[u32], - ) { - (self.device_fn_1_0.cmd_bind_descriptor_sets)( - command_buffer, - pipeline_bind_point, - layout, - first_set, - descriptor_sets.len() as u32, - descriptor_sets.as_ptr(), - dynamic_offsets.len() as u32, - dynamic_offsets.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_copy_query_pool_results( - &self, - command_buffer: vk::CommandBuffer, - query_pool: vk::QueryPool, - first_query: u32, - query_count: u32, - dst_buffer: vk::Buffer, - dst_offset: vk::DeviceSize, - stride: vk::DeviceSize, - flags: vk::QueryResultFlags, - ) { - (self.device_fn_1_0.cmd_copy_query_pool_results)( - command_buffer, - query_pool, - first_query, - query_count, - dst_buffer, - dst_offset, - stride, - flags, - ) - } - - /// - #[inline] - pub unsafe fn cmd_push_constants( - &self, - command_buffer: vk::CommandBuffer, - layout: vk::PipelineLayout, - stage_flags: vk::ShaderStageFlags, - offset: u32, - constants: &[u8], - ) { - (self.device_fn_1_0.cmd_push_constants)( - command_buffer, - layout, - stage_flags, - offset, - constants.len() as _, - constants.as_ptr() as _, - ) - } - - /// - #[inline] - pub unsafe fn cmd_begin_render_pass( - &self, - command_buffer: vk::CommandBuffer, - render_pass_begin: &vk::RenderPassBeginInfo<'_>, - contents: vk::SubpassContents, - ) { - (self.device_fn_1_0.cmd_begin_render_pass)(command_buffer, render_pass_begin, contents) - } - - /// - #[inline] - pub unsafe fn cmd_next_subpass( - &self, - command_buffer: vk::CommandBuffer, - contents: vk::SubpassContents, - ) { - (self.device_fn_1_0.cmd_next_subpass)(command_buffer, contents) - } - - /// - #[inline] - pub unsafe fn cmd_bind_pipeline( - &self, - command_buffer: vk::CommandBuffer, - pipeline_bind_point: vk::PipelineBindPoint, - pipeline: vk::Pipeline, - ) { - (self.device_fn_1_0.cmd_bind_pipeline)(command_buffer, pipeline_bind_point, pipeline) - } - - /// - #[inline] - pub unsafe fn cmd_set_scissor( - &self, - command_buffer: vk::CommandBuffer, - first_scissor: u32, - scissors: &[vk::Rect2D], - ) { - (self.device_fn_1_0.cmd_set_scissor)( - command_buffer, - first_scissor, - scissors.len() as u32, - scissors.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_line_width(&self, command_buffer: vk::CommandBuffer, line_width: f32) { - (self.device_fn_1_0.cmd_set_line_width)(command_buffer, line_width) - } - - /// - #[inline] - pub unsafe fn cmd_bind_vertex_buffers( - &self, - command_buffer: vk::CommandBuffer, - first_binding: u32, - buffers: &[vk::Buffer], - offsets: &[vk::DeviceSize], - ) { - debug_assert_eq!(buffers.len(), offsets.len()); - (self.device_fn_1_0.cmd_bind_vertex_buffers)( - command_buffer, - first_binding, - buffers.len() as u32, - buffers.as_ptr(), - offsets.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_end_render_pass(&self, command_buffer: vk::CommandBuffer) { - (self.device_fn_1_0.cmd_end_render_pass)(command_buffer) - } - - /// - #[inline] - pub unsafe fn cmd_draw( - &self, - command_buffer: vk::CommandBuffer, - vertex_count: u32, - instance_count: u32, - first_vertex: u32, - first_instance: u32, - ) { - (self.device_fn_1_0.cmd_draw)( - command_buffer, - vertex_count, - instance_count, - first_vertex, - first_instance, - ) - } - - /// - #[inline] - pub unsafe fn cmd_draw_indirect( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - draw_count: u32, - stride: u32, - ) { - (self.device_fn_1_0.cmd_draw_indirect)(command_buffer, buffer, offset, draw_count, stride) - } - - /// - #[inline] - pub unsafe fn cmd_dispatch( - &self, - command_buffer: vk::CommandBuffer, - group_count_x: u32, - group_count_y: u32, - group_count_z: u32, - ) { - (self.device_fn_1_0.cmd_dispatch)( - command_buffer, - group_count_x, - group_count_y, - group_count_z, - ) - } - - /// - #[inline] - pub unsafe fn cmd_dispatch_indirect( - &self, - command_buffer: vk::CommandBuffer, - buffer: vk::Buffer, - offset: vk::DeviceSize, - ) { - (self.device_fn_1_0.cmd_dispatch_indirect)(command_buffer, buffer, offset) - } - - /// - #[inline] - pub unsafe fn cmd_set_viewport( - &self, - command_buffer: vk::CommandBuffer, - first_viewport: u32, - viewports: &[vk::Viewport], - ) { - (self.device_fn_1_0.cmd_set_viewport)( - command_buffer, - first_viewport, - viewports.len() as u32, - viewports.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_bias( - &self, - command_buffer: vk::CommandBuffer, - constant_factor: f32, - clamp: f32, - slope_factor: f32, - ) { - (self.device_fn_1_0.cmd_set_depth_bias)( - command_buffer, - constant_factor, - clamp, - slope_factor, - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_blend_constants( - &self, - command_buffer: vk::CommandBuffer, - blend_constants: &[f32; 4], - ) { - (self.device_fn_1_0.cmd_set_blend_constants)(command_buffer, blend_constants) - } - - /// - #[inline] - pub unsafe fn cmd_set_depth_bounds( - &self, - command_buffer: vk::CommandBuffer, - min_depth_bounds: f32, - max_depth_bounds: f32, - ) { - (self.device_fn_1_0.cmd_set_depth_bounds)( - command_buffer, - min_depth_bounds, - max_depth_bounds, - ) - } - - /// - #[inline] - pub unsafe fn cmd_set_stencil_compare_mask( - &self, - command_buffer: vk::CommandBuffer, - face_mask: vk::StencilFaceFlags, - compare_mask: u32, - ) { - (self.device_fn_1_0.cmd_set_stencil_compare_mask)(command_buffer, face_mask, compare_mask) - } - - /// - #[inline] - pub unsafe fn cmd_set_stencil_write_mask( - &self, - command_buffer: vk::CommandBuffer, - face_mask: vk::StencilFaceFlags, - write_mask: u32, - ) { - (self.device_fn_1_0.cmd_set_stencil_write_mask)(command_buffer, face_mask, write_mask) - } - - /// - #[inline] - pub unsafe fn cmd_set_stencil_reference( - &self, - command_buffer: vk::CommandBuffer, - face_mask: vk::StencilFaceFlags, - reference: u32, - ) { - (self.device_fn_1_0.cmd_set_stencil_reference)(command_buffer, face_mask, reference) - } - - /// - #[inline] - pub unsafe fn get_query_pool_results( - &self, - query_pool: vk::QueryPool, - first_query: u32, - data: &mut [T], - flags: vk::QueryResultFlags, - ) -> VkResult<()> { - let data_size = size_of_val(data); - (self.device_fn_1_0.get_query_pool_results)( - self.handle, - query_pool, - first_query, - data.len() as u32, - data_size, - data.as_mut_ptr().cast(), - size_of::() as _, - flags, - ) - .result() - } - - /// - #[inline] - pub unsafe fn cmd_begin_query( - &self, - command_buffer: vk::CommandBuffer, - query_pool: vk::QueryPool, - query: u32, - flags: vk::QueryControlFlags, - ) { - (self.device_fn_1_0.cmd_begin_query)(command_buffer, query_pool, query, flags) - } - - /// - #[inline] - pub unsafe fn cmd_end_query( - &self, - command_buffer: vk::CommandBuffer, - query_pool: vk::QueryPool, - query: u32, - ) { - (self.device_fn_1_0.cmd_end_query)(command_buffer, query_pool, query) - } - - /// - #[inline] - pub unsafe fn cmd_reset_query_pool( - &self, - command_buffer: vk::CommandBuffer, - pool: vk::QueryPool, - first_query: u32, - query_count: u32, - ) { - (self.device_fn_1_0.cmd_reset_query_pool)(command_buffer, pool, first_query, query_count) - } - - /// - #[inline] - pub unsafe fn cmd_write_timestamp( - &self, - command_buffer: vk::CommandBuffer, - pipeline_stage: vk::PipelineStageFlagBits, - query_pool: vk::QueryPool, - query: u32, - ) { - (self.device_fn_1_0.cmd_write_timestamp)(command_buffer, pipeline_stage, query_pool, query) - } - - /// - #[inline] - pub unsafe fn create_semaphore( - &self, - create_info: &vk::SemaphoreCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut semaphore = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_semaphore)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - semaphore.as_mut_ptr(), - ) - .assume_init_on_success(semaphore) - } - - /// - /// - /// Pipelines are created and returned as described for [Multiple Pipeline Creation]. - /// - /// [Multiple Pipeline Creation]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-multiple - #[inline] - pub unsafe fn create_graphics_pipelines( - &self, - pipeline_cache: vk::PipelineCache, - create_infos: &[vk::GraphicsPipelineCreateInfo<'_>], - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> Result, (Vec, vk::Result)> { - let mut pipelines = Vec::with_capacity(create_infos.len()); - let err_code = (self.device_fn_1_0.create_graphics_pipelines)( - self.handle, - pipeline_cache, - create_infos.len() as u32, - create_infos.as_ptr(), - allocation_callbacks.to_raw_ptr(), - pipelines.as_mut_ptr(), - ); - pipelines.set_len(create_infos.len()); - match err_code { - vk::Result::SUCCESS => Ok(pipelines), - _ => Err((pipelines, err_code)), - } - } - - /// - /// - /// Pipelines are created and returned as described for [Multiple Pipeline Creation]. - /// - /// [Multiple Pipeline Creation]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-multiple - #[inline] - pub unsafe fn create_compute_pipelines( - &self, - pipeline_cache: vk::PipelineCache, - create_infos: &[vk::ComputePipelineCreateInfo<'_>], - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> Result, (Vec, vk::Result)> { - let mut pipelines = Vec::with_capacity(create_infos.len()); - let err_code = (self.device_fn_1_0.create_compute_pipelines)( - self.handle, - pipeline_cache, - create_infos.len() as u32, - create_infos.as_ptr(), - allocation_callbacks.to_raw_ptr(), - pipelines.as_mut_ptr(), - ); - pipelines.set_len(create_infos.len()); - match err_code { - vk::Result::SUCCESS => Ok(pipelines), - _ => Err((pipelines, err_code)), - } - } - - /// - #[inline] - pub unsafe fn create_buffer( - &self, - create_info: &vk::BufferCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut buffer = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_buffer)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - buffer.as_mut_ptr(), - ) - .assume_init_on_success(buffer) - } - - /// - #[inline] - pub unsafe fn create_pipeline_layout( - &self, - create_info: &vk::PipelineLayoutCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut pipeline_layout = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_pipeline_layout)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - pipeline_layout.as_mut_ptr(), - ) - .assume_init_on_success(pipeline_layout) - } - - /// - #[inline] - pub unsafe fn create_pipeline_cache( - &self, - create_info: &vk::PipelineCacheCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut pipeline_cache = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_pipeline_cache)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - pipeline_cache.as_mut_ptr(), - ) - .assume_init_on_success(pipeline_cache) - } - - /// - #[inline] - pub unsafe fn get_pipeline_cache_data( - &self, - pipeline_cache: vk::PipelineCache, - ) -> VkResult> { - read_into_uninitialized_vector(|count, data: *mut u8| { - (self.device_fn_1_0.get_pipeline_cache_data)( - self.handle, - pipeline_cache, - count, - data.cast(), - ) - }) - } - - /// - #[inline] - pub unsafe fn merge_pipeline_caches( - &self, - dst_cache: vk::PipelineCache, - src_caches: &[vk::PipelineCache], - ) -> VkResult<()> { - (self.device_fn_1_0.merge_pipeline_caches)( - self.handle, - dst_cache, - src_caches.len() as u32, - src_caches.as_ptr(), - ) - .result() - } - - /// - #[inline] - pub unsafe fn map_memory( - &self, - memory: vk::DeviceMemory, - offset: vk::DeviceSize, - size: vk::DeviceSize, - flags: vk::MemoryMapFlags, - ) -> VkResult<*mut ffi::c_void> { - let mut data = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.map_memory)(self.handle, memory, offset, size, flags, data.as_mut_ptr()) - .assume_init_on_success(data) - } - - /// - #[inline] - pub unsafe fn unmap_memory(&self, memory: vk::DeviceMemory) { - (self.device_fn_1_0.unmap_memory)(self.handle, memory) - } - - /// - #[inline] - pub unsafe fn invalidate_mapped_memory_ranges( - &self, - ranges: &[vk::MappedMemoryRange<'_>], - ) -> VkResult<()> { - (self.device_fn_1_0.invalidate_mapped_memory_ranges)( - self.handle, - ranges.len() as u32, - ranges.as_ptr(), - ) - .result() - } - - /// - #[inline] - pub unsafe fn flush_mapped_memory_ranges( - &self, - ranges: &[vk::MappedMemoryRange<'_>], - ) -> VkResult<()> { - (self.device_fn_1_0.flush_mapped_memory_ranges)( - self.handle, - ranges.len() as u32, - ranges.as_ptr(), - ) - .result() - } - - /// - #[inline] - pub unsafe fn create_framebuffer( - &self, - create_info: &vk::FramebufferCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut framebuffer = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_framebuffer)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - framebuffer.as_mut_ptr(), - ) - .assume_init_on_success(framebuffer) - } - - /// - #[inline] - pub unsafe fn get_device_queue(&self, queue_family_index: u32, queue_index: u32) -> vk::Queue { - let mut queue = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.get_device_queue)( - self.handle, - queue_family_index, - queue_index, - queue.as_mut_ptr(), - ); - queue.assume_init() - } - - /// - #[inline] - pub unsafe fn cmd_pipeline_barrier( - &self, - command_buffer: vk::CommandBuffer, - src_stage_mask: vk::PipelineStageFlags, - dst_stage_mask: vk::PipelineStageFlags, - dependency_flags: vk::DependencyFlags, - memory_barriers: &[vk::MemoryBarrier<'_>], - buffer_memory_barriers: &[vk::BufferMemoryBarrier<'_>], - image_memory_barriers: &[vk::ImageMemoryBarrier<'_>], - ) { - (self.device_fn_1_0.cmd_pipeline_barrier)( - command_buffer, - src_stage_mask, - dst_stage_mask, - dependency_flags, - memory_barriers.len() as u32, - memory_barriers.as_ptr(), - buffer_memory_barriers.len() as u32, - buffer_memory_barriers.as_ptr(), - image_memory_barriers.len() as u32, - image_memory_barriers.as_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn create_render_pass( - &self, - create_info: &vk::RenderPassCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut renderpass = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_render_pass)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - renderpass.as_mut_ptr(), - ) - .assume_init_on_success(renderpass) - } - - /// - #[inline] - pub unsafe fn begin_command_buffer( - &self, - command_buffer: vk::CommandBuffer, - begin_info: &vk::CommandBufferBeginInfo<'_>, - ) -> VkResult<()> { - (self.device_fn_1_0.begin_command_buffer)(command_buffer, begin_info).result() - } - - /// - #[inline] - pub unsafe fn end_command_buffer(&self, command_buffer: vk::CommandBuffer) -> VkResult<()> { - (self.device_fn_1_0.end_command_buffer)(command_buffer).result() - } - - /// - #[inline] - pub unsafe fn wait_for_fences( - &self, - fences: &[vk::Fence], - wait_all: bool, - timeout: u64, - ) -> VkResult<()> { - (self.device_fn_1_0.wait_for_fences)( - self.handle, - fences.len() as u32, - fences.as_ptr(), - wait_all as u32, - timeout, - ) - .result() - } - - /// - /// - /// # Returns - /// Returns [`true`] if the fence is _signaled_ ([`vk::Result::SUCCESS`]), [`false`] if the - /// fence is _unsignaled_ ([`vk::Result::NOT_READY`]), or [`Err`] on failure. - #[inline] - pub unsafe fn get_fence_status(&self, fence: vk::Fence) -> VkResult { - let err_code = (self.device_fn_1_0.get_fence_status)(self.handle, fence); - match err_code { - vk::Result::SUCCESS => Ok(true), - vk::Result::NOT_READY => Ok(false), - _ => Err(err_code), - } - } - - /// - #[inline] - pub unsafe fn queue_wait_idle(&self, queue: vk::Queue) -> VkResult<()> { - (self.device_fn_1_0.queue_wait_idle)(queue).result() - } - - /// - #[inline] - pub unsafe fn queue_submit( - &self, - queue: vk::Queue, - submits: &[vk::SubmitInfo<'_>], - fence: vk::Fence, - ) -> VkResult<()> { - (self.device_fn_1_0.queue_submit)(queue, submits.len() as u32, submits.as_ptr(), fence) - .result() - } - - /// - #[inline] - pub unsafe fn queue_bind_sparse( - &self, - queue: vk::Queue, - bind_info: &[vk::BindSparseInfo<'_>], - fence: vk::Fence, - ) -> VkResult<()> { - (self.device_fn_1_0.queue_bind_sparse)( - queue, - bind_info.len() as u32, - bind_info.as_ptr(), - fence, - ) - .result() - } - - /// - #[inline] - pub unsafe fn create_buffer_view( - &self, - create_info: &vk::BufferViewCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut buffer_view = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_buffer_view)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - buffer_view.as_mut_ptr(), - ) - .assume_init_on_success(buffer_view) - } - - /// - #[inline] - pub unsafe fn destroy_buffer_view( - &self, - buffer_view: vk::BufferView, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) { - (self.device_fn_1_0.destroy_buffer_view)( - self.handle, - buffer_view, - allocation_callbacks.to_raw_ptr(), - ) - } - - /// - #[inline] - pub unsafe fn create_image_view( - &self, - create_info: &vk::ImageViewCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut image_view = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_image_view)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - image_view.as_mut_ptr(), - ) - .assume_init_on_success(image_view) - } - - /// - #[inline] - pub unsafe fn allocate_command_buffers( - &self, - allocate_info: &vk::CommandBufferAllocateInfo<'_>, - ) -> VkResult> { - let mut buffers = Vec::with_capacity(allocate_info.command_buffer_count as usize); - (self.device_fn_1_0.allocate_command_buffers)( - self.handle, - allocate_info, - buffers.as_mut_ptr(), - ) - .set_vec_len_on_success(buffers, allocate_info.command_buffer_count as usize) - } - - /// - #[inline] - pub unsafe fn create_command_pool( - &self, - create_info: &vk::CommandPoolCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut pool = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_command_pool)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - pool.as_mut_ptr(), - ) - .assume_init_on_success(pool) - } - - /// - #[inline] - pub unsafe fn create_query_pool( - &self, - create_info: &vk::QueryPoolCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut pool = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_query_pool)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - pool.as_mut_ptr(), - ) - .assume_init_on_success(pool) - } - - /// - #[inline] - pub unsafe fn create_image( - &self, - create_info: &vk::ImageCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut image = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_image)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - image.as_mut_ptr(), - ) - .assume_init_on_success(image) - } - - /// - #[inline] - pub unsafe fn get_image_subresource_layout( - &self, - image: vk::Image, - subresource: vk::ImageSubresource, - ) -> vk::SubresourceLayout { - let mut layout = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.get_image_subresource_layout)( - self.handle, - image, - &subresource, - layout.as_mut_ptr(), - ); - layout.assume_init() - } - - /// - #[inline] - pub unsafe fn get_image_memory_requirements(&self, image: vk::Image) -> vk::MemoryRequirements { - let mut mem_req = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.get_image_memory_requirements)( - self.handle, - image, - mem_req.as_mut_ptr(), - ); - mem_req.assume_init() - } - - /// - #[inline] - pub unsafe fn get_buffer_memory_requirements( - &self, - buffer: vk::Buffer, - ) -> vk::MemoryRequirements { - let mut mem_req = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.get_buffer_memory_requirements)( - self.handle, - buffer, - mem_req.as_mut_ptr(), - ); - mem_req.assume_init() - } - - /// - #[inline] - pub unsafe fn allocate_memory( - &self, - allocate_info: &vk::MemoryAllocateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut memory = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.allocate_memory)( - self.handle, - allocate_info, - allocation_callbacks.to_raw_ptr(), - memory.as_mut_ptr(), - ) - .assume_init_on_success(memory) - } - - /// - #[inline] - pub unsafe fn create_shader_module( - &self, - create_info: &vk::ShaderModuleCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut shader = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_shader_module)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - shader.as_mut_ptr(), - ) - .assume_init_on_success(shader) - } - - /// - #[inline] - pub unsafe fn create_fence( - &self, - create_info: &vk::FenceCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut fence = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.create_fence)( - self.handle, - create_info, - allocation_callbacks.to_raw_ptr(), - fence.as_mut_ptr(), - ) - .assume_init_on_success(fence) - } - - /// - #[inline] - pub unsafe fn bind_buffer_memory( - &self, - buffer: vk::Buffer, - device_memory: vk::DeviceMemory, - offset: vk::DeviceSize, - ) -> VkResult<()> { - (self.device_fn_1_0.bind_buffer_memory)(self.handle, buffer, device_memory, offset).result() - } - - /// - #[inline] - pub unsafe fn bind_image_memory( - &self, - image: vk::Image, - device_memory: vk::DeviceMemory, - offset: vk::DeviceSize, - ) -> VkResult<()> { - (self.device_fn_1_0.bind_image_memory)(self.handle, image, device_memory, offset).result() - } - - /// - #[inline] - pub unsafe fn get_render_area_granularity(&self, render_pass: vk::RenderPass) -> vk::Extent2D { - let mut granularity = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.get_render_area_granularity)( - self.handle, - render_pass, - granularity.as_mut_ptr(), - ); - granularity.assume_init() - } - - /// - #[inline] - pub unsafe fn get_device_memory_commitment(&self, memory: vk::DeviceMemory) -> vk::DeviceSize { - let mut committed_memory_in_bytes = mem::MaybeUninit::uninit(); - (self.device_fn_1_0.get_device_memory_commitment)( - self.handle, - memory, - committed_memory_in_bytes.as_mut_ptr(), - ); - committed_memory_in_bytes.assume_init() - } - - /// - #[inline] - pub unsafe fn get_image_sparse_memory_requirements( - &self, - image: vk::Image, - ) -> Vec { - read_into_uninitialized_vector(|count, data| { - (self.device_fn_1_0.get_image_sparse_memory_requirements)( - self.handle, - image, - count, - data, - ); - vk::Result::SUCCESS - }) - // The closure always returns SUCCESS - .unwrap() - } -} +#![allow( + clippy::trivially_copy_pass_by_ref, + clippy::missing_safety_doc, + clippy::too_many_arguments +)] +use crate::read_into_uninitialized_vector; +use crate::vk; +use crate::RawPtr; +use crate::VkResult; +use alloc::vec::Vec; +use core::ffi; +use core::mem; +use core::mem::{size_of, size_of_val}; // TODO: Remove when bumping MSRV to 1.80 +use core::ptr; + +/// +#[derive(Clone)] +pub struct Device { + pub(crate) handle: vk::Device, + + pub(crate) device_fn_1_0: crate::DeviceFnV1_0, + pub(crate) device_fn_1_1: crate::DeviceFnV1_1, + pub(crate) device_fn_1_2: crate::DeviceFnV1_2, + pub(crate) device_fn_1_3: crate::DeviceFnV1_3, +} + +impl Device { + pub unsafe fn load(instance_fn: &crate::InstanceFnV1_0, device: vk::Device) -> Self { + Self::load_with( + |name| mem::transmute((instance_fn.get_device_proc_addr)(device, name.as_ptr())), + device, + ) + } + + pub unsafe fn load_with( + mut load_fn: impl FnMut(&ffi::CStr) -> *const ffi::c_void, + device: vk::Device, + ) -> Self { + Self::from_parts_1_3( + device, + crate::DeviceFnV1_0::load(&mut load_fn), + crate::DeviceFnV1_1::load(&mut load_fn), + crate::DeviceFnV1_2::load(&mut load_fn), + crate::DeviceFnV1_3::load(&mut load_fn), + ) + } + + #[inline] + pub fn from_parts_1_3( + handle: vk::Device, + device_fn_1_0: crate::DeviceFnV1_0, + device_fn_1_1: crate::DeviceFnV1_1, + device_fn_1_2: crate::DeviceFnV1_2, + device_fn_1_3: crate::DeviceFnV1_3, + ) -> Self { + Self { + handle, + + device_fn_1_0, + device_fn_1_1, + device_fn_1_2, + device_fn_1_3, + } + } + + #[inline] + pub fn handle(&self) -> vk::Device { + self.handle + } +} + +/// Vulkan core 1.3 +impl Device { + #[inline] + pub fn fp_v1_3(&self) -> &crate::DeviceFnV1_3 { + &self.device_fn_1_3 + } + + /// + #[inline] + pub unsafe fn create_private_data_slot( + &self, + create_info: &vk::PrivateDataSlotCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut private_data_slot = mem::MaybeUninit::uninit(); + (self.device_fn_1_3.create_private_data_slot)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + private_data_slot.as_mut_ptr(), + ) + .assume_init_on_success(private_data_slot) + } + + /// + #[inline] + pub unsafe fn destroy_private_data_slot( + &self, + private_data_slot: vk::PrivateDataSlot, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_3.destroy_private_data_slot)( + self.handle, + private_data_slot, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn set_private_data( + &self, + object: T, + private_data_slot: vk::PrivateDataSlot, + data: u64, + ) -> VkResult<()> { + (self.device_fn_1_3.set_private_data)( + self.handle, + T::TYPE, + object.as_raw(), + private_data_slot, + data, + ) + .result() + } + + /// + #[inline] + pub unsafe fn get_private_data( + &self, + object: T, + private_data_slot: vk::PrivateDataSlot, + ) -> u64 { + let mut data = mem::MaybeUninit::uninit(); + (self.device_fn_1_3.get_private_data)( + self.handle, + T::TYPE, + object.as_raw(), + private_data_slot, + data.as_mut_ptr(), + ); + data.assume_init() + } + + /// + #[inline] + pub unsafe fn cmd_pipeline_barrier2( + &self, + command_buffer: vk::CommandBuffer, + dependency_info: &vk::DependencyInfo<'_>, + ) { + (self.device_fn_1_3.cmd_pipeline_barrier2)(command_buffer, dependency_info) + } + + /// + #[inline] + pub unsafe fn cmd_reset_event2( + &self, + command_buffer: vk::CommandBuffer, + event: vk::Event, + stage_mask: vk::PipelineStageFlags2, + ) { + (self.device_fn_1_3.cmd_reset_event2)(command_buffer, event, stage_mask) + } + + /// + #[inline] + pub unsafe fn cmd_set_event2( + &self, + command_buffer: vk::CommandBuffer, + event: vk::Event, + dependency_info: &vk::DependencyInfo<'_>, + ) { + (self.device_fn_1_3.cmd_set_event2)(command_buffer, event, dependency_info) + } + + /// + #[inline] + pub unsafe fn cmd_wait_events2( + &self, + command_buffer: vk::CommandBuffer, + events: &[vk::Event], + dependency_infos: &[vk::DependencyInfo<'_>], + ) { + assert_eq!(events.len(), dependency_infos.len()); + (self.device_fn_1_3.cmd_wait_events2)( + command_buffer, + events.len() as u32, + events.as_ptr(), + dependency_infos.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_write_timestamp2( + &self, + command_buffer: vk::CommandBuffer, + stage: vk::PipelineStageFlags2, + query_pool: vk::QueryPool, + query: u32, + ) { + (self.device_fn_1_3.cmd_write_timestamp2)(command_buffer, stage, query_pool, query) + } + + /// + #[inline] + pub unsafe fn queue_submit2( + &self, + queue: vk::Queue, + submits: &[vk::SubmitInfo2<'_>], + fence: vk::Fence, + ) -> VkResult<()> { + (self.device_fn_1_3.queue_submit2)(queue, submits.len() as u32, submits.as_ptr(), fence) + .result() + } + + /// + #[inline] + pub unsafe fn cmd_copy_buffer2( + &self, + command_buffer: vk::CommandBuffer, + copy_buffer_info: &vk::CopyBufferInfo2<'_>, + ) { + (self.device_fn_1_3.cmd_copy_buffer2)(command_buffer, copy_buffer_info) + } + /// + #[inline] + pub unsafe fn cmd_copy_image2( + &self, + command_buffer: vk::CommandBuffer, + copy_image_info: &vk::CopyImageInfo2<'_>, + ) { + (self.device_fn_1_3.cmd_copy_image2)(command_buffer, copy_image_info) + } + /// + #[inline] + pub unsafe fn cmd_copy_buffer_to_image2( + &self, + command_buffer: vk::CommandBuffer, + copy_buffer_to_image_info: &vk::CopyBufferToImageInfo2<'_>, + ) { + (self.device_fn_1_3.cmd_copy_buffer_to_image2)(command_buffer, copy_buffer_to_image_info) + } + /// + #[inline] + pub unsafe fn cmd_copy_image_to_buffer2( + &self, + command_buffer: vk::CommandBuffer, + copy_image_to_buffer_info: &vk::CopyImageToBufferInfo2<'_>, + ) { + (self.device_fn_1_3.cmd_copy_image_to_buffer2)(command_buffer, copy_image_to_buffer_info) + } + /// + #[inline] + pub unsafe fn cmd_blit_image2( + &self, + command_buffer: vk::CommandBuffer, + blit_image_info: &vk::BlitImageInfo2<'_>, + ) { + (self.device_fn_1_3.cmd_blit_image2)(command_buffer, blit_image_info) + } + /// + #[inline] + pub unsafe fn cmd_resolve_image2( + &self, + command_buffer: vk::CommandBuffer, + resolve_image_info: &vk::ResolveImageInfo2<'_>, + ) { + (self.device_fn_1_3.cmd_resolve_image2)(command_buffer, resolve_image_info) + } + + /// + #[inline] + pub unsafe fn cmd_begin_rendering( + &self, + command_buffer: vk::CommandBuffer, + rendering_info: &vk::RenderingInfo<'_>, + ) { + (self.device_fn_1_3.cmd_begin_rendering)(command_buffer, rendering_info) + } + + /// + #[inline] + pub unsafe fn cmd_end_rendering(&self, command_buffer: vk::CommandBuffer) { + (self.device_fn_1_3.cmd_end_rendering)(command_buffer) + } + + /// + #[inline] + pub unsafe fn cmd_set_cull_mode( + &self, + command_buffer: vk::CommandBuffer, + cull_mode: vk::CullModeFlags, + ) { + (self.device_fn_1_3.cmd_set_cull_mode)(command_buffer, cull_mode) + } + + /// + #[inline] + pub unsafe fn cmd_set_front_face( + &self, + command_buffer: vk::CommandBuffer, + front_face: vk::FrontFace, + ) { + (self.device_fn_1_3.cmd_set_front_face)(command_buffer, front_face) + } + + /// + #[inline] + pub unsafe fn cmd_set_primitive_topology( + &self, + command_buffer: vk::CommandBuffer, + primitive_topology: vk::PrimitiveTopology, + ) { + (self.device_fn_1_3.cmd_set_primitive_topology)(command_buffer, primitive_topology) + } + + /// + #[inline] + pub unsafe fn cmd_set_viewport_with_count( + &self, + command_buffer: vk::CommandBuffer, + viewports: &[vk::Viewport], + ) { + (self.device_fn_1_3.cmd_set_viewport_with_count)( + command_buffer, + viewports.len() as u32, + viewports.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_scissor_with_count( + &self, + command_buffer: vk::CommandBuffer, + scissors: &[vk::Rect2D], + ) { + (self.device_fn_1_3.cmd_set_scissor_with_count)( + command_buffer, + scissors.len() as u32, + scissors.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_bind_vertex_buffers2( + &self, + command_buffer: vk::CommandBuffer, + first_binding: u32, + buffers: &[vk::Buffer], + offsets: &[vk::DeviceSize], + sizes: Option<&[vk::DeviceSize]>, + strides: Option<&[vk::DeviceSize]>, + ) { + assert_eq!(offsets.len(), buffers.len()); + let p_sizes = if let Some(sizes) = sizes { + assert_eq!(sizes.len(), buffers.len()); + sizes.as_ptr() + } else { + ptr::null() + }; + let p_strides = if let Some(strides) = strides { + assert_eq!(strides.len(), buffers.len()); + strides.as_ptr() + } else { + ptr::null() + }; + (self.device_fn_1_3.cmd_bind_vertex_buffers2)( + command_buffer, + first_binding, + buffers.len() as u32, + buffers.as_ptr(), + offsets.as_ptr(), + p_sizes, + p_strides, + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_test_enable( + &self, + command_buffer: vk::CommandBuffer, + depth_test_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_depth_test_enable)(command_buffer, depth_test_enable.into()) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_write_enable( + &self, + command_buffer: vk::CommandBuffer, + depth_write_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_depth_write_enable)(command_buffer, depth_write_enable.into()) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_compare_op( + &self, + command_buffer: vk::CommandBuffer, + depth_compare_op: vk::CompareOp, + ) { + (self.device_fn_1_3.cmd_set_depth_compare_op)(command_buffer, depth_compare_op) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_bounds_test_enable( + &self, + command_buffer: vk::CommandBuffer, + depth_bounds_test_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_depth_bounds_test_enable)( + command_buffer, + depth_bounds_test_enable.into(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_stencil_test_enable( + &self, + command_buffer: vk::CommandBuffer, + stencil_test_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_stencil_test_enable)(command_buffer, stencil_test_enable.into()) + } + + /// + #[inline] + pub unsafe fn cmd_set_stencil_op( + &self, + command_buffer: vk::CommandBuffer, + face_mask: vk::StencilFaceFlags, + fail_op: vk::StencilOp, + pass_op: vk::StencilOp, + depth_fail_op: vk::StencilOp, + compare_op: vk::CompareOp, + ) { + (self.device_fn_1_3.cmd_set_stencil_op)( + command_buffer, + face_mask, + fail_op, + pass_op, + depth_fail_op, + compare_op, + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_rasterizer_discard_enable( + &self, + command_buffer: vk::CommandBuffer, + rasterizer_discard_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_rasterizer_discard_enable)( + command_buffer, + rasterizer_discard_enable.into(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_bias_enable( + &self, + command_buffer: vk::CommandBuffer, + depth_bias_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_depth_bias_enable)(command_buffer, depth_bias_enable.into()) + } + + /// + #[inline] + pub unsafe fn cmd_set_primitive_restart_enable( + &self, + command_buffer: vk::CommandBuffer, + primitive_restart_enable: bool, + ) { + (self.device_fn_1_3.cmd_set_primitive_restart_enable)( + command_buffer, + primitive_restart_enable.into(), + ) + } + + /// + #[inline] + pub unsafe fn get_device_buffer_memory_requirements( + &self, + memory_requirements: &vk::DeviceBufferMemoryRequirements<'_>, + out: &mut vk::MemoryRequirements2<'_>, + ) { + (self.device_fn_1_3.get_device_buffer_memory_requirements)( + self.handle, + memory_requirements, + out, + ) + } + + /// + #[inline] + pub unsafe fn get_device_image_memory_requirements( + &self, + memory_requirements: &vk::DeviceImageMemoryRequirements<'_>, + out: &mut vk::MemoryRequirements2<'_>, + ) { + (self.device_fn_1_3.get_device_image_memory_requirements)( + self.handle, + memory_requirements, + out, + ) + } + + /// Retrieve the number of elements to pass to [`get_device_image_sparse_memory_requirements()`][Self::get_device_image_sparse_memory_requirements()] + #[inline] + pub unsafe fn get_device_image_sparse_memory_requirements_len( + &self, + memory_requirements: &vk::DeviceImageMemoryRequirements<'_>, + ) -> usize { + let mut count = mem::MaybeUninit::uninit(); + (self + .device_fn_1_3 + .get_device_image_sparse_memory_requirements)( + self.handle, + memory_requirements, + count.as_mut_ptr(), + ptr::null_mut(), + ); + count.assume_init() as usize + } + + /// + /// + /// Call [`get_device_image_sparse_memory_requirements_len()`][Self::get_device_image_sparse_memory_requirements_len()] to query the number of elements to pass to `out`. + /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. + #[inline] + pub unsafe fn get_device_image_sparse_memory_requirements( + &self, + memory_requirements: &vk::DeviceImageMemoryRequirements<'_>, + out: &mut [vk::SparseImageMemoryRequirements2<'_>], + ) { + let mut count = out.len() as u32; + (self + .device_fn_1_3 + .get_device_image_sparse_memory_requirements)( + self.handle, + memory_requirements, + &mut count, + out.as_mut_ptr(), + ); + assert_eq!(count as usize, out.len()); + } +} + +/// Vulkan core 1.2 +impl Device { + #[inline] + pub fn fp_v1_2(&self) -> &crate::DeviceFnV1_2 { + &self.device_fn_1_2 + } + + /// + #[inline] + pub unsafe fn cmd_draw_indirect_count( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + count_buffer: vk::Buffer, + count_buffer_offset: vk::DeviceSize, + max_draw_count: u32, + stride: u32, + ) { + (self.device_fn_1_2.cmd_draw_indirect_count)( + command_buffer, + buffer, + offset, + count_buffer, + count_buffer_offset, + max_draw_count, + stride, + ) + } + + /// + #[inline] + pub unsafe fn cmd_draw_indexed_indirect_count( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + count_buffer: vk::Buffer, + count_buffer_offset: vk::DeviceSize, + max_draw_count: u32, + stride: u32, + ) { + (self.device_fn_1_2.cmd_draw_indexed_indirect_count)( + command_buffer, + buffer, + offset, + count_buffer, + count_buffer_offset, + max_draw_count, + stride, + ) + } + + /// + #[inline] + pub unsafe fn create_render_pass2( + &self, + create_info: &vk::RenderPassCreateInfo2<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut renderpass = mem::MaybeUninit::uninit(); + (self.device_fn_1_2.create_render_pass2)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + renderpass.as_mut_ptr(), + ) + .assume_init_on_success(renderpass) + } + + /// + #[inline] + pub unsafe fn cmd_begin_render_pass2( + &self, + command_buffer: vk::CommandBuffer, + render_pass_begin_info: &vk::RenderPassBeginInfo<'_>, + subpass_begin_info: &vk::SubpassBeginInfo<'_>, + ) { + (self.device_fn_1_2.cmd_begin_render_pass2)( + command_buffer, + render_pass_begin_info, + subpass_begin_info, + ) + } + + /// + #[inline] + pub unsafe fn cmd_next_subpass2( + &self, + command_buffer: vk::CommandBuffer, + subpass_begin_info: &vk::SubpassBeginInfo<'_>, + subpass_end_info: &vk::SubpassEndInfo<'_>, + ) { + (self.device_fn_1_2.cmd_next_subpass2)(command_buffer, subpass_begin_info, subpass_end_info) + } + + /// + #[inline] + pub unsafe fn cmd_end_render_pass2( + &self, + command_buffer: vk::CommandBuffer, + subpass_end_info: &vk::SubpassEndInfo<'_>, + ) { + (self.device_fn_1_2.cmd_end_render_pass2)(command_buffer, subpass_end_info) + } + + /// + #[inline] + pub unsafe fn reset_query_pool( + &self, + query_pool: vk::QueryPool, + first_query: u32, + query_count: u32, + ) { + (self.device_fn_1_2.reset_query_pool)(self.handle, query_pool, first_query, query_count) + } + + /// + #[inline] + pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult { + let mut value = mem::MaybeUninit::uninit(); + (self.device_fn_1_2.get_semaphore_counter_value)(self.handle, semaphore, value.as_mut_ptr()) + .assume_init_on_success(value) + } + + /// + #[inline] + pub unsafe fn wait_semaphores( + &self, + wait_info: &vk::SemaphoreWaitInfo<'_>, + timeout: u64, + ) -> VkResult<()> { + (self.device_fn_1_2.wait_semaphores)(self.handle, wait_info, timeout).result() + } + + /// + #[inline] + pub unsafe fn signal_semaphore( + &self, + signal_info: &vk::SemaphoreSignalInfo<'_>, + ) -> VkResult<()> { + (self.device_fn_1_2.signal_semaphore)(self.handle, signal_info).result() + } + + /// + #[inline] + pub unsafe fn get_buffer_device_address( + &self, + info: &vk::BufferDeviceAddressInfo<'_>, + ) -> vk::DeviceAddress { + (self.device_fn_1_2.get_buffer_device_address)(self.handle, info) + } + + /// + #[inline] + pub unsafe fn get_buffer_opaque_capture_address( + &self, + info: &vk::BufferDeviceAddressInfo<'_>, + ) -> u64 { + (self.device_fn_1_2.get_buffer_opaque_capture_address)(self.handle, info) + } + + /// + #[inline] + pub unsafe fn get_device_memory_opaque_capture_address( + &self, + info: &vk::DeviceMemoryOpaqueCaptureAddressInfo<'_>, + ) -> u64 { + (self.device_fn_1_2.get_device_memory_opaque_capture_address)(self.handle, info) + } +} + +/// Vulkan core 1.1 +impl Device { + #[inline] + pub fn fp_v1_1(&self) -> &crate::DeviceFnV1_1 { + &self.device_fn_1_1 + } + + /// + #[inline] + pub unsafe fn bind_buffer_memory2( + &self, + bind_infos: &[vk::BindBufferMemoryInfo<'_>], + ) -> VkResult<()> { + (self.device_fn_1_1.bind_buffer_memory2)( + self.handle, + bind_infos.len() as _, + bind_infos.as_ptr(), + ) + .result() + } + + /// + #[inline] + pub unsafe fn bind_image_memory2( + &self, + bind_infos: &[vk::BindImageMemoryInfo<'_>], + ) -> VkResult<()> { + (self.device_fn_1_1.bind_image_memory2)( + self.handle, + bind_infos.len() as _, + bind_infos.as_ptr(), + ) + .result() + } + + /// + #[inline] + pub unsafe fn get_device_group_peer_memory_features( + &self, + heap_index: u32, + local_device_index: u32, + remote_device_index: u32, + ) -> vk::PeerMemoryFeatureFlags { + let mut peer_memory_features = mem::MaybeUninit::uninit(); + (self.device_fn_1_1.get_device_group_peer_memory_features)( + self.handle, + heap_index, + local_device_index, + remote_device_index, + peer_memory_features.as_mut_ptr(), + ); + peer_memory_features.assume_init() + } + + /// + #[inline] + pub unsafe fn cmd_set_device_mask(&self, command_buffer: vk::CommandBuffer, device_mask: u32) { + (self.device_fn_1_1.cmd_set_device_mask)(command_buffer, device_mask) + } + + /// + #[inline] + pub unsafe fn cmd_dispatch_base( + &self, + command_buffer: vk::CommandBuffer, + base_group_x: u32, + base_group_y: u32, + base_group_z: u32, + group_count_x: u32, + group_count_y: u32, + group_count_z: u32, + ) { + (self.device_fn_1_1.cmd_dispatch_base)( + command_buffer, + base_group_x, + base_group_y, + base_group_z, + group_count_x, + group_count_y, + group_count_z, + ) + } + + /// + #[inline] + pub unsafe fn get_image_memory_requirements2( + &self, + info: &vk::ImageMemoryRequirementsInfo2<'_>, + out: &mut vk::MemoryRequirements2<'_>, + ) { + (self.device_fn_1_1.get_image_memory_requirements2)(self.handle, info, out) + } + + /// + #[inline] + pub unsafe fn get_buffer_memory_requirements2( + &self, + info: &vk::BufferMemoryRequirementsInfo2<'_>, + out: &mut vk::MemoryRequirements2<'_>, + ) { + (self.device_fn_1_1.get_buffer_memory_requirements2)(self.handle, info, out) + } + + /// Retrieve the number of elements to pass to [`get_image_sparse_memory_requirements2()`][Self::get_image_sparse_memory_requirements2()] + #[inline] + pub unsafe fn get_image_sparse_memory_requirements2_len( + &self, + info: &vk::ImageSparseMemoryRequirementsInfo2<'_>, + ) -> usize { + let mut count = mem::MaybeUninit::uninit(); + (self.device_fn_1_1.get_image_sparse_memory_requirements2)( + self.handle, + info, + count.as_mut_ptr(), + ptr::null_mut(), + ); + count.assume_init() as usize + } + + /// + /// + /// Call [`get_image_sparse_memory_requirements2_len()`][Self::get_image_sparse_memory_requirements2_len()] to query the number of elements to pass to `out`. + /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. + #[inline] + pub unsafe fn get_image_sparse_memory_requirements2( + &self, + info: &vk::ImageSparseMemoryRequirementsInfo2<'_>, + out: &mut [vk::SparseImageMemoryRequirements2<'_>], + ) { + let mut count = out.len() as u32; + (self.device_fn_1_1.get_image_sparse_memory_requirements2)( + self.handle, + info, + &mut count, + out.as_mut_ptr(), + ); + assert_eq!(count as usize, out.len()); + } + + /// + #[inline] + pub unsafe fn trim_command_pool( + &self, + command_pool: vk::CommandPool, + flags: vk::CommandPoolTrimFlags, + ) { + (self.device_fn_1_1.trim_command_pool)(self.handle, command_pool, flags) + } + + /// + #[inline] + pub unsafe fn get_device_queue2(&self, queue_info: &vk::DeviceQueueInfo2<'_>) -> vk::Queue { + let mut queue = mem::MaybeUninit::uninit(); + (self.device_fn_1_1.get_device_queue2)(self.handle, queue_info, queue.as_mut_ptr()); + queue.assume_init() + } + + /// + #[inline] + pub unsafe fn create_sampler_ycbcr_conversion( + &self, + create_info: &vk::SamplerYcbcrConversionCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut ycbcr_conversion = mem::MaybeUninit::uninit(); + (self.device_fn_1_1.create_sampler_ycbcr_conversion)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + ycbcr_conversion.as_mut_ptr(), + ) + .assume_init_on_success(ycbcr_conversion) + } + + /// + #[inline] + pub unsafe fn destroy_sampler_ycbcr_conversion( + &self, + ycbcr_conversion: vk::SamplerYcbcrConversion, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_1.destroy_sampler_ycbcr_conversion)( + self.handle, + ycbcr_conversion, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn create_descriptor_update_template( + &self, + create_info: &vk::DescriptorUpdateTemplateCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut descriptor_update_template = mem::MaybeUninit::uninit(); + (self.device_fn_1_1.create_descriptor_update_template)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + descriptor_update_template.as_mut_ptr(), + ) + .assume_init_on_success(descriptor_update_template) + } + + /// + #[inline] + pub unsafe fn destroy_descriptor_update_template( + &self, + descriptor_update_template: vk::DescriptorUpdateTemplate, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_1.destroy_descriptor_update_template)( + self.handle, + descriptor_update_template, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn update_descriptor_set_with_template( + &self, + descriptor_set: vk::DescriptorSet, + descriptor_update_template: vk::DescriptorUpdateTemplate, + data: *const ffi::c_void, + ) { + (self.device_fn_1_1.update_descriptor_set_with_template)( + self.handle, + descriptor_set, + descriptor_update_template, + data, + ) + } + + /// + #[inline] + pub unsafe fn get_descriptor_set_layout_support( + &self, + create_info: &vk::DescriptorSetLayoutCreateInfo<'_>, + out: &mut vk::DescriptorSetLayoutSupport<'_>, + ) { + (self.device_fn_1_1.get_descriptor_set_layout_support)(self.handle, create_info, out) + } +} + +/// Vulkan core 1.0 +impl Device { + #[inline] + pub fn fp_v1_0(&self) -> &crate::DeviceFnV1_0 { + &self.device_fn_1_0 + } + + /// + #[inline] + pub unsafe fn destroy_device(&self, allocation_callbacks: Option<&vk::AllocationCallbacks>) { + (self.device_fn_1_0.destroy_device)(self.handle, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn destroy_sampler( + &self, + sampler: vk::Sampler, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_sampler)( + self.handle, + sampler, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn free_memory( + &self, + memory: vk::DeviceMemory, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.free_memory)(self.handle, memory, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn free_command_buffers( + &self, + command_pool: vk::CommandPool, + command_buffers: &[vk::CommandBuffer], + ) { + (self.device_fn_1_0.free_command_buffers)( + self.handle, + command_pool, + command_buffers.len() as u32, + command_buffers.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn create_event( + &self, + create_info: &vk::EventCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut event = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_event)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + event.as_mut_ptr(), + ) + .assume_init_on_success(event) + } + + /// + /// + /// # Returns + /// Returns [`true`] if the event is _signaled_ ([`vk::Result::EVENT_SET`]), [`false`] if the + /// event is _unsignaled_ ([`vk::Result::EVENT_RESET`]), or [`Err`] on failure. + #[inline] + pub unsafe fn get_event_status(&self, event: vk::Event) -> VkResult { + let err_code = (self.device_fn_1_0.get_event_status)(self.handle, event); + match err_code { + vk::Result::EVENT_SET => Ok(true), + vk::Result::EVENT_RESET => Ok(false), + _ => Err(err_code), + } + } + + /// + #[inline] + pub unsafe fn set_event(&self, event: vk::Event) -> VkResult<()> { + (self.device_fn_1_0.set_event)(self.handle, event).result() + } + + /// + #[inline] + pub unsafe fn reset_event(&self, event: vk::Event) -> VkResult<()> { + (self.device_fn_1_0.reset_event)(self.handle, event).result() + } + /// + #[inline] + pub unsafe fn cmd_set_event( + &self, + command_buffer: vk::CommandBuffer, + event: vk::Event, + stage_mask: vk::PipelineStageFlags, + ) { + (self.device_fn_1_0.cmd_set_event)(command_buffer, event, stage_mask) + } + /// + #[inline] + pub unsafe fn cmd_reset_event( + &self, + command_buffer: vk::CommandBuffer, + event: vk::Event, + stage_mask: vk::PipelineStageFlags, + ) { + (self.device_fn_1_0.cmd_reset_event)(command_buffer, event, stage_mask) + } + + /// + #[inline] + pub unsafe fn cmd_wait_events( + &self, + command_buffer: vk::CommandBuffer, + events: &[vk::Event], + src_stage_mask: vk::PipelineStageFlags, + dst_stage_mask: vk::PipelineStageFlags, + memory_barriers: &[vk::MemoryBarrier<'_>], + buffer_memory_barriers: &[vk::BufferMemoryBarrier<'_>], + image_memory_barriers: &[vk::ImageMemoryBarrier<'_>], + ) { + (self.device_fn_1_0.cmd_wait_events)( + command_buffer, + events.len() as _, + events.as_ptr(), + src_stage_mask, + dst_stage_mask, + memory_barriers.len() as _, + memory_barriers.as_ptr(), + buffer_memory_barriers.len() as _, + buffer_memory_barriers.as_ptr(), + image_memory_barriers.len() as _, + image_memory_barriers.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_fence( + &self, + fence: vk::Fence, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_fence)(self.handle, fence, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn destroy_event( + &self, + event: vk::Event, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_event)(self.handle, event, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn destroy_image( + &self, + image: vk::Image, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_image)(self.handle, image, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn destroy_command_pool( + &self, + pool: vk::CommandPool, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_command_pool)( + self.handle, + pool, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_image_view( + &self, + image_view: vk::ImageView, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_image_view)( + self.handle, + image_view, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_render_pass( + &self, + renderpass: vk::RenderPass, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_render_pass)( + self.handle, + renderpass, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_framebuffer( + &self, + framebuffer: vk::Framebuffer, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_framebuffer)( + self.handle, + framebuffer, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_pipeline_layout( + &self, + pipeline_layout: vk::PipelineLayout, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_pipeline_layout)( + self.handle, + pipeline_layout, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_pipeline_cache( + &self, + pipeline_cache: vk::PipelineCache, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_pipeline_cache)( + self.handle, + pipeline_cache, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_buffer( + &self, + buffer: vk::Buffer, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_buffer)(self.handle, buffer, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn destroy_shader_module( + &self, + shader: vk::ShaderModule, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_shader_module)( + self.handle, + shader, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_pipeline( + &self, + pipeline: vk::Pipeline, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_pipeline)( + self.handle, + pipeline, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_semaphore( + &self, + semaphore: vk::Semaphore, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_semaphore)( + self.handle, + semaphore, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_descriptor_pool( + &self, + pool: vk::DescriptorPool, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_descriptor_pool)( + self.handle, + pool, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_query_pool( + &self, + pool: vk::QueryPool, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_query_pool)( + self.handle, + pool, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn destroy_descriptor_set_layout( + &self, + layout: vk::DescriptorSetLayout, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_descriptor_set_layout)( + self.handle, + layout, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn free_descriptor_sets( + &self, + pool: vk::DescriptorPool, + descriptor_sets: &[vk::DescriptorSet], + ) -> VkResult<()> { + (self.device_fn_1_0.free_descriptor_sets)( + self.handle, + pool, + descriptor_sets.len() as u32, + descriptor_sets.as_ptr(), + ) + .result() + } + + /// + #[inline] + pub unsafe fn update_descriptor_sets( + &self, + descriptor_writes: &[vk::WriteDescriptorSet<'_>], + descriptor_copies: &[vk::CopyDescriptorSet<'_>], + ) { + (self.device_fn_1_0.update_descriptor_sets)( + self.handle, + descriptor_writes.len() as u32, + descriptor_writes.as_ptr(), + descriptor_copies.len() as u32, + descriptor_copies.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn create_sampler( + &self, + create_info: &vk::SamplerCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut sampler = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_sampler)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + sampler.as_mut_ptr(), + ) + .assume_init_on_success(sampler) + } + + /// + #[inline] + pub unsafe fn cmd_blit_image( + &self, + command_buffer: vk::CommandBuffer, + src_image: vk::Image, + src_image_layout: vk::ImageLayout, + dst_image: vk::Image, + dst_image_layout: vk::ImageLayout, + regions: &[vk::ImageBlit], + filter: vk::Filter, + ) { + (self.device_fn_1_0.cmd_blit_image)( + command_buffer, + src_image, + src_image_layout, + dst_image, + dst_image_layout, + regions.len() as _, + regions.as_ptr(), + filter, + ) + } + + /// + #[inline] + pub unsafe fn cmd_resolve_image( + &self, + command_buffer: vk::CommandBuffer, + src_image: vk::Image, + src_image_layout: vk::ImageLayout, + dst_image: vk::Image, + dst_image_layout: vk::ImageLayout, + regions: &[vk::ImageResolve], + ) { + (self.device_fn_1_0.cmd_resolve_image)( + command_buffer, + src_image, + src_image_layout, + dst_image, + dst_image_layout, + regions.len() as u32, + regions.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_fill_buffer( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + size: vk::DeviceSize, + data: u32, + ) { + (self.device_fn_1_0.cmd_fill_buffer)(command_buffer, buffer, offset, size, data) + } + + /// + #[inline] + pub unsafe fn cmd_update_buffer( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + data: &[u8], + ) { + (self.device_fn_1_0.cmd_update_buffer)( + command_buffer, + buffer, + offset, + data.len() as u64, + data.as_ptr() as _, + ) + } + + /// + #[inline] + pub unsafe fn cmd_copy_buffer( + &self, + command_buffer: vk::CommandBuffer, + src_buffer: vk::Buffer, + dst_buffer: vk::Buffer, + regions: &[vk::BufferCopy], + ) { + (self.device_fn_1_0.cmd_copy_buffer)( + command_buffer, + src_buffer, + dst_buffer, + regions.len() as u32, + regions.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_copy_image_to_buffer( + &self, + command_buffer: vk::CommandBuffer, + src_image: vk::Image, + src_image_layout: vk::ImageLayout, + dst_buffer: vk::Buffer, + regions: &[vk::BufferImageCopy], + ) { + (self.device_fn_1_0.cmd_copy_image_to_buffer)( + command_buffer, + src_image, + src_image_layout, + dst_buffer, + regions.len() as u32, + regions.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_copy_buffer_to_image( + &self, + command_buffer: vk::CommandBuffer, + src_buffer: vk::Buffer, + dst_image: vk::Image, + dst_image_layout: vk::ImageLayout, + regions: &[vk::BufferImageCopy], + ) { + (self.device_fn_1_0.cmd_copy_buffer_to_image)( + command_buffer, + src_buffer, + dst_image, + dst_image_layout, + regions.len() as u32, + regions.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_copy_image( + &self, + command_buffer: vk::CommandBuffer, + src_image: vk::Image, + src_image_layout: vk::ImageLayout, + dst_image: vk::Image, + dst_image_layout: vk::ImageLayout, + regions: &[vk::ImageCopy], + ) { + (self.device_fn_1_0.cmd_copy_image)( + command_buffer, + src_image, + src_image_layout, + dst_image, + dst_image_layout, + regions.len() as u32, + regions.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn allocate_descriptor_sets( + &self, + allocate_info: &vk::DescriptorSetAllocateInfo<'_>, + ) -> VkResult> { + let mut desc_set = Vec::with_capacity(allocate_info.descriptor_set_count as usize); + (self.device_fn_1_0.allocate_descriptor_sets)( + self.handle, + allocate_info, + desc_set.as_mut_ptr(), + ) + .set_vec_len_on_success(desc_set, allocate_info.descriptor_set_count as usize) + } + + /// + #[inline] + pub unsafe fn create_descriptor_set_layout( + &self, + create_info: &vk::DescriptorSetLayoutCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut layout = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_descriptor_set_layout)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + layout.as_mut_ptr(), + ) + .assume_init_on_success(layout) + } + + /// + #[inline] + pub unsafe fn device_wait_idle(&self) -> VkResult<()> { + (self.device_fn_1_0.device_wait_idle)(self.handle).result() + } + + /// + #[inline] + pub unsafe fn create_descriptor_pool( + &self, + create_info: &vk::DescriptorPoolCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut pool = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_descriptor_pool)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + pool.as_mut_ptr(), + ) + .assume_init_on_success(pool) + } + + /// + #[inline] + pub unsafe fn reset_descriptor_pool( + &self, + pool: vk::DescriptorPool, + flags: vk::DescriptorPoolResetFlags, + ) -> VkResult<()> { + (self.device_fn_1_0.reset_descriptor_pool)(self.handle, pool, flags).result() + } + + /// + #[inline] + pub unsafe fn reset_command_pool( + &self, + command_pool: vk::CommandPool, + flags: vk::CommandPoolResetFlags, + ) -> VkResult<()> { + (self.device_fn_1_0.reset_command_pool)(self.handle, command_pool, flags).result() + } + + /// + #[inline] + pub unsafe fn reset_command_buffer( + &self, + command_buffer: vk::CommandBuffer, + flags: vk::CommandBufferResetFlags, + ) -> VkResult<()> { + (self.device_fn_1_0.reset_command_buffer)(command_buffer, flags).result() + } + + /// + #[inline] + pub unsafe fn reset_fences(&self, fences: &[vk::Fence]) -> VkResult<()> { + (self.device_fn_1_0.reset_fences)(self.handle, fences.len() as u32, fences.as_ptr()) + .result() + } + + /// + #[inline] + pub unsafe fn cmd_bind_index_buffer( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + index_type: vk::IndexType, + ) { + (self.device_fn_1_0.cmd_bind_index_buffer)(command_buffer, buffer, offset, index_type) + } + + /// + #[inline] + pub unsafe fn cmd_clear_color_image( + &self, + command_buffer: vk::CommandBuffer, + image: vk::Image, + image_layout: vk::ImageLayout, + clear_color_value: &vk::ClearColorValue, + ranges: &[vk::ImageSubresourceRange], + ) { + (self.device_fn_1_0.cmd_clear_color_image)( + command_buffer, + image, + image_layout, + clear_color_value, + ranges.len() as u32, + ranges.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_clear_depth_stencil_image( + &self, + command_buffer: vk::CommandBuffer, + image: vk::Image, + image_layout: vk::ImageLayout, + clear_depth_stencil_value: &vk::ClearDepthStencilValue, + ranges: &[vk::ImageSubresourceRange], + ) { + (self.device_fn_1_0.cmd_clear_depth_stencil_image)( + command_buffer, + image, + image_layout, + clear_depth_stencil_value, + ranges.len() as u32, + ranges.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_clear_attachments( + &self, + command_buffer: vk::CommandBuffer, + attachments: &[vk::ClearAttachment], + rects: &[vk::ClearRect], + ) { + (self.device_fn_1_0.cmd_clear_attachments)( + command_buffer, + attachments.len() as u32, + attachments.as_ptr(), + rects.len() as u32, + rects.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_draw_indexed( + &self, + command_buffer: vk::CommandBuffer, + index_count: u32, + instance_count: u32, + first_index: u32, + vertex_offset: i32, + first_instance: u32, + ) { + (self.device_fn_1_0.cmd_draw_indexed)( + command_buffer, + index_count, + instance_count, + first_index, + vertex_offset, + first_instance, + ) + } + + /// + #[inline] + pub unsafe fn cmd_draw_indexed_indirect( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + draw_count: u32, + stride: u32, + ) { + (self.device_fn_1_0.cmd_draw_indexed_indirect)( + command_buffer, + buffer, + offset, + draw_count, + stride, + ) + } + + /// + #[inline] + pub unsafe fn cmd_execute_commands( + &self, + primary_command_buffer: vk::CommandBuffer, + secondary_command_buffers: &[vk::CommandBuffer], + ) { + (self.device_fn_1_0.cmd_execute_commands)( + primary_command_buffer, + secondary_command_buffers.len() as u32, + secondary_command_buffers.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_bind_descriptor_sets( + &self, + command_buffer: vk::CommandBuffer, + pipeline_bind_point: vk::PipelineBindPoint, + layout: vk::PipelineLayout, + first_set: u32, + descriptor_sets: &[vk::DescriptorSet], + dynamic_offsets: &[u32], + ) { + (self.device_fn_1_0.cmd_bind_descriptor_sets)( + command_buffer, + pipeline_bind_point, + layout, + first_set, + descriptor_sets.len() as u32, + descriptor_sets.as_ptr(), + dynamic_offsets.len() as u32, + dynamic_offsets.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_copy_query_pool_results( + &self, + command_buffer: vk::CommandBuffer, + query_pool: vk::QueryPool, + first_query: u32, + query_count: u32, + dst_buffer: vk::Buffer, + dst_offset: vk::DeviceSize, + stride: vk::DeviceSize, + flags: vk::QueryResultFlags, + ) { + (self.device_fn_1_0.cmd_copy_query_pool_results)( + command_buffer, + query_pool, + first_query, + query_count, + dst_buffer, + dst_offset, + stride, + flags, + ) + } + + /// + #[inline] + pub unsafe fn cmd_push_constants( + &self, + command_buffer: vk::CommandBuffer, + layout: vk::PipelineLayout, + stage_flags: vk::ShaderStageFlags, + offset: u32, + constants: &[u8], + ) { + (self.device_fn_1_0.cmd_push_constants)( + command_buffer, + layout, + stage_flags, + offset, + constants.len() as _, + constants.as_ptr() as _, + ) + } + + /// + #[inline] + pub unsafe fn cmd_begin_render_pass( + &self, + command_buffer: vk::CommandBuffer, + render_pass_begin: &vk::RenderPassBeginInfo<'_>, + contents: vk::SubpassContents, + ) { + (self.device_fn_1_0.cmd_begin_render_pass)(command_buffer, render_pass_begin, contents) + } + + /// + #[inline] + pub unsafe fn cmd_next_subpass( + &self, + command_buffer: vk::CommandBuffer, + contents: vk::SubpassContents, + ) { + (self.device_fn_1_0.cmd_next_subpass)(command_buffer, contents) + } + + /// + #[inline] + pub unsafe fn cmd_bind_pipeline( + &self, + command_buffer: vk::CommandBuffer, + pipeline_bind_point: vk::PipelineBindPoint, + pipeline: vk::Pipeline, + ) { + (self.device_fn_1_0.cmd_bind_pipeline)(command_buffer, pipeline_bind_point, pipeline) + } + + /// + #[inline] + pub unsafe fn cmd_set_scissor( + &self, + command_buffer: vk::CommandBuffer, + first_scissor: u32, + scissors: &[vk::Rect2D], + ) { + (self.device_fn_1_0.cmd_set_scissor)( + command_buffer, + first_scissor, + scissors.len() as u32, + scissors.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_line_width(&self, command_buffer: vk::CommandBuffer, line_width: f32) { + (self.device_fn_1_0.cmd_set_line_width)(command_buffer, line_width) + } + + /// + #[inline] + pub unsafe fn cmd_bind_vertex_buffers( + &self, + command_buffer: vk::CommandBuffer, + first_binding: u32, + buffers: &[vk::Buffer], + offsets: &[vk::DeviceSize], + ) { + debug_assert_eq!(buffers.len(), offsets.len()); + (self.device_fn_1_0.cmd_bind_vertex_buffers)( + command_buffer, + first_binding, + buffers.len() as u32, + buffers.as_ptr(), + offsets.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_end_render_pass(&self, command_buffer: vk::CommandBuffer) { + (self.device_fn_1_0.cmd_end_render_pass)(command_buffer) + } + + /// + #[inline] + pub unsafe fn cmd_draw( + &self, + command_buffer: vk::CommandBuffer, + vertex_count: u32, + instance_count: u32, + first_vertex: u32, + first_instance: u32, + ) { + (self.device_fn_1_0.cmd_draw)( + command_buffer, + vertex_count, + instance_count, + first_vertex, + first_instance, + ) + } + + /// + #[inline] + pub unsafe fn cmd_draw_indirect( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + draw_count: u32, + stride: u32, + ) { + (self.device_fn_1_0.cmd_draw_indirect)(command_buffer, buffer, offset, draw_count, stride) + } + + /// + #[inline] + pub unsafe fn cmd_dispatch( + &self, + command_buffer: vk::CommandBuffer, + group_count_x: u32, + group_count_y: u32, + group_count_z: u32, + ) { + (self.device_fn_1_0.cmd_dispatch)( + command_buffer, + group_count_x, + group_count_y, + group_count_z, + ) + } + + /// + #[inline] + pub unsafe fn cmd_dispatch_indirect( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + ) { + (self.device_fn_1_0.cmd_dispatch_indirect)(command_buffer, buffer, offset) + } + + /// + #[inline] + pub unsafe fn cmd_set_viewport( + &self, + command_buffer: vk::CommandBuffer, + first_viewport: u32, + viewports: &[vk::Viewport], + ) { + (self.device_fn_1_0.cmd_set_viewport)( + command_buffer, + first_viewport, + viewports.len() as u32, + viewports.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_bias( + &self, + command_buffer: vk::CommandBuffer, + constant_factor: f32, + clamp: f32, + slope_factor: f32, + ) { + (self.device_fn_1_0.cmd_set_depth_bias)( + command_buffer, + constant_factor, + clamp, + slope_factor, + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_blend_constants( + &self, + command_buffer: vk::CommandBuffer, + blend_constants: &[f32; 4], + ) { + (self.device_fn_1_0.cmd_set_blend_constants)(command_buffer, blend_constants) + } + + /// + #[inline] + pub unsafe fn cmd_set_depth_bounds( + &self, + command_buffer: vk::CommandBuffer, + min_depth_bounds: f32, + max_depth_bounds: f32, + ) { + (self.device_fn_1_0.cmd_set_depth_bounds)( + command_buffer, + min_depth_bounds, + max_depth_bounds, + ) + } + + /// + #[inline] + pub unsafe fn cmd_set_stencil_compare_mask( + &self, + command_buffer: vk::CommandBuffer, + face_mask: vk::StencilFaceFlags, + compare_mask: u32, + ) { + (self.device_fn_1_0.cmd_set_stencil_compare_mask)(command_buffer, face_mask, compare_mask) + } + + /// + #[inline] + pub unsafe fn cmd_set_stencil_write_mask( + &self, + command_buffer: vk::CommandBuffer, + face_mask: vk::StencilFaceFlags, + write_mask: u32, + ) { + (self.device_fn_1_0.cmd_set_stencil_write_mask)(command_buffer, face_mask, write_mask) + } + + /// + #[inline] + pub unsafe fn cmd_set_stencil_reference( + &self, + command_buffer: vk::CommandBuffer, + face_mask: vk::StencilFaceFlags, + reference: u32, + ) { + (self.device_fn_1_0.cmd_set_stencil_reference)(command_buffer, face_mask, reference) + } + + /// + #[inline] + pub unsafe fn get_query_pool_results( + &self, + query_pool: vk::QueryPool, + first_query: u32, + data: &mut [T], + flags: vk::QueryResultFlags, + ) -> VkResult<()> { + let data_size = size_of_val(data); + (self.device_fn_1_0.get_query_pool_results)( + self.handle, + query_pool, + first_query, + data.len() as u32, + data_size, + data.as_mut_ptr().cast(), + size_of::() as _, + flags, + ) + .result() + } + + /// + #[inline] + pub unsafe fn cmd_begin_query( + &self, + command_buffer: vk::CommandBuffer, + query_pool: vk::QueryPool, + query: u32, + flags: vk::QueryControlFlags, + ) { + (self.device_fn_1_0.cmd_begin_query)(command_buffer, query_pool, query, flags) + } + + /// + #[inline] + pub unsafe fn cmd_end_query( + &self, + command_buffer: vk::CommandBuffer, + query_pool: vk::QueryPool, + query: u32, + ) { + (self.device_fn_1_0.cmd_end_query)(command_buffer, query_pool, query) + } + + /// + #[inline] + pub unsafe fn cmd_reset_query_pool( + &self, + command_buffer: vk::CommandBuffer, + pool: vk::QueryPool, + first_query: u32, + query_count: u32, + ) { + (self.device_fn_1_0.cmd_reset_query_pool)(command_buffer, pool, first_query, query_count) + } + + /// + #[inline] + pub unsafe fn cmd_write_timestamp( + &self, + command_buffer: vk::CommandBuffer, + pipeline_stage: vk::PipelineStageFlags, // what? + query_pool: vk::QueryPool, + query: u32, + ) { + (self.device_fn_1_0.cmd_write_timestamp)(command_buffer, pipeline_stage, query_pool, query) + } + + /// + #[inline] + pub unsafe fn create_semaphore( + &self, + create_info: &vk::SemaphoreCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut semaphore = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_semaphore)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + semaphore.as_mut_ptr(), + ) + .assume_init_on_success(semaphore) + } + + /// + /// + /// Pipelines are created and returned as described for [Multiple Pipeline Creation]. + /// + /// [Multiple Pipeline Creation]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-multiple + #[inline] + pub unsafe fn create_graphics_pipelines( + &self, + pipeline_cache: vk::PipelineCache, + create_infos: &[vk::GraphicsPipelineCreateInfo<'_>], + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> Result, (Vec, vk::Result)> { + let mut pipelines = Vec::with_capacity(create_infos.len()); + let err_code = (self.device_fn_1_0.create_graphics_pipelines)( + self.handle, + pipeline_cache, + create_infos.len() as u32, + create_infos.as_ptr(), + allocation_callbacks.to_raw_ptr(), + pipelines.as_mut_ptr(), + ); + pipelines.set_len(create_infos.len()); + match err_code { + vk::Result::SUCCESS => Ok(pipelines), + _ => Err((pipelines, err_code)), + } + } + + /// + /// + /// Pipelines are created and returned as described for [Multiple Pipeline Creation]. + /// + /// [Multiple Pipeline Creation]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#pipelines-multiple + #[inline] + pub unsafe fn create_compute_pipelines( + &self, + pipeline_cache: vk::PipelineCache, + create_infos: &[vk::ComputePipelineCreateInfo<'_>], + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> Result, (Vec, vk::Result)> { + let mut pipelines = Vec::with_capacity(create_infos.len()); + let err_code = (self.device_fn_1_0.create_compute_pipelines)( + self.handle, + pipeline_cache, + create_infos.len() as u32, + create_infos.as_ptr(), + allocation_callbacks.to_raw_ptr(), + pipelines.as_mut_ptr(), + ); + pipelines.set_len(create_infos.len()); + match err_code { + vk::Result::SUCCESS => Ok(pipelines), + _ => Err((pipelines, err_code)), + } + } + + /// + #[inline] + pub unsafe fn create_buffer( + &self, + create_info: &vk::BufferCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut buffer = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_buffer)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + buffer.as_mut_ptr(), + ) + .assume_init_on_success(buffer) + } + + /// + #[inline] + pub unsafe fn create_pipeline_layout( + &self, + create_info: &vk::PipelineLayoutCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut pipeline_layout = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_pipeline_layout)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + pipeline_layout.as_mut_ptr(), + ) + .assume_init_on_success(pipeline_layout) + } + + /// + #[inline] + pub unsafe fn create_pipeline_cache( + &self, + create_info: &vk::PipelineCacheCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut pipeline_cache = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_pipeline_cache)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + pipeline_cache.as_mut_ptr(), + ) + .assume_init_on_success(pipeline_cache) + } + + /// + #[inline] + pub unsafe fn get_pipeline_cache_data( + &self, + pipeline_cache: vk::PipelineCache, + ) -> VkResult> { + read_into_uninitialized_vector(|count, data: *mut u8| { + (self.device_fn_1_0.get_pipeline_cache_data)( + self.handle, + pipeline_cache, + count, + data.cast(), + ) + }) + } + + /// + #[inline] + pub unsafe fn merge_pipeline_caches( + &self, + dst_cache: vk::PipelineCache, + src_caches: &[vk::PipelineCache], + ) -> VkResult<()> { + (self.device_fn_1_0.merge_pipeline_caches)( + self.handle, + dst_cache, + src_caches.len() as u32, + src_caches.as_ptr(), + ) + .result() + } + + /// + #[inline] + pub unsafe fn map_memory( + &self, + memory: vk::DeviceMemory, + offset: vk::DeviceSize, + size: vk::DeviceSize, + flags: vk::MemoryMapFlags, + ) -> VkResult<*mut ffi::c_void> { + let mut data = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.map_memory)(self.handle, memory, offset, size, flags, data.as_mut_ptr()) + .assume_init_on_success(data) + } + + /// + #[inline] + pub unsafe fn unmap_memory(&self, memory: vk::DeviceMemory) { + (self.device_fn_1_0.unmap_memory)(self.handle, memory) + } + + /// + #[inline] + pub unsafe fn invalidate_mapped_memory_ranges( + &self, + ranges: &[vk::MappedMemoryRange<'_>], + ) -> VkResult<()> { + (self.device_fn_1_0.invalidate_mapped_memory_ranges)( + self.handle, + ranges.len() as u32, + ranges.as_ptr(), + ) + .result() + } + + /// + #[inline] + pub unsafe fn flush_mapped_memory_ranges( + &self, + ranges: &[vk::MappedMemoryRange<'_>], + ) -> VkResult<()> { + (self.device_fn_1_0.flush_mapped_memory_ranges)( + self.handle, + ranges.len() as u32, + ranges.as_ptr(), + ) + .result() + } + + /// + #[inline] + pub unsafe fn create_framebuffer( + &self, + create_info: &vk::FramebufferCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut framebuffer = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_framebuffer)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + framebuffer.as_mut_ptr(), + ) + .assume_init_on_success(framebuffer) + } + + /// + #[inline] + pub unsafe fn get_device_queue(&self, queue_family_index: u32, queue_index: u32) -> vk::Queue { + let mut queue = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.get_device_queue)( + self.handle, + queue_family_index, + queue_index, + queue.as_mut_ptr(), + ); + queue.assume_init() + } + + /// + #[inline] + pub unsafe fn cmd_pipeline_barrier( + &self, + command_buffer: vk::CommandBuffer, + src_stage_mask: vk::PipelineStageFlags, + dst_stage_mask: vk::PipelineStageFlags, + dependency_flags: vk::DependencyFlags, + memory_barriers: &[vk::MemoryBarrier<'_>], + buffer_memory_barriers: &[vk::BufferMemoryBarrier<'_>], + image_memory_barriers: &[vk::ImageMemoryBarrier<'_>], + ) { + (self.device_fn_1_0.cmd_pipeline_barrier)( + command_buffer, + src_stage_mask, + dst_stage_mask, + dependency_flags, + memory_barriers.len() as u32, + memory_barriers.as_ptr(), + buffer_memory_barriers.len() as u32, + buffer_memory_barriers.as_ptr(), + image_memory_barriers.len() as u32, + image_memory_barriers.as_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn create_render_pass( + &self, + create_info: &vk::RenderPassCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut renderpass = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_render_pass)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + renderpass.as_mut_ptr(), + ) + .assume_init_on_success(renderpass) + } + + /// + #[inline] + pub unsafe fn begin_command_buffer( + &self, + command_buffer: vk::CommandBuffer, + begin_info: &vk::CommandBufferBeginInfo<'_>, + ) -> VkResult<()> { + (self.device_fn_1_0.begin_command_buffer)(command_buffer, begin_info).result() + } + + /// + #[inline] + pub unsafe fn end_command_buffer(&self, command_buffer: vk::CommandBuffer) -> VkResult<()> { + (self.device_fn_1_0.end_command_buffer)(command_buffer).result() + } + + /// + #[inline] + pub unsafe fn wait_for_fences( + &self, + fences: &[vk::Fence], + wait_all: bool, + timeout: u64, + ) -> VkResult<()> { + (self.device_fn_1_0.wait_for_fences)( + self.handle, + fences.len() as u32, + fences.as_ptr(), + wait_all as u32, + timeout, + ) + .result() + } + + /// + /// + /// # Returns + /// Returns [`true`] if the fence is _signaled_ ([`vk::Result::SUCCESS`]), [`false`] if the + /// fence is _unsignaled_ ([`vk::Result::NOT_READY`]), or [`Err`] on failure. + #[inline] + pub unsafe fn get_fence_status(&self, fence: vk::Fence) -> VkResult { + let err_code = (self.device_fn_1_0.get_fence_status)(self.handle, fence); + match err_code { + vk::Result::SUCCESS => Ok(true), + vk::Result::NOT_READY => Ok(false), + _ => Err(err_code), + } + } + + /// + #[inline] + pub unsafe fn queue_wait_idle(&self, queue: vk::Queue) -> VkResult<()> { + (self.device_fn_1_0.queue_wait_idle)(queue).result() + } + + /// + #[inline] + pub unsafe fn queue_submit( + &self, + queue: vk::Queue, + submits: &[vk::SubmitInfo<'_>], + fence: vk::Fence, + ) -> VkResult<()> { + (self.device_fn_1_0.queue_submit)(queue, submits.len() as u32, submits.as_ptr(), fence) + .result() + } + + /// + #[inline] + pub unsafe fn queue_bind_sparse( + &self, + queue: vk::Queue, + bind_info: &[vk::BindSparseInfo<'_>], + fence: vk::Fence, + ) -> VkResult<()> { + (self.device_fn_1_0.queue_bind_sparse)( + queue, + bind_info.len() as u32, + bind_info.as_ptr(), + fence, + ) + .result() + } + + /// + #[inline] + pub unsafe fn create_buffer_view( + &self, + create_info: &vk::BufferViewCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut buffer_view = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_buffer_view)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + buffer_view.as_mut_ptr(), + ) + .assume_init_on_success(buffer_view) + } + + /// + #[inline] + pub unsafe fn destroy_buffer_view( + &self, + buffer_view: vk::BufferView, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + (self.device_fn_1_0.destroy_buffer_view)( + self.handle, + buffer_view, + allocation_callbacks.to_raw_ptr(), + ) + } + + /// + #[inline] + pub unsafe fn create_image_view( + &self, + create_info: &vk::ImageViewCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut image_view = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_image_view)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + image_view.as_mut_ptr(), + ) + .assume_init_on_success(image_view) + } + + /// + #[inline] + pub unsafe fn allocate_command_buffers( + &self, + allocate_info: &vk::CommandBufferAllocateInfo<'_>, + ) -> VkResult> { + let mut buffers = Vec::with_capacity(allocate_info.command_buffer_count as usize); + (self.device_fn_1_0.allocate_command_buffers)( + self.handle, + allocate_info, + buffers.as_mut_ptr(), + ) + .set_vec_len_on_success(buffers, allocate_info.command_buffer_count as usize) + } + + /// + #[inline] + pub unsafe fn create_command_pool( + &self, + create_info: &vk::CommandPoolCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut pool = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_command_pool)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + pool.as_mut_ptr(), + ) + .assume_init_on_success(pool) + } + + /// + #[inline] + pub unsafe fn create_query_pool( + &self, + create_info: &vk::QueryPoolCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut pool = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_query_pool)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + pool.as_mut_ptr(), + ) + .assume_init_on_success(pool) + } + + /// + #[inline] + pub unsafe fn create_image( + &self, + create_info: &vk::ImageCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut image = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_image)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + image.as_mut_ptr(), + ) + .assume_init_on_success(image) + } + + /// + #[inline] + pub unsafe fn get_image_subresource_layout( + &self, + image: vk::Image, + subresource: vk::ImageSubresource, + ) -> vk::SubresourceLayout { + let mut layout = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.get_image_subresource_layout)( + self.handle, + image, + &subresource, + layout.as_mut_ptr(), + ); + layout.assume_init() + } + + /// + #[inline] + pub unsafe fn get_image_memory_requirements(&self, image: vk::Image) -> vk::MemoryRequirements { + let mut mem_req = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.get_image_memory_requirements)( + self.handle, + image, + mem_req.as_mut_ptr(), + ); + mem_req.assume_init() + } + + /// + #[inline] + pub unsafe fn get_buffer_memory_requirements( + &self, + buffer: vk::Buffer, + ) -> vk::MemoryRequirements { + let mut mem_req = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.get_buffer_memory_requirements)( + self.handle, + buffer, + mem_req.as_mut_ptr(), + ); + mem_req.assume_init() + } + + /// + #[inline] + pub unsafe fn allocate_memory( + &self, + allocate_info: &vk::MemoryAllocateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut memory = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.allocate_memory)( + self.handle, + allocate_info, + allocation_callbacks.to_raw_ptr(), + memory.as_mut_ptr(), + ) + .assume_init_on_success(memory) + } + + /// + #[inline] + pub unsafe fn create_shader_module( + &self, + create_info: &vk::ShaderModuleCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut shader = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_shader_module)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + shader.as_mut_ptr(), + ) + .assume_init_on_success(shader) + } + + /// + #[inline] + pub unsafe fn create_fence( + &self, + create_info: &vk::FenceCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut fence = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.create_fence)( + self.handle, + create_info, + allocation_callbacks.to_raw_ptr(), + fence.as_mut_ptr(), + ) + .assume_init_on_success(fence) + } + + /// + #[inline] + pub unsafe fn bind_buffer_memory( + &self, + buffer: vk::Buffer, + device_memory: vk::DeviceMemory, + offset: vk::DeviceSize, + ) -> VkResult<()> { + (self.device_fn_1_0.bind_buffer_memory)(self.handle, buffer, device_memory, offset).result() + } + + /// + #[inline] + pub unsafe fn bind_image_memory( + &self, + image: vk::Image, + device_memory: vk::DeviceMemory, + offset: vk::DeviceSize, + ) -> VkResult<()> { + (self.device_fn_1_0.bind_image_memory)(self.handle, image, device_memory, offset).result() + } + + /// + #[inline] + pub unsafe fn get_render_area_granularity(&self, render_pass: vk::RenderPass) -> vk::Extent2D { + let mut granularity = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.get_render_area_granularity)( + self.handle, + render_pass, + granularity.as_mut_ptr(), + ); + granularity.assume_init() + } + + /// + #[inline] + pub unsafe fn get_device_memory_commitment(&self, memory: vk::DeviceMemory) -> vk::DeviceSize { + let mut committed_memory_in_bytes = mem::MaybeUninit::uninit(); + (self.device_fn_1_0.get_device_memory_commitment)( + self.handle, + memory, + committed_memory_in_bytes.as_mut_ptr(), + ); + committed_memory_in_bytes.assume_init() + } + + /// + #[inline] + pub unsafe fn get_image_sparse_memory_requirements( + &self, + image: vk::Image, + ) -> Vec { + read_into_uninitialized_vector(|count, data| { + (self.device_fn_1_0.get_image_sparse_memory_requirements)( + self.handle, + image, + count, + data, + ); + vk::Result::SUCCESS + }) + // The closure always returns SUCCESS + .unwrap() + } +} diff --git a/ash-rewrite/src/generated/amd/anti_lag.rs b/ash-rewrite/src/generated/amd/anti_lag.rs index b2ee5a43f..55d67c8ab 100644 --- a/ash-rewrite/src/generated/amd/anti_lag.rs +++ b/ash-rewrite/src/generated/amd/anti_lag.rs @@ -100,11 +100,11 @@ pub(crate) mod reexport { self.max_fps = max_fps; self } - pub fn p_presentation_info( + pub fn presentation_info( mut self, - p_presentation_info: &'a crate::vk::AntiLagPresentationInfoAMD<'a>, + presentation_info: &'a crate::vk::AntiLagPresentationInfoAMD<'a>, ) -> Self { - self.p_presentation_info = p_presentation_info; + self.p_presentation_info = presentation_info; self } } diff --git a/ash-rewrite/src/generated/amd/buffer_marker.rs b/ash-rewrite/src/generated/amd/buffer_marker.rs index e3ada8434..a6ae26cd2 100644 --- a/ash-rewrite/src/generated/amd/buffer_marker.rs +++ b/ash-rewrite/src/generated/amd/buffer_marker.rs @@ -21,7 +21,7 @@ impl DeviceFn { cmd_write_buffer_marker_amd: unsafe { unsafe extern "system" fn cmd_write_buffer_marker_amd( _: crate::vk::CommandBuffer, - _: crate::vk::PipelineStageFlagBits, + _: crate::vk::PipelineStageFlags, _: crate::vk::Buffer, _: crate::vk::DeviceSize, _: u32, @@ -58,7 +58,7 @@ impl DeviceFn { pub(crate) mod reexport { pub type PFN_vkCmdWriteBufferMarkerAMD = unsafe extern "system" fn( command_buffer: crate::vk::CommandBuffer, - pipeline_stage: crate::vk::PipelineStageFlagBits, + pipeline_stage: crate::vk::PipelineStageFlags, dst_buffer: crate::vk::Buffer, dst_offset: crate::vk::DeviceSize, marker: u32, diff --git a/ash-rewrite/src/generated/amd/mixed_attachment_samples.rs b/ash-rewrite/src/generated/amd/mixed_attachment_samples.rs index 5ab7abdd2..dbad5cd33 100644 --- a/ash-rewrite/src/generated/amd/mixed_attachment_samples.rs +++ b/ash-rewrite/src/generated/amd/mixed_attachment_samples.rs @@ -7,8 +7,8 @@ pub struct AttachmentSampleCountInfoAMD<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub color_attachment_count: u32, - pub p_color_attachment_samples: *const crate::vk::SampleCountFlagBits, - pub depth_stencil_attachment_samples: crate::vk::SampleCountFlagBits, + pub p_color_attachment_samples: *const crate::vk::SampleCountFlags, + pub depth_stencil_attachment_samples: crate::vk::SampleCountFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for AttachmentSampleCountInfoAMD<'a> { @@ -35,17 +35,17 @@ impl<'a> AttachmentSampleCountInfoAMD<'a> { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_samples( + pub fn color_attachment_samples( mut self, - p_color_attachment_samples: &'a [crate::vk::SampleCountFlagBits], + color_attachment_samples: &'a [crate::vk::SampleCountFlags], ) -> Self { - self.color_attachment_count = p_color_attachment_samples.len() as _; - self.p_color_attachment_samples = p_color_attachment_samples.as_ptr(); + self.color_attachment_count = color_attachment_samples.len() as _; + self.p_color_attachment_samples = color_attachment_samples.as_ptr(); self } pub fn depth_stencil_attachment_samples( mut self, - depth_stencil_attachment_samples: crate::vk::SampleCountFlagBits, + depth_stencil_attachment_samples: crate::vk::SampleCountFlags, ) -> Self { self.depth_stencil_attachment_samples = depth_stencil_attachment_samples; self diff --git a/ash-rewrite/src/generated/amd/shader_info.rs b/ash-rewrite/src/generated/amd/shader_info.rs index b20fb0195..166eabfcb 100644 --- a/ash-rewrite/src/generated/amd/shader_info.rs +++ b/ash-rewrite/src/generated/amd/shader_info.rs @@ -21,7 +21,7 @@ impl DeviceFn { unsafe extern "system" fn get_shader_info_amd( _: crate::vk::Device, _: crate::vk::Pipeline, - _: crate::vk::ShaderStageFlagBits, + _: crate::vk::ShaderStageFlags, _: crate::vk::ShaderInfoTypeAMD, _: *mut usize, _: *mut core::ffi::c_void, @@ -163,7 +163,7 @@ pub(crate) mod reexport { pub type PFN_vkGetShaderInfoAMD = unsafe extern "system" fn( device: crate::vk::Device, pipeline: crate::vk::Pipeline, - shader_stage: crate::vk::ShaderStageFlagBits, + shader_stage: crate::vk::ShaderStageFlags, info_type: crate::vk::ShaderInfoTypeAMD, p_info_size: *mut usize, p_info: *mut core::ffi::c_void, diff --git a/ash-rewrite/src/generated/amdx/shader_enqueue.rs b/ash-rewrite/src/generated/amdx/shader_enqueue.rs index 1b7dce44f..e89e0eee2 100644 --- a/ash-rewrite/src/generated/amdx/shader_enqueue.rs +++ b/ash-rewrite/src/generated/amdx/shader_enqueue.rs @@ -308,19 +308,19 @@ pub(crate) mod reexport { self.stage_count = stage_count; self } - pub fn p_stages( + pub fn stages( mut self, - p_stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], + stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], ) -> Self { - self.stage_count = p_stages.len() as _; - self.p_stages = p_stages.as_ptr(); + self.stage_count = stages.len() as _; + self.p_stages = stages.as_ptr(); self } - pub fn p_library_info( + pub fn library_info( mut self, - p_library_info: &'a crate::vk::PipelineLibraryCreateInfoKHR<'a>, + library_info: &'a crate::vk::PipelineLibraryCreateInfoKHR<'a>, ) -> Self { - self.p_library_info = p_library_info; + self.p_library_info = library_info; self } pub fn layout(mut self, layout: crate::vk::PipelineLayout) -> Self { @@ -366,11 +366,11 @@ pub(crate) mod reexport { } } impl<'a> PipelineShaderStageNodeCreateInfoAMDX<'a> { - pub fn p_name(mut self, p_name: &'a core::ffi::CStr) -> Self { - self.p_name = p_name.as_ptr(); + pub fn name(mut self, name: &'a core::ffi::CStr) -> Self { + self.p_name = name.as_ptr(); self } - pub unsafe fn p_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_name.is_null() { None } else { diff --git a/ash-rewrite/src/generated/arm/data_graph.rs b/ash-rewrite/src/generated/arm/data_graph.rs index 2940f6e3a..bb80ff1b6 100644 --- a/ash-rewrite/src/generated/arm/data_graph.rs +++ b/ash-rewrite/src/generated/arm/data_graph.rs @@ -383,11 +383,8 @@ pub(crate) mod reexport { self.id = id; self } - pub fn p_constant_data( - mut self, - p_constant_data: &'a core::ffi::c_void, - ) -> Self { - self.p_constant_data = p_constant_data; + pub fn constant_data(mut self, constant_data: &'a core::ffi::c_void) -> Self { + self.p_constant_data = constant_data; self } } @@ -455,14 +452,11 @@ pub(crate) mod reexport { } } impl<'a> DataGraphPipelineCompilerControlCreateInfoARM<'a> { - pub fn p_vendor_options( - mut self, - p_vendor_options: &'a core::ffi::CStr, - ) -> Self { - self.p_vendor_options = p_vendor_options.as_ptr(); + pub fn vendor_options(mut self, vendor_options: &'a core::ffi::CStr) -> Self { + self.p_vendor_options = vendor_options.as_ptr(); self } - pub unsafe fn p_vendor_options_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn vendor_options_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_vendor_options.is_null() { None } else { @@ -510,12 +504,12 @@ pub(crate) mod reexport { self.resource_info_count = resource_info_count; self } - pub fn p_resource_infos( + pub fn resource_infos( mut self, - p_resource_infos: &'a [crate::vk::DataGraphPipelineResourceInfoARM<'a>], + resource_infos: &'a [crate::vk::DataGraphPipelineResourceInfoARM<'a>], ) -> Self { - self.resource_info_count = p_resource_infos.len() as _; - self.p_resource_infos = p_resource_infos.as_ptr(); + self.resource_info_count = resource_infos.len() as _; + self.p_resource_infos = resource_infos.as_ptr(); self } } @@ -556,34 +550,34 @@ pub(crate) mod reexport { self.module = module; self } - pub fn p_name(mut self, p_name: &'a core::ffi::CStr) -> Self { - self.p_name = p_name.as_ptr(); + pub fn name(mut self, name: &'a core::ffi::CStr) -> Self { + self.p_name = name.as_ptr(); self } - pub unsafe fn p_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_name.is_null() { None } else { Some(unsafe { core::ffi::CStr::from_ptr(self.p_name) }) } } - pub fn p_specialization_info( + pub fn specialization_info( mut self, - p_specialization_info: &'a crate::vk::SpecializationInfo<'a>, + specialization_info: &'a crate::vk::SpecializationInfo<'a>, ) -> Self { - self.p_specialization_info = p_specialization_info; + self.p_specialization_info = specialization_info; self } pub fn constant_count(mut self, constant_count: u32) -> Self { self.constant_count = constant_count; self } - pub fn p_constants( + pub fn constants( mut self, - p_constants: &'a [crate::vk::DataGraphPipelineConstantARM<'a>], + constants: &'a [crate::vk::DataGraphPipelineConstantARM<'a>], ) -> Self { - self.constant_count = p_constants.len() as _; - self.p_constants = p_constants.as_ptr(); + self.constant_count = constants.len() as _; + self.p_constants = constants.as_ptr(); self } } @@ -882,9 +876,9 @@ pub(crate) mod reexport { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a mut [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_mut_ptr().cast(); + pub fn data(mut self, data: &'a mut [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_mut_ptr().cast(); self } } @@ -919,9 +913,9 @@ pub(crate) mod reexport { self.identifier_size = identifier_size; self } - pub fn p_identifier(mut self, p_identifier: &'a [u8]) -> Self { - self.identifier_size = p_identifier.len() as _; - self.p_identifier = p_identifier.as_ptr(); + pub fn identifier(mut self, identifier: &'a [u8]) -> Self { + self.identifier_size = identifier.len() as _; + self.p_identifier = identifier.as_ptr(); self } } @@ -1167,12 +1161,12 @@ pub(crate) mod reexport { self.processing_engine_count = processing_engine_count; self } - pub fn p_processing_engines( + pub fn processing_engines( mut self, - p_processing_engines: &'a mut [crate::vk::PhysicalDeviceDataGraphProcessingEngineARM], + processing_engines: &'a mut [crate::vk::PhysicalDeviceDataGraphProcessingEngineARM], ) -> Self { - self.processing_engine_count = p_processing_engines.len() as _; - self.p_processing_engines = p_processing_engines.as_mut_ptr(); + self.processing_engine_count = processing_engines.len() as _; + self.p_processing_engines = processing_engines.as_mut_ptr(); self } } diff --git a/ash-rewrite/src/generated/arm/data_graph_instruction_set_tosa.rs b/ash-rewrite/src/generated/arm/data_graph_instruction_set_tosa.rs index 1f8ac2968..d6006711e 100644 --- a/ash-rewrite/src/generated/arm/data_graph_instruction_set_tosa.rs +++ b/ash-rewrite/src/generated/arm/data_graph_instruction_set_tosa.rs @@ -110,24 +110,24 @@ pub(crate) mod reexport { self.profile_count = profile_count; self } - pub fn p_profiles( + pub fn profiles( mut self, - p_profiles: &'a [crate::vk::DataGraphTOSANameQualityARM], + profiles: &'a [crate::vk::DataGraphTOSANameQualityARM], ) -> Self { - self.profile_count = p_profiles.len() as _; - self.p_profiles = p_profiles.as_ptr(); + self.profile_count = profiles.len() as _; + self.p_profiles = profiles.as_ptr(); self } pub fn extension_count(mut self, extension_count: u32) -> Self { self.extension_count = extension_count; self } - pub fn p_extensions( + pub fn extensions( mut self, - p_extensions: &'a [crate::vk::DataGraphTOSANameQualityARM], + extensions: &'a [crate::vk::DataGraphTOSANameQualityARM], ) -> Self { - self.extension_count = p_extensions.len() as _; - self.p_extensions = p_extensions.as_ptr(); + self.extension_count = extensions.len() as _; + self.p_extensions = extensions.as_ptr(); self } pub fn level(mut self, level: crate::vk::DataGraphTOSALevelARM) -> Self { diff --git a/ash-rewrite/src/generated/arm/data_graph_optical_flow.rs b/ash-rewrite/src/generated/arm/data_graph_optical_flow.rs index cee40e39b..36c8ec4b7 100644 --- a/ash-rewrite/src/generated/arm/data_graph_optical_flow.rs +++ b/ash-rewrite/src/generated/arm/data_graph_optical_flow.rs @@ -329,12 +329,12 @@ pub(crate) mod reexport { self.connection_count = connection_count; self } - pub fn p_connections( + pub fn connections( mut self, - p_connections: &'a [crate::vk::DataGraphPipelineSingleNodeConnectionARM<'a>], + connections: &'a [crate::vk::DataGraphPipelineSingleNodeConnectionARM<'a>], ) -> Self { - self.connection_count = p_connections.len() as _; - self.p_connections = p_connections.as_ptr(); + self.connection_count = connections.len() as _; + self.p_connections = connections.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/arm/performance_counters_by_region.rs b/ash-rewrite/src/generated/arm/performance_counters_by_region.rs index 6321976f9..025c9d1b9 100644 --- a/ash-rewrite/src/generated/arm/performance_counters_by_region.rs +++ b/ash-rewrite/src/generated/arm/performance_counters_by_region.rs @@ -249,12 +249,12 @@ pub(crate) mod reexport { self.counter_address_count = counter_address_count; self } - pub fn p_counter_addresses( + pub fn counter_addresses( mut self, - p_counter_addresses: &'a [crate::vk::DeviceAddress], + counter_addresses: &'a [crate::vk::DeviceAddress], ) -> Self { - self.counter_address_count = p_counter_addresses.len() as _; - self.p_counter_addresses = p_counter_addresses.as_ptr(); + self.counter_address_count = counter_addresses.len() as _; + self.p_counter_addresses = counter_addresses.as_ptr(); self } pub fn serialize_regions(mut self, serialize_regions: bool) -> Self { @@ -265,9 +265,9 @@ pub(crate) mod reexport { self.counter_index_count = counter_index_count; self } - pub fn p_counter_indices(mut self, p_counter_indices: &'a mut [u32]) -> Self { - self.counter_index_count = p_counter_indices.len() as _; - self.p_counter_indices = p_counter_indices.as_mut_ptr(); + pub fn counter_indices(mut self, counter_indices: &'a mut [u32]) -> Self { + self.counter_index_count = counter_indices.len() as _; + self.p_counter_indices = counter_indices.as_mut_ptr(); self } } diff --git a/ash-rewrite/src/generated/arm/render_pass_striped.rs b/ash-rewrite/src/generated/arm/render_pass_striped.rs index 1f3d4db2b..29368853d 100644 --- a/ash-rewrite/src/generated/arm/render_pass_striped.rs +++ b/ash-rewrite/src/generated/arm/render_pass_striped.rs @@ -131,12 +131,12 @@ impl<'a> RenderPassStripeBeginInfoARM<'a> { self.stripe_info_count = stripe_info_count; self } - pub fn p_stripe_infos( + pub fn stripe_infos( mut self, - p_stripe_infos: &'a [crate::vk::RenderPassStripeInfoARM<'a>], + stripe_infos: &'a [crate::vk::RenderPassStripeInfoARM<'a>], ) -> Self { - self.stripe_info_count = p_stripe_infos.len() as _; - self.p_stripe_infos = p_stripe_infos.as_ptr(); + self.stripe_info_count = stripe_infos.len() as _; + self.p_stripe_infos = stripe_infos.as_ptr(); self } } @@ -173,12 +173,12 @@ impl<'a> RenderPassStripeSubmitInfoARM<'a> { self.stripe_semaphore_info_count = stripe_semaphore_info_count; self } - pub fn p_stripe_semaphore_infos( + pub fn stripe_semaphore_infos( mut self, - p_stripe_semaphore_infos: &'a [crate::vk::SemaphoreSubmitInfo<'a>], + stripe_semaphore_infos: &'a [crate::vk::SemaphoreSubmitInfo<'a>], ) -> Self { - self.stripe_semaphore_info_count = p_stripe_semaphore_infos.len() as _; - self.p_stripe_semaphore_infos = p_stripe_semaphore_infos.as_ptr(); + self.stripe_semaphore_info_count = stripe_semaphore_infos.len() as _; + self.p_stripe_semaphore_infos = stripe_semaphore_infos.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/arm/tensors.rs b/ash-rewrite/src/generated/arm/tensors.rs index 38beb823b..2bd1ba901 100644 --- a/ash-rewrite/src/generated/arm/tensors.rs +++ b/ash-rewrite/src/generated/arm/tensors.rs @@ -267,14 +267,14 @@ pub(crate) mod reexport { self.dimension_count = dimension_count; self } - pub fn p_dimensions(mut self, p_dimensions: &'a [i64]) -> Self { - self.dimension_count = p_dimensions.len() as _; - self.p_dimensions = p_dimensions.as_ptr(); + pub fn dimensions(mut self, dimensions: &'a [i64]) -> Self { + self.dimension_count = dimensions.len() as _; + self.p_dimensions = dimensions.as_ptr(); self } - pub fn p_strides(mut self, p_strides: &'a [i64]) -> Self { - self.dimension_count = p_strides.len() as _; - self.p_strides = p_strides.as_ptr(); + pub fn strides(mut self, strides: &'a [i64]) -> Self { + self.dimension_count = strides.len() as _; + self.p_strides = strides.as_ptr(); self } pub fn usage(mut self, usage: crate::vk::TensorUsageFlagsARM) -> Self { @@ -316,11 +316,11 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_description( + pub fn description( mut self, - p_description: &'a crate::vk::TensorDescriptionARM<'a>, + description: &'a crate::vk::TensorDescriptionARM<'a>, ) -> Self { - self.p_description = p_description; + self.p_description = description; self } pub fn sharing_mode(mut self, sharing_mode: crate::vk::SharingMode) -> Self { @@ -334,12 +334,9 @@ pub(crate) mod reexport { self.queue_family_index_count = queue_family_index_count; self } - pub fn p_queue_family_indices( - mut self, - p_queue_family_indices: &'a [u32], - ) -> Self { - self.queue_family_index_count = p_queue_family_indices.len() as _; - self.p_queue_family_indices = p_queue_family_indices.as_ptr(); + pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self { + self.queue_family_index_count = queue_family_indices.len() as _; + self.p_queue_family_indices = queue_family_indices.as_ptr(); self } } @@ -439,12 +436,12 @@ pub(crate) mod reexport { self.tensor_view_count = tensor_view_count; self } - pub fn p_tensor_views( + pub fn tensor_views( mut self, - p_tensor_views: &'a [crate::vk::TensorViewARM], + tensor_views: &'a [crate::vk::TensorViewARM], ) -> Self { - self.tensor_view_count = p_tensor_views.len() as _; - self.p_tensor_views = p_tensor_views.as_ptr(); + self.tensor_view_count = tensor_views.len() as _; + self.p_tensor_views = tensor_views.as_ptr(); self } } @@ -732,12 +729,12 @@ pub(crate) mod reexport { self.tensor_memory_barrier_count = tensor_memory_barrier_count; self } - pub fn p_tensor_memory_barriers( + pub fn tensor_memory_barriers( mut self, - p_tensor_memory_barriers: &'a [crate::vk::TensorMemoryBarrierARM<'a>], + tensor_memory_barriers: &'a [crate::vk::TensorMemoryBarrierARM<'a>], ) -> Self { - self.tensor_memory_barrier_count = p_tensor_memory_barriers.len() as _; - self.p_tensor_memory_barriers = p_tensor_memory_barriers.as_ptr(); + self.tensor_memory_barrier_count = tensor_memory_barriers.len() as _; + self.p_tensor_memory_barriers = tensor_memory_barriers.as_ptr(); self } } @@ -837,11 +834,11 @@ pub(crate) mod reexport { } } impl<'a> DeviceTensorMemoryRequirementsARM<'a> { - pub fn p_create_info( + pub fn create_info( mut self, - p_create_info: &'a crate::vk::TensorCreateInfoARM<'a>, + create_info: &'a crate::vk::TensorCreateInfoARM<'a>, ) -> Self { - self.p_create_info = p_create_info; + self.p_create_info = create_info; self } } @@ -885,12 +882,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( - mut self, - p_regions: &'a [crate::vk::TensorCopyARM<'a>], - ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::TensorCopyARM<'a>]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -926,19 +920,19 @@ pub(crate) mod reexport { self.dimension_count = dimension_count; self } - pub fn p_src_offset(mut self, p_src_offset: &'a [u64]) -> Self { - self.dimension_count = p_src_offset.len() as _; - self.p_src_offset = p_src_offset.as_ptr(); + pub fn src_offset(mut self, src_offset: &'a [u64]) -> Self { + self.dimension_count = src_offset.len() as _; + self.p_src_offset = src_offset.as_ptr(); self } - pub fn p_dst_offset(mut self, p_dst_offset: &'a [u64]) -> Self { - self.dimension_count = p_dst_offset.len() as _; - self.p_dst_offset = p_dst_offset.as_ptr(); + pub fn dst_offset(mut self, dst_offset: &'a [u64]) -> Self { + self.dimension_count = dst_offset.len() as _; + self.p_dst_offset = dst_offset.as_ptr(); self } - pub fn p_extent(mut self, p_extent: &'a [u64]) -> Self { - self.dimension_count = p_extent.len() as _; - self.p_extent = p_extent.as_ptr(); + pub fn extent(mut self, extent: &'a [u64]) -> Self { + self.dimension_count = extent.len() as _; + self.p_extent = extent.as_ptr(); self } } @@ -1177,9 +1171,9 @@ pub(crate) mod reexport { self.tensor_count = tensor_count; self } - pub fn p_tensors(mut self, p_tensors: &'a [crate::vk::TensorARM]) -> Self { - self.tensor_count = p_tensors.len() as _; - self.p_tensors = p_tensors.as_ptr(); + pub fn tensors(mut self, tensors: &'a [crate::vk::TensorARM]) -> Self { + self.tensor_count = tensors.len() as _; + self.p_tensors = tensors.as_ptr(); self } } @@ -1190,7 +1184,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub flags: crate::vk::TensorCreateFlagsARM, pub p_description: *const crate::vk::TensorDescriptionARM<'a>, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -1214,16 +1208,16 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_description( + pub fn description( mut self, - p_description: &'a crate::vk::TensorDescriptionARM<'a>, + description: &'a crate::vk::TensorDescriptionARM<'a>, ) -> Self { - self.p_description = p_description; + self.p_description = description; self } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/ext/color_write_enable.rs b/ash-rewrite/src/generated/ext/color_write_enable.rs index 57833bad7..93b99e7fa 100644 --- a/ash-rewrite/src/generated/ext/color_write_enable.rs +++ b/ash-rewrite/src/generated/ext/color_write_enable.rs @@ -98,12 +98,12 @@ pub(crate) mod reexport { self.attachment_count = attachment_count; self } - pub fn p_color_write_enables( + pub fn color_write_enables( mut self, - p_color_write_enables: &'a [crate::vk::Bool32], + color_write_enables: &'a [crate::vk::Bool32], ) -> Self { - self.attachment_count = p_color_write_enables.len() as _; - self.p_color_write_enables = p_color_write_enables.as_ptr(); + self.attachment_count = color_write_enables.len() as _; + self.p_color_write_enables = color_write_enables.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/custom_resolve.rs b/ash-rewrite/src/generated/ext/custom_resolve.rs index b72c6947e..9256706bd 100644 --- a/ash-rewrite/src/generated/ext/custom_resolve.rs +++ b/ash-rewrite/src/generated/ext/custom_resolve.rs @@ -131,12 +131,12 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_formats( + pub fn color_attachment_formats( mut self, - p_color_attachment_formats: &'a [crate::vk::Format], + color_attachment_formats: &'a [crate::vk::Format], ) -> Self { - self.color_attachment_count = p_color_attachment_formats.len() as _; - self.p_color_attachment_formats = p_color_attachment_formats.as_ptr(); + self.color_attachment_count = color_attachment_formats.len() as _; + self.p_color_attachment_formats = color_attachment_formats.as_ptr(); self } pub fn depth_attachment_format( diff --git a/ash-rewrite/src/generated/ext/debug_marker.rs b/ash-rewrite/src/generated/ext/debug_marker.rs index 144b80d70..220923a0d 100644 --- a/ash-rewrite/src/generated/ext/debug_marker.rs +++ b/ash-rewrite/src/generated/ext/debug_marker.rs @@ -131,11 +131,11 @@ pub(crate) mod reexport { self.object = object; self } - pub fn p_object_name(mut self, p_object_name: &'a core::ffi::CStr) -> Self { - self.p_object_name = p_object_name.as_ptr(); + pub fn object_name(mut self, object_name: &'a core::ffi::CStr) -> Self { + self.p_object_name = object_name.as_ptr(); self } - pub unsafe fn p_object_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn object_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_object_name.is_null() { None } else { @@ -192,9 +192,9 @@ pub(crate) mod reexport { self.tag_size = tag_size; self } - pub fn p_tag(mut self, p_tag: &'a [u8]) -> Self { - self.tag_size = p_tag.len() as _; - self.p_tag = p_tag.as_ptr().cast(); + pub fn tag(mut self, tag: &'a [u8]) -> Self { + self.tag_size = tag.len() as _; + self.p_tag = tag.as_ptr().cast(); self } } @@ -222,11 +222,11 @@ pub(crate) mod reexport { } } impl<'a> DebugMarkerMarkerInfoEXT<'a> { - pub fn p_marker_name(mut self, p_marker_name: &'a core::ffi::CStr) -> Self { - self.p_marker_name = p_marker_name.as_ptr(); + pub fn marker_name(mut self, marker_name: &'a core::ffi::CStr) -> Self { + self.p_marker_name = marker_name.as_ptr(); self } - pub unsafe fn p_marker_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn marker_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_marker_name.is_null() { None } else { diff --git a/ash-rewrite/src/generated/ext/debug_report.rs b/ash-rewrite/src/generated/ext/debug_report.rs index c5cd1829f..45b61079e 100644 --- a/ash-rewrite/src/generated/ext/debug_report.rs +++ b/ash-rewrite/src/generated/ext/debug_report.rs @@ -113,8 +113,8 @@ pub(crate) mod reexport { self.pfn_callback = pfn_callback; self } - pub fn p_user_data(mut self, p_user_data: &'a mut core::ffi::c_void) -> Self { - self.p_user_data = p_user_data; + pub fn user_data(mut self, user_data: &'a mut core::ffi::c_void) -> Self { + self.p_user_data = user_data; self } } diff --git a/ash-rewrite/src/generated/ext/debug_utils.rs b/ash-rewrite/src/generated/ext/debug_utils.rs index ea882d553..cdae1f9c8 100644 --- a/ash-rewrite/src/generated/ext/debug_utils.rs +++ b/ash-rewrite/src/generated/ext/debug_utils.rs @@ -189,7 +189,7 @@ impl InstanceFn { submit_debug_utils_message_ext: unsafe { unsafe extern "system" fn submit_debug_utils_message_ext( _: crate::vk::Instance, - _: crate::vk::DebugUtilsMessageSeverityFlagBitsEXT, + _: crate::vk::DebugUtilsMessageSeverityFlagsEXT, _: crate::vk::DebugUtilsMessageTypeFlagsEXT, _: *const crate::vk::DebugUtilsMessengerCallbackDataEXT<'_>, ) { @@ -246,11 +246,11 @@ pub(crate) mod reexport { self.object_handle = object_handle; self } - pub fn p_object_name(mut self, p_object_name: &'a core::ffi::CStr) -> Self { - self.p_object_name = p_object_name.as_ptr(); + pub fn object_name(mut self, object_name: &'a core::ffi::CStr) -> Self { + self.p_object_name = object_name.as_ptr(); self } - pub unsafe fn p_object_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn object_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_object_name.is_null() { None } else { @@ -304,9 +304,9 @@ pub(crate) mod reexport { self.tag_size = tag_size; self } - pub fn p_tag(mut self, p_tag: &'a [u8]) -> Self { - self.tag_size = p_tag.len() as _; - self.p_tag = p_tag.as_ptr().cast(); + pub fn tag(mut self, tag: &'a [u8]) -> Self { + self.tag_size = tag.len() as _; + self.p_tag = tag.as_ptr().cast(); self } } @@ -334,11 +334,11 @@ pub(crate) mod reexport { } } impl<'a> DebugUtilsLabelEXT<'a> { - pub fn p_label_name(mut self, p_label_name: &'a core::ffi::CStr) -> Self { - self.p_label_name = p_label_name.as_ptr(); + pub fn label_name(mut self, label_name: &'a core::ffi::CStr) -> Self { + self.p_label_name = label_name.as_ptr(); self } - pub unsafe fn p_label_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn label_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_label_name.is_null() { None } else { @@ -410,8 +410,8 @@ pub(crate) mod reexport { self.pfn_user_callback = pfn_user_callback; self } - pub fn p_user_data(mut self, p_user_data: &'a mut core::ffi::c_void) -> Self { - self.p_user_data = p_user_data; + pub fn user_data(mut self, user_data: &'a mut core::ffi::c_void) -> Self { + self.p_user_data = user_data; self } } @@ -463,14 +463,11 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_message_id_name( - mut self, - p_message_id_name: &'a core::ffi::CStr, - ) -> Self { - self.p_message_id_name = p_message_id_name.as_ptr(); + pub fn message_id_name(mut self, message_id_name: &'a core::ffi::CStr) -> Self { + self.p_message_id_name = message_id_name.as_ptr(); self } - pub unsafe fn p_message_id_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn message_id_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_message_id_name.is_null() { None } else { @@ -481,11 +478,11 @@ pub(crate) mod reexport { self.message_id_number = message_id_number; self } - pub fn p_message(mut self, p_message: &'a core::ffi::CStr) -> Self { - self.p_message = p_message.as_ptr(); + pub fn message(mut self, message: &'a core::ffi::CStr) -> Self { + self.p_message = message.as_ptr(); self } - pub unsafe fn p_message_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn message_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_message.is_null() { None } else { @@ -496,36 +493,36 @@ pub(crate) mod reexport { self.queue_label_count = queue_label_count; self } - pub fn p_queue_labels( + pub fn queue_labels( mut self, - p_queue_labels: &'a [crate::vk::DebugUtilsLabelEXT<'a>], + queue_labels: &'a [crate::vk::DebugUtilsLabelEXT<'a>], ) -> Self { - self.queue_label_count = p_queue_labels.len() as _; - self.p_queue_labels = p_queue_labels.as_ptr(); + self.queue_label_count = queue_labels.len() as _; + self.p_queue_labels = queue_labels.as_ptr(); self } pub fn cmd_buf_label_count(mut self, cmd_buf_label_count: u32) -> Self { self.cmd_buf_label_count = cmd_buf_label_count; self } - pub fn p_cmd_buf_labels( + pub fn cmd_buf_labels( mut self, - p_cmd_buf_labels: &'a [crate::vk::DebugUtilsLabelEXT<'a>], + cmd_buf_labels: &'a [crate::vk::DebugUtilsLabelEXT<'a>], ) -> Self { - self.cmd_buf_label_count = p_cmd_buf_labels.len() as _; - self.p_cmd_buf_labels = p_cmd_buf_labels.as_ptr(); + self.cmd_buf_label_count = cmd_buf_labels.len() as _; + self.p_cmd_buf_labels = cmd_buf_labels.as_ptr(); self } pub fn object_count(mut self, object_count: u32) -> Self { self.object_count = object_count; self } - pub fn p_objects( + pub fn objects( mut self, - p_objects: &'a [crate::vk::DebugUtilsObjectNameInfoEXT<'a>], + objects: &'a [crate::vk::DebugUtilsObjectNameInfoEXT<'a>], ) -> Self { - self.object_count = p_objects.len() as _; - self.p_objects = p_objects.as_ptr(); + self.object_count = objects.len() as _; + self.p_objects = objects.as_ptr(); self } } @@ -881,7 +878,7 @@ pub(crate) mod reexport { } pub type PFN_vkDebugUtilsMessengerCallbackEXT = Option< unsafe extern "system" fn( - message_severity: crate::vk::DebugUtilsMessageSeverityFlagBitsEXT, + message_severity: crate::vk::DebugUtilsMessageSeverityFlagsEXT, message_types: crate::vk::DebugUtilsMessageTypeFlagsEXT, p_callback_data: *const crate::vk::DebugUtilsMessengerCallbackDataEXT<'_>, p_user_data: *mut core::ffi::c_void, @@ -930,7 +927,7 @@ pub(crate) mod reexport { ); pub type PFN_vkSubmitDebugUtilsMessageEXT = unsafe extern "system" fn( instance: crate::vk::Instance, - message_severity: crate::vk::DebugUtilsMessageSeverityFlagBitsEXT, + message_severity: crate::vk::DebugUtilsMessageSeverityFlagsEXT, message_types: crate::vk::DebugUtilsMessageTypeFlagsEXT, p_callback_data: *const crate::vk::DebugUtilsMessengerCallbackDataEXT<'_>, ); diff --git a/ash-rewrite/src/generated/ext/depth_clamp_control.rs b/ash-rewrite/src/generated/ext/depth_clamp_control.rs index 4958515d9..c54ba307e 100644 --- a/ash-rewrite/src/generated/ext/depth_clamp_control.rs +++ b/ash-rewrite/src/generated/ext/depth_clamp_control.rs @@ -67,11 +67,11 @@ impl<'a> PipelineViewportDepthClampControlCreateInfoEXT<'a> { self.depth_clamp_mode = depth_clamp_mode; self } - pub fn p_depth_clamp_range( + pub fn depth_clamp_range( mut self, - p_depth_clamp_range: &'a crate::vk::DepthClampRangeEXT, + depth_clamp_range: &'a crate::vk::DepthClampRangeEXT, ) -> Self { - self.p_depth_clamp_range = p_depth_clamp_range; + self.p_depth_clamp_range = depth_clamp_range; self } } diff --git a/ash-rewrite/src/generated/ext/descriptor_heap.rs b/ash-rewrite/src/generated/ext/descriptor_heap.rs index f49f59995..762681d95 100644 --- a/ash-rewrite/src/generated/ext/descriptor_heap.rs +++ b/ash-rewrite/src/generated/ext/descriptor_heap.rs @@ -333,8 +333,8 @@ pub(crate) mod reexport { } } impl<'a> ImageDescriptorInfoEXT<'a> { - pub fn p_view(mut self, p_view: &'a crate::vk::ImageViewCreateInfo<'a>) -> Self { - self.p_view = p_view; + pub fn view(mut self, view: &'a crate::vk::ImageViewCreateInfo<'a>) -> Self { + self.p_view = view; self } pub fn layout(mut self, layout: crate::vk::ImageLayout) -> Self { @@ -475,11 +475,11 @@ pub(crate) mod reexport { self.heap_array_stride = heap_array_stride; self } - pub fn p_embedded_sampler( + pub fn embedded_sampler( mut self, - p_embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, + embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, ) -> Self { - self.p_embedded_sampler = p_embedded_sampler; + self.p_embedded_sampler = embedded_sampler; self } pub fn sampler_heap_offset(mut self, sampler_heap_offset: u32) -> Self { @@ -526,11 +526,11 @@ pub(crate) mod reexport { self.heap_array_stride = heap_array_stride; self } - pub fn p_embedded_sampler( + pub fn embedded_sampler( mut self, - p_embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, + embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, ) -> Self { - self.p_embedded_sampler = p_embedded_sampler; + self.p_embedded_sampler = embedded_sampler; self } pub fn use_combined_image_sampler_index( @@ -602,11 +602,11 @@ pub(crate) mod reexport { self.heap_array_stride = heap_array_stride; self } - pub fn p_embedded_sampler( + pub fn embedded_sampler( mut self, - p_embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, + embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, ) -> Self { - self.p_embedded_sampler = p_embedded_sampler; + self.p_embedded_sampler = embedded_sampler; self } pub fn use_combined_image_sampler_index( @@ -676,11 +676,11 @@ pub(crate) mod reexport { self.heap_index_stride = heap_index_stride; self } - pub fn p_embedded_sampler( + pub fn embedded_sampler( mut self, - p_embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, + embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, ) -> Self { - self.p_embedded_sampler = p_embedded_sampler; + self.p_embedded_sampler = embedded_sampler; self } pub fn use_combined_image_sampler_index( @@ -759,11 +759,11 @@ pub(crate) mod reexport { self.heap_array_stride = heap_array_stride; self } - pub fn p_embedded_sampler( + pub fn embedded_sampler( mut self, - p_embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, + embedded_sampler: &'a crate::vk::SamplerCreateInfo<'a>, ) -> Self { - self.p_embedded_sampler = p_embedded_sampler; + self.p_embedded_sampler = embedded_sampler; self } pub fn use_combined_image_sampler_index( @@ -913,12 +913,12 @@ pub(crate) mod reexport { self.mapping_count = mapping_count; self } - pub fn p_mappings( + pub fn mappings( mut self, - p_mappings: &'a [crate::vk::DescriptorSetAndBindingMappingEXT<'a>], + mappings: &'a [crate::vk::DescriptorSetAndBindingMappingEXT<'a>], ) -> Self { - self.mapping_count = p_mappings.len() as _; - self.p_mappings = p_mappings.as_ptr(); + self.mapping_count = mappings.len() as _; + self.p_mappings = mappings.as_ptr(); self } } @@ -978,11 +978,11 @@ pub(crate) mod reexport { } } impl<'a> OpaqueCaptureDataCreateInfoEXT<'a> { - pub fn p_data( + pub fn data( mut self, - p_data: &'a crate::vk::HostAddressRangeConstEXT<'a>, + data: &'a crate::vk::HostAddressRangeConstEXT<'a>, ) -> Self { - self.p_data = p_data; + self.p_data = data; self } } @@ -1315,18 +1315,18 @@ pub(crate) mod reexport { } } impl<'a> CommandBufferInheritanceDescriptorHeapInfoEXT<'a> { - pub fn p_sampler_heap_bind_info( + pub fn sampler_heap_bind_info( mut self, - p_sampler_heap_bind_info: &'a crate::vk::BindHeapInfoEXT<'a>, + sampler_heap_bind_info: &'a crate::vk::BindHeapInfoEXT<'a>, ) -> Self { - self.p_sampler_heap_bind_info = p_sampler_heap_bind_info; + self.p_sampler_heap_bind_info = sampler_heap_bind_info; self } - pub fn p_resource_heap_bind_info( + pub fn resource_heap_bind_info( mut self, - p_resource_heap_bind_info: &'a crate::vk::BindHeapInfoEXT<'a>, + resource_heap_bind_info: &'a crate::vk::BindHeapInfoEXT<'a>, ) -> Self { - self.p_resource_heap_bind_info = p_resource_heap_bind_info; + self.p_resource_heap_bind_info = resource_heap_bind_info; self } } diff --git a/ash-rewrite/src/generated/ext/device_fault.rs b/ash-rewrite/src/generated/ext/device_fault.rs index 054b7d9bd..5fb6e82c1 100644 --- a/ash-rewrite/src/generated/ext/device_fault.rs +++ b/ash-rewrite/src/generated/ext/device_fault.rs @@ -158,25 +158,25 @@ pub(crate) mod reexport { ) -> core::result::Result<&core::ffi::CStr, core::ffi::FromBytesUntilNulError> { crate::wrap_c_str_slice_until_nul(&self.description) } - pub fn p_address_infos( + pub fn address_infos( mut self, - p_address_infos: &'a mut crate::vk::DeviceFaultAddressInfoKHR, + address_infos: &'a mut crate::vk::DeviceFaultAddressInfoKHR, ) -> Self { - self.p_address_infos = p_address_infos; + self.p_address_infos = address_infos; self } - pub fn p_vendor_infos( + pub fn vendor_infos( mut self, - p_vendor_infos: &'a mut crate::vk::DeviceFaultVendorInfoKHR, + vendor_infos: &'a mut crate::vk::DeviceFaultVendorInfoKHR, ) -> Self { - self.p_vendor_infos = p_vendor_infos; + self.p_vendor_infos = vendor_infos; self } - pub fn p_vendor_binary_data( + pub fn vendor_binary_data( mut self, - p_vendor_binary_data: &'a mut core::ffi::c_void, + vendor_binary_data: &'a mut core::ffi::c_void, ) -> Self { - self.p_vendor_binary_data = p_vendor_binary_data; + self.p_vendor_binary_data = vendor_binary_data; self } } diff --git a/ash-rewrite/src/generated/ext/device_generated_commands.rs b/ash-rewrite/src/generated/ext/device_generated_commands.rs index e28911db4..2059c3b0d 100644 --- a/ash-rewrite/src/generated/ext/device_generated_commands.rs +++ b/ash-rewrite/src/generated/ext/device_generated_commands.rs @@ -414,9 +414,9 @@ pub(crate) mod reexport { self.shader_count = shader_count; self } - pub fn p_shaders(mut self, p_shaders: &'a [crate::vk::ShaderEXT]) -> Self { - self.shader_count = p_shaders.len() as _; - self.p_shaders = p_shaders.as_ptr(); + pub fn shaders(mut self, shaders: &'a [crate::vk::ShaderEXT]) -> Self { + self.shader_count = shaders.len() as _; + self.p_shaders = shaders.as_ptr(); self } } @@ -538,12 +538,12 @@ pub(crate) mod reexport { self.set_layout_count = set_layout_count; self } - pub fn p_set_layouts( + pub fn set_layouts( mut self, - p_set_layouts: &'a [crate::vk::DescriptorSetLayout], + set_layouts: &'a [crate::vk::DescriptorSetLayout], ) -> Self { - self.set_layout_count = p_set_layouts.len() as _; - self.p_set_layouts = p_set_layouts.as_ptr(); + self.set_layout_count = set_layouts.len() as _; + self.p_set_layouts = set_layouts.as_ptr(); self } } @@ -586,22 +586,22 @@ pub(crate) mod reexport { self.shader_count = shader_count; self } - pub fn p_initial_shaders( + pub fn initial_shaders( mut self, - p_initial_shaders: &'a [crate::vk::ShaderEXT], + initial_shaders: &'a [crate::vk::ShaderEXT], ) -> Self { - self.shader_count = p_initial_shaders.len() as _; - self.p_initial_shaders = p_initial_shaders.as_ptr(); + self.shader_count = initial_shaders.len() as _; + self.p_initial_shaders = initial_shaders.as_ptr(); self } - pub fn p_set_layout_infos( + pub fn set_layout_infos( mut self, - p_set_layout_infos: &'a [crate::vk::IndirectExecutionSetShaderLayoutInfoEXT< + set_layout_infos: &'a [crate::vk::IndirectExecutionSetShaderLayoutInfoEXT< 'a, >], ) -> Self { - self.shader_count = p_set_layout_infos.len() as _; - self.p_set_layout_infos = p_set_layout_infos.as_ptr(); + self.shader_count = set_layout_infos.len() as _; + self.p_set_layout_infos = set_layout_infos.as_ptr(); self } pub fn max_shader_count(mut self, max_shader_count: u32) -> Self { @@ -615,12 +615,12 @@ pub(crate) mod reexport { self.push_constant_range_count = push_constant_range_count; self } - pub fn p_push_constant_ranges( + pub fn push_constant_ranges( mut self, - p_push_constant_ranges: &'a [crate::vk::PushConstantRange], + push_constant_ranges: &'a [crate::vk::PushConstantRange], ) -> Self { - self.push_constant_range_count = p_push_constant_ranges.len() as _; - self.p_push_constant_ranges = p_push_constant_ranges.as_ptr(); + self.push_constant_range_count = push_constant_ranges.len() as _; + self.p_push_constant_ranges = push_constant_ranges.as_ptr(); self } } @@ -896,12 +896,12 @@ pub(crate) mod reexport { self.token_count = token_count; self } - pub fn p_tokens( + pub fn tokens( mut self, - p_tokens: &'a [crate::vk::IndirectCommandsLayoutTokenEXT<'a>], + tokens: &'a [crate::vk::IndirectCommandsLayoutTokenEXT<'a>], ) -> Self { - self.token_count = p_tokens.len() as _; - self.p_tokens = p_tokens.as_ptr(); + self.token_count = tokens.len() as _; + self.p_tokens = tokens.as_ptr(); self } } @@ -1006,12 +1006,12 @@ pub(crate) mod reexport { #[repr(C)] #[derive(Clone, Copy, Default)] pub struct IndirectCommandsIndexBufferTokenEXT { - pub mode: crate::vk::IndirectCommandsInputModeFlagBitsEXT, + pub mode: crate::vk::IndirectCommandsInputModeFlagsEXT, } impl IndirectCommandsIndexBufferTokenEXT { pub fn mode( mut self, - mode: crate::vk::IndirectCommandsInputModeFlagBitsEXT, + mode: crate::vk::IndirectCommandsInputModeFlagsEXT, ) -> Self { self.mode = mode; self diff --git a/ash-rewrite/src/generated/ext/device_memory_report.rs b/ash-rewrite/src/generated/ext/device_memory_report.rs index dd2321b2c..eb2dd3436 100644 --- a/ash-rewrite/src/generated/ext/device_memory_report.rs +++ b/ash-rewrite/src/generated/ext/device_memory_report.rs @@ -73,8 +73,8 @@ impl<'a> DeviceDeviceMemoryReportCreateInfoEXT<'a> { self.pfn_user_callback = pfn_user_callback; self } - pub fn p_user_data(mut self, p_user_data: &'a mut core::ffi::c_void) -> Self { - self.p_user_data = p_user_data; + pub fn user_data(mut self, user_data: &'a mut core::ffi::c_void) -> Self { + self.p_user_data = user_data; self } } diff --git a/ash-rewrite/src/generated/ext/discard_rectangles.rs b/ash-rewrite/src/generated/ext/discard_rectangles.rs index 76271c84d..51c9750af 100644 --- a/ash-rewrite/src/generated/ext/discard_rectangles.rs +++ b/ash-rewrite/src/generated/ext/discard_rectangles.rs @@ -146,12 +146,12 @@ pub(crate) mod reexport { self.discard_rectangle_count = discard_rectangle_count; self } - pub fn p_discard_rectangles( + pub fn discard_rectangles( mut self, - p_discard_rectangles: &'a [crate::vk::Rect2D], + discard_rectangles: &'a [crate::vk::Rect2D], ) -> Self { - self.discard_rectangle_count = p_discard_rectangles.len() as _; - self.p_discard_rectangles = p_discard_rectangles.as_ptr(); + self.discard_rectangle_count = discard_rectangles.len() as _; + self.p_discard_rectangles = discard_rectangles.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/display_control.rs b/ash-rewrite/src/generated/ext/display_control.rs index c135b8924..001416deb 100644 --- a/ash-rewrite/src/generated/ext/display_control.rs +++ b/ash-rewrite/src/generated/ext/display_control.rs @@ -72,7 +72,7 @@ impl DeviceFn { unsafe extern "system" fn get_swapchain_counter_ext( _: crate::vk::Device, _: crate::vk::SwapchainKHR, - _: crate::vk::SurfaceCounterFlagBitsEXT, + _: crate::vk::SurfaceCounterFlagsEXT, _: *mut u64, ) -> crate::vk::Result { panic!("unable to load vkGetSwapchainCounterEXT") @@ -288,7 +288,7 @@ pub(crate) mod reexport { pub type PFN_vkGetSwapchainCounterEXT = unsafe extern "system" fn( device: crate::vk::Device, swapchain: crate::vk::SwapchainKHR, - counter: crate::vk::SurfaceCounterFlagBitsEXT, + counter: crate::vk::SurfaceCounterFlagsEXT, p_counter_value: *mut u64, ) -> crate::vk::Result; pub const EXT_DISPLAY_CONTROL_SPEC_VERSION: u32 = 1; diff --git a/ash-rewrite/src/generated/ext/display_surface_counter.rs b/ash-rewrite/src/generated/ext/display_surface_counter.rs index a598e0c6f..45d60b3f0 100644 --- a/ash-rewrite/src/generated/ext/display_surface_counter.rs +++ b/ash-rewrite/src/generated/ext/display_surface_counter.rs @@ -48,7 +48,7 @@ pub(crate) mod reexport { pub max_image_extent: crate::vk::Extent2D, pub max_image_array_layers: u32, pub supported_transforms: crate::vk::SurfaceTransformFlagsKHR, - pub current_transform: crate::vk::SurfaceTransformFlagBitsKHR, + pub current_transform: crate::vk::SurfaceTransformFlagsKHR, pub supported_composite_alpha: crate::vk::CompositeAlphaFlagsKHR, pub supported_usage_flags: crate::vk::ImageUsageFlags, pub supported_surface_counters: crate::vk::SurfaceCounterFlagsEXT, @@ -117,7 +117,7 @@ pub(crate) mod reexport { } pub fn current_transform( mut self, - current_transform: crate::vk::SurfaceTransformFlagBitsKHR, + current_transform: crate::vk::SurfaceTransformFlagsKHR, ) -> Self { self.current_transform = current_transform; self diff --git a/ash-rewrite/src/generated/ext/extended_dynamic_state3.rs b/ash-rewrite/src/generated/ext/extended_dynamic_state3.rs index eff9a98eb..7986be82a 100644 --- a/ash-rewrite/src/generated/ext/extended_dynamic_state3.rs +++ b/ash-rewrite/src/generated/ext/extended_dynamic_state3.rs @@ -92,7 +92,7 @@ impl DeviceFn { cmd_set_rasterization_samples_ext: unsafe { unsafe extern "system" fn cmd_set_rasterization_samples_ext( _: crate::vk::CommandBuffer, - _: crate::vk::SampleCountFlagBits, + _: crate::vk::SampleCountFlags, ) { panic!("unable to load vkCmdSetRasterizationSamplesEXT") } @@ -106,7 +106,7 @@ impl DeviceFn { cmd_set_sample_mask_ext: unsafe { unsafe extern "system" fn cmd_set_sample_mask_ext( _: crate::vk::CommandBuffer, - _: crate::vk::SampleCountFlagBits, + _: crate::vk::SampleCountFlags, _: *const crate::vk::SampleMask, ) { panic!("unable to load vkCmdSetSampleMaskEXT") @@ -1009,11 +1009,11 @@ pub(crate) mod reexport { ); pub type PFN_vkCmdSetRasterizationSamplesEXT = unsafe extern "system" fn( command_buffer: crate::vk::CommandBuffer, - rasterization_samples: crate::vk::SampleCountFlagBits, + rasterization_samples: crate::vk::SampleCountFlags, ); pub type PFN_vkCmdSetSampleMaskEXT = unsafe extern "system" fn( command_buffer: crate::vk::CommandBuffer, - samples: crate::vk::SampleCountFlagBits, + samples: crate::vk::SampleCountFlags, p_sample_mask: *const crate::vk::SampleMask, ); pub type PFN_vkCmdSetAlphaToCoverageEnableEXT = unsafe extern "system" fn( diff --git a/ash-rewrite/src/generated/ext/external_memory_host.rs b/ash-rewrite/src/generated/ext/external_memory_host.rs index 144249554..a4a419de9 100644 --- a/ash-rewrite/src/generated/ext/external_memory_host.rs +++ b/ash-rewrite/src/generated/ext/external_memory_host.rs @@ -20,7 +20,7 @@ impl DeviceFn { get_memory_host_pointer_properties_ext: unsafe { unsafe extern "system" fn get_memory_host_pointer_properties_ext( _: crate::vk::Device, - _: crate::vk::ExternalMemoryHandleTypeFlagBits, + _: crate::vk::ExternalMemoryHandleTypeFlags, _: *const core::ffi::c_void, _: *mut crate::vk::MemoryHostPointerPropertiesEXT<'_>, ) -> crate::vk::Result { @@ -42,7 +42,7 @@ pub(crate) mod reexport { pub struct ImportMemoryHostPointerInfoEXT<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub p_host_pointer: *mut core::ffi::c_void, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -65,16 +65,13 @@ pub(crate) mod reexport { impl<'a> ImportMemoryHostPointerInfoEXT<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self } - pub fn p_host_pointer( - mut self, - p_host_pointer: &'a mut core::ffi::c_void, - ) -> Self { - self.p_host_pointer = p_host_pointer; + pub fn host_pointer(mut self, host_pointer: &'a mut core::ffi::c_void) -> Self { + self.p_host_pointer = host_pointer; self } } @@ -153,7 +150,7 @@ pub(crate) mod reexport { } pub type PFN_vkGetMemoryHostPointerPropertiesEXT = unsafe extern "system" fn( device: crate::vk::Device, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, p_host_pointer: *const core::ffi::c_void, p_memory_host_pointer_properties: *mut crate::vk::MemoryHostPointerPropertiesEXT< '_, diff --git a/ash-rewrite/src/generated/ext/external_memory_metal.rs b/ash-rewrite/src/generated/ext/external_memory_metal.rs index a410fa1f8..9139b8bfa 100644 --- a/ash-rewrite/src/generated/ext/external_memory_metal.rs +++ b/ash-rewrite/src/generated/ext/external_memory_metal.rs @@ -36,7 +36,7 @@ impl DeviceFn { get_memory_metal_handle_properties_ext: unsafe { unsafe extern "system" fn get_memory_metal_handle_properties_ext( _: crate::vk::Device, - _: crate::vk::ExternalMemoryHandleTypeFlagBits, + _: crate::vk::ExternalMemoryHandleTypeFlags, _: *const core::ffi::c_void, _: *mut crate::vk::MemoryMetalHandlePropertiesEXT<'_>, ) -> crate::vk::Result { @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub struct ImportMemoryMetalHandleInfoEXT<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub handle: *mut core::ffi::c_void, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -81,7 +81,7 @@ pub(crate) mod reexport { impl<'a> ImportMemoryMetalHandleInfoEXT<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -124,7 +124,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub memory: crate::vk::DeviceMemory, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for MemoryGetMetalHandleInfoEXT<'a> { @@ -148,7 +148,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -173,7 +173,7 @@ pub(crate) mod reexport { ) -> crate::vk::Result; pub type PFN_vkGetMemoryMetalHandlePropertiesEXT = unsafe extern "system" fn( device: crate::vk::Device, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, p_handle: *const core::ffi::c_void, p_memory_metal_handle_properties: *mut crate::vk::MemoryMetalHandlePropertiesEXT< '_, diff --git a/ash-rewrite/src/generated/ext/fragment_density_map_offset.rs b/ash-rewrite/src/generated/ext/fragment_density_map_offset.rs index 771f85ebb..9a838a7d1 100644 --- a/ash-rewrite/src/generated/ext/fragment_density_map_offset.rs +++ b/ash-rewrite/src/generated/ext/fragment_density_map_offset.rs @@ -139,12 +139,12 @@ pub(crate) mod reexport { self.fragment_density_offset_count = fragment_density_offset_count; self } - pub fn p_fragment_density_offsets( + pub fn fragment_density_offsets( mut self, - p_fragment_density_offsets: &'a [crate::vk::Offset2D], + fragment_density_offsets: &'a [crate::vk::Offset2D], ) -> Self { - self.fragment_density_offset_count = p_fragment_density_offsets.len() as _; - self.p_fragment_density_offsets = p_fragment_density_offsets.as_ptr(); + self.fragment_density_offset_count = fragment_density_offsets.len() as _; + self.p_fragment_density_offsets = fragment_density_offsets.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/frame_boundary.rs b/ash-rewrite/src/generated/ext/frame_boundary.rs index 6814f2387..1d325bc30 100644 --- a/ash-rewrite/src/generated/ext/frame_boundary.rs +++ b/ash-rewrite/src/generated/ext/frame_boundary.rs @@ -55,18 +55,18 @@ impl<'a> FrameBoundaryEXT<'a> { self.image_count = image_count; self } - pub fn p_images(mut self, p_images: &'a [crate::vk::Image]) -> Self { - self.image_count = p_images.len() as _; - self.p_images = p_images.as_ptr(); + pub fn images(mut self, images: &'a [crate::vk::Image]) -> Self { + self.image_count = images.len() as _; + self.p_images = images.as_ptr(); self } pub fn buffer_count(mut self, buffer_count: u32) -> Self { self.buffer_count = buffer_count; self } - pub fn p_buffers(mut self, p_buffers: &'a [crate::vk::Buffer]) -> Self { - self.buffer_count = p_buffers.len() as _; - self.p_buffers = p_buffers.as_ptr(); + pub fn buffers(mut self, buffers: &'a [crate::vk::Buffer]) -> Self { + self.buffer_count = buffers.len() as _; + self.p_buffers = buffers.as_ptr(); self } pub fn tag_name(mut self, tag_name: u64) -> Self { @@ -77,9 +77,9 @@ impl<'a> FrameBoundaryEXT<'a> { self.tag_size = tag_size; self } - pub fn p_tag(mut self, p_tag: &'a [u8]) -> Self { - self.tag_size = p_tag.len() as _; - self.p_tag = p_tag.as_ptr().cast(); + pub fn tag(mut self, tag: &'a [u8]) -> Self { + self.tag_size = tag.len() as _; + self.p_tag = tag.as_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/ext/image_compression_control.rs b/ash-rewrite/src/generated/ext/image_compression_control.rs index 9e2e4ebcd..d74ceceff 100644 --- a/ash-rewrite/src/generated/ext/image_compression_control.rs +++ b/ash-rewrite/src/generated/ext/image_compression_control.rs @@ -44,12 +44,12 @@ impl<'a> ImageCompressionControlEXT<'a> { self.compression_control_plane_count = compression_control_plane_count; self } - pub fn p_fixed_rate_flags( + pub fn fixed_rate_flags( mut self, - p_fixed_rate_flags: &'a mut [crate::vk::ImageCompressionFixedRateFlagsEXT], + fixed_rate_flags: &'a mut [crate::vk::ImageCompressionFixedRateFlagsEXT], ) -> Self { - self.compression_control_plane_count = p_fixed_rate_flags.len() as _; - self.p_fixed_rate_flags = p_fixed_rate_flags.as_mut_ptr(); + self.compression_control_plane_count = fixed_rate_flags.len() as _; + self.p_fixed_rate_flags = fixed_rate_flags.as_mut_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/image_drm_format_modifier.rs b/ash-rewrite/src/generated/ext/image_drm_format_modifier.rs index a7526b85a..357cef338 100644 --- a/ash-rewrite/src/generated/ext/image_drm_format_modifier.rs +++ b/ash-rewrite/src/generated/ext/image_drm_format_modifier.rs @@ -70,12 +70,12 @@ pub(crate) mod reexport { self.drm_format_modifier_count = drm_format_modifier_count; self } - pub fn p_drm_format_modifier_properties( + pub fn drm_format_modifier_properties( mut self, - p_drm_format_modifier_properties: &'a mut [crate::vk::DrmFormatModifierPropertiesEXT], + drm_format_modifier_properties: &'a mut [crate::vk::DrmFormatModifierPropertiesEXT], ) -> Self { - self.drm_format_modifier_count = p_drm_format_modifier_properties.len() as _; - self.p_drm_format_modifier_properties = p_drm_format_modifier_properties + self.drm_format_modifier_count = drm_format_modifier_properties.len() as _; + self.p_drm_format_modifier_properties = drm_format_modifier_properties .as_mut_ptr(); self } @@ -153,12 +153,9 @@ pub(crate) mod reexport { self.queue_family_index_count = queue_family_index_count; self } - pub fn p_queue_family_indices( - mut self, - p_queue_family_indices: &'a [u32], - ) -> Self { - self.queue_family_index_count = p_queue_family_indices.len() as _; - self.p_queue_family_indices = p_queue_family_indices.as_ptr(); + pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self { + self.queue_family_index_count = queue_family_indices.len() as _; + self.p_queue_family_indices = queue_family_indices.as_ptr(); self } } @@ -196,12 +193,9 @@ pub(crate) mod reexport { self.drm_format_modifier_count = drm_format_modifier_count; self } - pub fn p_drm_format_modifiers( - mut self, - p_drm_format_modifiers: &'a [u64], - ) -> Self { - self.drm_format_modifier_count = p_drm_format_modifiers.len() as _; - self.p_drm_format_modifiers = p_drm_format_modifiers.as_ptr(); + pub fn drm_format_modifiers(mut self, drm_format_modifiers: &'a [u64]) -> Self { + self.drm_format_modifier_count = drm_format_modifiers.len() as _; + self.p_drm_format_modifiers = drm_format_modifiers.as_ptr(); self } } @@ -245,12 +239,12 @@ pub(crate) mod reexport { self.drm_format_modifier_plane_count = drm_format_modifier_plane_count; self } - pub fn p_plane_layouts( + pub fn plane_layouts( mut self, - p_plane_layouts: &'a [crate::vk::SubresourceLayout], + plane_layouts: &'a [crate::vk::SubresourceLayout], ) -> Self { - self.drm_format_modifier_plane_count = p_plane_layouts.len() as _; - self.p_plane_layouts = p_plane_layouts.as_ptr(); + self.drm_format_modifier_plane_count = plane_layouts.len() as _; + self.p_plane_layouts = plane_layouts.as_ptr(); self } } @@ -316,12 +310,12 @@ pub(crate) mod reexport { self.drm_format_modifier_count = drm_format_modifier_count; self } - pub fn p_drm_format_modifier_properties( + pub fn drm_format_modifier_properties( mut self, - p_drm_format_modifier_properties: &'a mut [crate::vk::DrmFormatModifierProperties2EXT], + drm_format_modifier_properties: &'a mut [crate::vk::DrmFormatModifierProperties2EXT], ) -> Self { - self.drm_format_modifier_count = p_drm_format_modifier_properties.len() as _; - self.p_drm_format_modifier_properties = p_drm_format_modifier_properties + self.drm_format_modifier_count = drm_format_modifier_properties.len() as _; + self.p_drm_format_modifier_properties = drm_format_modifier_properties .as_mut_ptr(); self } diff --git a/ash-rewrite/src/generated/ext/layer_settings.rs b/ash-rewrite/src/generated/ext/layer_settings.rs index 53c1be0b5..4199db2ef 100644 --- a/ash-rewrite/src/generated/ext/layer_settings.rs +++ b/ash-rewrite/src/generated/ext/layer_settings.rs @@ -31,12 +31,9 @@ impl<'a> LayerSettingsCreateInfoEXT<'a> { self.setting_count = setting_count; self } - pub fn p_settings( - mut self, - p_settings: &'a [crate::vk::LayerSettingEXT<'a>], - ) -> Self { - self.setting_count = p_settings.len() as _; - self.p_settings = p_settings.as_ptr(); + pub fn settings(mut self, settings: &'a [crate::vk::LayerSettingEXT<'a>]) -> Self { + self.setting_count = settings.len() as _; + self.p_settings = settings.as_ptr(); self } } @@ -51,22 +48,22 @@ pub struct LayerSettingEXT<'a> { pub _marker: ::core::marker::PhantomData<&'a ()>, } impl<'a> LayerSettingEXT<'a> { - pub fn p_layer_name(mut self, p_layer_name: &'a core::ffi::CStr) -> Self { - self.p_layer_name = p_layer_name.as_ptr(); + pub fn layer_name(mut self, layer_name: &'a core::ffi::CStr) -> Self { + self.p_layer_name = layer_name.as_ptr(); self } - pub unsafe fn p_layer_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn layer_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_layer_name.is_null() { None } else { Some(unsafe { core::ffi::CStr::from_ptr(self.p_layer_name) }) } } - pub fn p_setting_name(mut self, p_setting_name: &'a core::ffi::CStr) -> Self { - self.p_setting_name = p_setting_name.as_ptr(); + pub fn setting_name(mut self, setting_name: &'a core::ffi::CStr) -> Self { + self.p_setting_name = setting_name.as_ptr(); self } - pub unsafe fn p_setting_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn setting_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_setting_name.is_null() { None } else { @@ -81,9 +78,9 @@ impl<'a> LayerSettingEXT<'a> { self.value_count = value_count; self } - pub fn p_values(mut self, p_values: &'a [u8]) -> Self { - self.value_count = p_values.len() as _; - self.p_values = p_values.as_ptr().cast(); + pub fn values(mut self, values: &'a [u8]) -> Self { + self.value_count = values.len() as _; + self.p_values = values.as_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/ext/map_memory_placed.rs b/ash-rewrite/src/generated/ext/map_memory_placed.rs index bc7d016b3..cae615f00 100644 --- a/ash-rewrite/src/generated/ext/map_memory_placed.rs +++ b/ash-rewrite/src/generated/ext/map_memory_placed.rs @@ -102,11 +102,8 @@ impl<'a> Default for MemoryMapPlacedInfoEXT<'a> { } } impl<'a> MemoryMapPlacedInfoEXT<'a> { - pub fn p_placed_address( - mut self, - p_placed_address: &'a mut core::ffi::c_void, - ) -> Self { - self.p_placed_address = p_placed_address; + pub fn placed_address(mut self, placed_address: &'a mut core::ffi::c_void) -> Self { + self.p_placed_address = placed_address; self } } diff --git a/ash-rewrite/src/generated/ext/memory_decompression.rs b/ash-rewrite/src/generated/ext/memory_decompression.rs index 435bddd8f..bb7caa95b 100644 --- a/ash-rewrite/src/generated/ext/memory_decompression.rs +++ b/ash-rewrite/src/generated/ext/memory_decompression.rs @@ -197,12 +197,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::DecompressMemoryRegionEXT], + regions: &'a [crate::vk::DecompressMemoryRegionEXT], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/metal_objects.rs b/ash-rewrite/src/generated/ext/metal_objects.rs index 984435aea..2685388ab 100644 --- a/ash-rewrite/src/generated/ext/metal_objects.rs +++ b/ash-rewrite/src/generated/ext/metal_objects.rs @@ -40,7 +40,7 @@ pub(crate) mod reexport { pub struct ExportMetalObjectCreateInfoEXT<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub export_object_type: crate::vk::ExportMetalObjectTypeFlagBitsEXT, + pub export_object_type: crate::vk::ExportMetalObjectTypeFlagsEXT, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for ExportMetalObjectCreateInfoEXT<'a> { @@ -73,7 +73,7 @@ pub(crate) mod reexport { impl<'a> ExportMetalObjectCreateInfoEXT<'a> { pub fn export_object_type( mut self, - export_object_type: crate::vk::ExportMetalObjectTypeFlagBitsEXT, + export_object_type: crate::vk::ExportMetalObjectTypeFlagsEXT, ) -> Self { self.export_object_type = export_object_type; self @@ -247,7 +247,7 @@ pub(crate) mod reexport { pub image: crate::vk::Image, pub image_view: crate::vk::ImageView, pub buffer_view: crate::vk::BufferView, - pub plane: crate::vk::ImageAspectFlagBits, + pub plane: crate::vk::ImageAspectFlags, pub mtl_texture: crate::platform_types::MTLTexture_id, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -283,7 +283,7 @@ pub(crate) mod reexport { self.buffer_view = buffer_view; self } - pub fn plane(mut self, plane: crate::vk::ImageAspectFlagBits) -> Self { + pub fn plane(mut self, plane: crate::vk::ImageAspectFlags) -> Self { self.plane = plane; self } @@ -300,7 +300,7 @@ pub(crate) mod reexport { pub struct ImportMetalTextureInfoEXT<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub plane: crate::vk::ImageAspectFlagBits, + pub plane: crate::vk::ImageAspectFlags, pub mtl_texture: crate::platform_types::MTLTexture_id, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -321,7 +321,7 @@ pub(crate) mod reexport { } } impl<'a> ImportMetalTextureInfoEXT<'a> { - pub fn plane(mut self, plane: crate::vk::ImageAspectFlagBits) -> Self { + pub fn plane(mut self, plane: crate::vk::ImageAspectFlags) -> Self { self.plane = plane; self } diff --git a/ash-rewrite/src/generated/ext/metal_surface.rs b/ash-rewrite/src/generated/ext/metal_surface.rs index 814a763cb..cbd12474d 100644 --- a/ash-rewrite/src/generated/ext/metal_surface.rs +++ b/ash-rewrite/src/generated/ext/metal_surface.rs @@ -65,11 +65,8 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_layer( - mut self, - p_layer: &'a crate::platform_types::CAMetalLayer, - ) -> Self { - self.p_layer = p_layer; + pub fn layer(mut self, layer: &'a crate::platform_types::CAMetalLayer) -> Self { + self.p_layer = layer; self } } diff --git a/ash-rewrite/src/generated/ext/multisampled_render_to_single_sampled.rs b/ash-rewrite/src/generated/ext/multisampled_render_to_single_sampled.rs index fbd5da123..f690254aa 100644 --- a/ash-rewrite/src/generated/ext/multisampled_render_to_single_sampled.rs +++ b/ash-rewrite/src/generated/ext/multisampled_render_to_single_sampled.rs @@ -72,7 +72,7 @@ pub struct MultisampledRenderToSingleSampledInfoEXT<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub multisampled_render_to_single_sampled_enable: crate::vk::Bool32, - pub rasterization_samples: crate::vk::SampleCountFlagBits, + pub rasterization_samples: crate::vk::SampleCountFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -105,7 +105,7 @@ impl<'a> MultisampledRenderToSingleSampledInfoEXT<'a> { } pub fn rasterization_samples( mut self, - rasterization_samples: crate::vk::SampleCountFlagBits, + rasterization_samples: crate::vk::SampleCountFlags, ) -> Self { self.rasterization_samples = rasterization_samples; self diff --git a/ash-rewrite/src/generated/ext/mutable_descriptor_type.rs b/ash-rewrite/src/generated/ext/mutable_descriptor_type.rs index ceac8930a..ddfc3fca2 100644 --- a/ash-rewrite/src/generated/ext/mutable_descriptor_type.rs +++ b/ash-rewrite/src/generated/ext/mutable_descriptor_type.rs @@ -45,12 +45,12 @@ impl<'a> MutableDescriptorTypeListEXT<'a> { self.descriptor_type_count = descriptor_type_count; self } - pub fn p_descriptor_types( + pub fn descriptor_types( mut self, - p_descriptor_types: &'a [crate::vk::DescriptorType], + descriptor_types: &'a [crate::vk::DescriptorType], ) -> Self { - self.descriptor_type_count = p_descriptor_types.len() as _; - self.p_descriptor_types = p_descriptor_types.as_ptr(); + self.descriptor_type_count = descriptor_types.len() as _; + self.p_descriptor_types = descriptor_types.as_ptr(); self } } @@ -91,15 +91,13 @@ impl<'a> MutableDescriptorTypeCreateInfoEXT<'a> { self.mutable_descriptor_type_list_count = mutable_descriptor_type_list_count; self } - pub fn p_mutable_descriptor_type_lists( + pub fn mutable_descriptor_type_lists( mut self, - p_mutable_descriptor_type_lists: &'a [crate::vk::MutableDescriptorTypeListEXT< - 'a, - >], + mutable_descriptor_type_lists: &'a [crate::vk::MutableDescriptorTypeListEXT<'a>], ) -> Self { - self.mutable_descriptor_type_list_count = p_mutable_descriptor_type_lists.len() + self.mutable_descriptor_type_list_count = mutable_descriptor_type_lists.len() as _; - self.p_mutable_descriptor_type_lists = p_mutable_descriptor_type_lists.as_ptr(); + self.p_mutable_descriptor_type_lists = mutable_descriptor_type_lists.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/opacity_micromap.rs b/ash-rewrite/src/generated/ext/opacity_micromap.rs index 7ff13a987..c8fdba8d1 100644 --- a/ash-rewrite/src/generated/ext/opacity_micromap.rs +++ b/ash-rewrite/src/generated/ext/opacity_micromap.rs @@ -313,20 +313,20 @@ pub(crate) mod reexport { self.usage_counts_count = usage_counts_count; self } - pub fn p_usage_counts( + pub fn usage_counts( mut self, - p_usage_counts: &'a [crate::vk::MicromapUsageEXT], + usage_counts: &'a [crate::vk::MicromapUsageEXT], ) -> Self { - self.usage_counts_count = p_usage_counts.len() as _; - self.p_usage_counts = p_usage_counts.as_ptr(); + self.usage_counts_count = usage_counts.len() as _; + self.p_usage_counts = usage_counts.as_ptr(); self } - pub fn pp_usage_counts( + pub fn usage_counts_ptrs( mut self, - pp_usage_counts: &'a [&'a crate::vk::MicromapUsageEXT], + usage_counts_ptrs: &'a [&'a crate::vk::MicromapUsageEXT], ) -> Self { - self.usage_counts_count = pp_usage_counts.len() as _; - self.pp_usage_counts = pp_usage_counts.as_ptr().cast(); + self.usage_counts_count = usage_counts_ptrs.len() as _; + self.pp_usage_counts = usage_counts_ptrs.as_ptr().cast(); self } pub fn data(mut self, data: crate::vk::DeviceOrHostAddressConstKHR) -> Self { @@ -440,8 +440,8 @@ pub(crate) mod reexport { } } impl<'a> MicromapVersionInfoEXT<'a> { - pub fn p_version_data(mut self, p_version_data: *const u8) -> Self { - self.p_version_data = p_version_data; + pub fn version_data(mut self, version_data: *const u8) -> Self { + self.p_version_data = version_data; self } } @@ -801,20 +801,20 @@ pub(crate) mod reexport { self.usage_counts_count = usage_counts_count; self } - pub fn p_usage_counts( + pub fn usage_counts( mut self, - p_usage_counts: &'a [crate::vk::MicromapUsageEXT], + usage_counts: &'a [crate::vk::MicromapUsageEXT], ) -> Self { - self.usage_counts_count = p_usage_counts.len() as _; - self.p_usage_counts = p_usage_counts.as_ptr(); + self.usage_counts_count = usage_counts.len() as _; + self.p_usage_counts = usage_counts.as_ptr(); self } - pub fn pp_usage_counts( + pub fn usage_counts_ptrs( mut self, - pp_usage_counts: &'a [&'a crate::vk::MicromapUsageEXT], + usage_counts_ptrs: &'a [&'a crate::vk::MicromapUsageEXT], ) -> Self { - self.usage_counts_count = pp_usage_counts.len() as _; - self.pp_usage_counts = pp_usage_counts.as_ptr().cast(); + self.usage_counts_count = usage_counts_ptrs.len() as _; + self.pp_usage_counts = usage_counts_ptrs.as_ptr().cast(); self } pub fn micromap(mut self, micromap: crate::vk::MicromapEXT) -> Self { diff --git a/ash-rewrite/src/generated/ext/present_timing.rs b/ash-rewrite/src/generated/ext/present_timing.rs index ef451c869..bb4a21a08 100644 --- a/ash-rewrite/src/generated/ext/present_timing.rs +++ b/ash-rewrite/src/generated/ext/present_timing.rs @@ -261,17 +261,17 @@ pub(crate) mod reexport { self.time_domain_count = time_domain_count; self } - pub fn p_time_domains( + pub fn time_domains( mut self, - p_time_domains: &'a mut [crate::vk::TimeDomainKHR], + time_domains: &'a mut [crate::vk::TimeDomainKHR], ) -> Self { - self.time_domain_count = p_time_domains.len() as _; - self.p_time_domains = p_time_domains.as_mut_ptr(); + self.time_domain_count = time_domains.len() as _; + self.p_time_domains = time_domains.as_mut_ptr(); self } - pub fn p_time_domain_ids(mut self, p_time_domain_ids: &'a mut [u64]) -> Self { - self.time_domain_count = p_time_domain_ids.len() as _; - self.p_time_domain_ids = p_time_domain_ids.as_mut_ptr(); + pub fn time_domain_ids(mut self, time_domain_ids: &'a mut [u64]) -> Self { + self.time_domain_count = time_domain_ids.len() as _; + self.p_time_domain_ids = time_domain_ids.as_mut_ptr(); self } } @@ -374,12 +374,12 @@ pub(crate) mod reexport { self.presentation_timing_count = presentation_timing_count; self } - pub fn p_presentation_timings( + pub fn presentation_timings( mut self, - p_presentation_timings: &'a mut [crate::vk::PastPresentationTimingEXT<'a>], + presentation_timings: &'a mut [crate::vk::PastPresentationTimingEXT<'a>], ) -> Self { - self.presentation_timing_count = p_presentation_timings.len() as _; - self.p_presentation_timings = p_presentation_timings.as_mut_ptr(); + self.presentation_timing_count = presentation_timings.len() as _; + self.p_presentation_timings = presentation_timings.as_mut_ptr(); self } } @@ -429,12 +429,12 @@ pub(crate) mod reexport { self.present_stage_count = present_stage_count; self } - pub fn p_present_stages( + pub fn present_stages( mut self, - p_present_stages: &'a mut [crate::vk::PresentStageTimeEXT], + present_stages: &'a mut [crate::vk::PresentStageTimeEXT], ) -> Self { - self.present_stage_count = p_present_stages.len() as _; - self.p_present_stages = p_present_stages.as_mut_ptr(); + self.present_stage_count = present_stages.len() as _; + self.p_present_stages = present_stages.as_mut_ptr(); self } pub fn time_domain(mut self, time_domain: crate::vk::TimeDomainKHR) -> Self { @@ -480,12 +480,12 @@ pub(crate) mod reexport { self.swapchain_count = swapchain_count; self } - pub fn p_timing_infos( + pub fn timing_infos( mut self, - p_timing_infos: &'a [crate::vk::PresentTimingInfoEXT<'a>], + timing_infos: &'a [crate::vk::PresentTimingInfoEXT<'a>], ) -> Self { - self.swapchain_count = p_timing_infos.len() as _; - self.p_timing_infos = p_timing_infos.as_ptr(); + self.swapchain_count = timing_infos.len() as _; + self.p_timing_infos = timing_infos.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/sample_locations.rs b/ash-rewrite/src/generated/ext/sample_locations.rs index 178ea98ca..7b634eae7 100644 --- a/ash-rewrite/src/generated/ext/sample_locations.rs +++ b/ash-rewrite/src/generated/ext/sample_locations.rs @@ -53,7 +53,7 @@ impl InstanceFn { get_physical_device_multisample_properties_ext: unsafe { unsafe extern "system" fn get_physical_device_multisample_properties_ext( _: crate::vk::PhysicalDevice, - _: crate::vk::SampleCountFlagBits, + _: crate::vk::SampleCountFlags, _: *mut crate::vk::MultisamplePropertiesEXT<'_>, ) { panic!("unable to load vkGetPhysicalDeviceMultisamplePropertiesEXT") @@ -90,7 +90,7 @@ pub(crate) mod reexport { pub struct SampleLocationsInfoEXT<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub sample_locations_per_pixel: crate::vk::SampleCountFlagBits, + pub sample_locations_per_pixel: crate::vk::SampleCountFlags, pub sample_location_grid_size: crate::vk::Extent2D, pub sample_locations_count: u32, pub p_sample_locations: *const crate::vk::SampleLocationEXT, @@ -119,7 +119,7 @@ pub(crate) mod reexport { impl<'a> SampleLocationsInfoEXT<'a> { pub fn sample_locations_per_pixel( mut self, - sample_locations_per_pixel: crate::vk::SampleCountFlagBits, + sample_locations_per_pixel: crate::vk::SampleCountFlags, ) -> Self { self.sample_locations_per_pixel = sample_locations_per_pixel; self @@ -135,12 +135,12 @@ pub(crate) mod reexport { self.sample_locations_count = sample_locations_count; self } - pub fn p_sample_locations( + pub fn sample_locations( mut self, - p_sample_locations: &'a [crate::vk::SampleLocationEXT], + sample_locations: &'a [crate::vk::SampleLocationEXT], ) -> Self { - self.sample_locations_count = p_sample_locations.len() as _; - self.p_sample_locations = p_sample_locations.as_ptr(); + self.sample_locations_count = sample_locations.len() as _; + self.p_sample_locations = sample_locations.as_ptr(); self } } @@ -226,15 +226,15 @@ pub(crate) mod reexport { self.attachment_initial_sample_locations_count = attachment_initial_sample_locations_count; self } - pub fn p_attachment_initial_sample_locations( + pub fn attachment_initial_sample_locations( mut self, - p_attachment_initial_sample_locations: &'a [crate::vk::AttachmentSampleLocationsEXT< + attachment_initial_sample_locations: &'a [crate::vk::AttachmentSampleLocationsEXT< 'a, >], ) -> Self { - self.attachment_initial_sample_locations_count = p_attachment_initial_sample_locations + self.attachment_initial_sample_locations_count = attachment_initial_sample_locations .len() as _; - self.p_attachment_initial_sample_locations = p_attachment_initial_sample_locations + self.p_attachment_initial_sample_locations = attachment_initial_sample_locations .as_ptr(); self } @@ -245,15 +245,13 @@ pub(crate) mod reexport { self.post_subpass_sample_locations_count = post_subpass_sample_locations_count; self } - pub fn p_post_subpass_sample_locations( + pub fn post_subpass_sample_locations( mut self, - p_post_subpass_sample_locations: &'a [crate::vk::SubpassSampleLocationsEXT< - 'a, - >], + post_subpass_sample_locations: &'a [crate::vk::SubpassSampleLocationsEXT<'a>], ) -> Self { - self.post_subpass_sample_locations_count = p_post_subpass_sample_locations + self.post_subpass_sample_locations_count = post_subpass_sample_locations .len() as _; - self.p_post_subpass_sample_locations = p_post_subpass_sample_locations + self.p_post_subpass_sample_locations = post_subpass_sample_locations .as_ptr(); self } @@ -422,7 +420,7 @@ pub(crate) mod reexport { ); pub type PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT = unsafe extern "system" fn( physical_device: crate::vk::PhysicalDevice, - samples: crate::vk::SampleCountFlagBits, + samples: crate::vk::SampleCountFlags, p_multisample_properties: *mut crate::vk::MultisamplePropertiesEXT<'_>, ); pub const EXT_SAMPLE_LOCATIONS_SPEC_VERSION: u32 = 1; diff --git a/ash-rewrite/src/generated/ext/shader_module_identifier.rs b/ash-rewrite/src/generated/ext/shader_module_identifier.rs index 1ff002794..d3ae522b4 100644 --- a/ash-rewrite/src/generated/ext/shader_module_identifier.rs +++ b/ash-rewrite/src/generated/ext/shader_module_identifier.rs @@ -151,9 +151,9 @@ pub(crate) mod reexport { self.identifier_size = identifier_size; self } - pub fn p_identifier(mut self, p_identifier: &'a [u8]) -> Self { - self.identifier_size = p_identifier.len() as _; - self.p_identifier = p_identifier.as_ptr(); + pub fn identifier(mut self, identifier: &'a [u8]) -> Self { + self.identifier_size = identifier.len() as _; + self.p_identifier = identifier.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/shader_object.rs b/ash-rewrite/src/generated/ext/shader_object.rs index 7fce6bdc0..e9784b71f 100644 --- a/ash-rewrite/src/generated/ext/shader_object.rs +++ b/ash-rewrite/src/generated/ext/shader_object.rs @@ -73,7 +73,7 @@ impl DeviceFn { unsafe extern "system" fn cmd_bind_shaders_ext( _: crate::vk::CommandBuffer, _: u32, - _: *const crate::vk::ShaderStageFlagBits, + _: *const crate::vk::ShaderStageFlags, _: *const crate::vk::ShaderEXT, ) { panic!("unable to load vkCmdBindShadersEXT") @@ -181,7 +181,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub flags: crate::vk::ShaderCreateFlagsEXT, - pub stage: crate::vk::ShaderStageFlagBits, + pub stage: crate::vk::ShaderStageFlags, pub next_stage: crate::vk::ShaderStageFlags, pub code_type: crate::vk::ShaderCodeTypeEXT, pub code_size: usize, @@ -223,7 +223,7 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn stage(mut self, stage: crate::vk::ShaderStageFlagBits) -> Self { + pub fn stage(mut self, stage: crate::vk::ShaderStageFlags) -> Self { self.stage = stage; self } @@ -239,16 +239,16 @@ pub(crate) mod reexport { self.code_size = code_size; self } - pub fn p_code(mut self, p_code: &'a [u8]) -> Self { - self.code_size = p_code.len() as _; - self.p_code = p_code.as_ptr().cast(); + pub fn code(mut self, code: &'a [u8]) -> Self { + self.code_size = code.len() as _; + self.p_code = code.as_ptr().cast(); self } - pub fn p_name(mut self, p_name: &'a core::ffi::CStr) -> Self { - self.p_name = p_name.as_ptr(); + pub fn name(mut self, name: &'a core::ffi::CStr) -> Self { + self.p_name = name.as_ptr(); self } - pub unsafe fn p_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_name.is_null() { None } else { @@ -259,12 +259,12 @@ pub(crate) mod reexport { self.set_layout_count = set_layout_count; self } - pub fn p_set_layouts( + pub fn set_layouts( mut self, - p_set_layouts: &'a [crate::vk::DescriptorSetLayout], + set_layouts: &'a [crate::vk::DescriptorSetLayout], ) -> Self { - self.set_layout_count = p_set_layouts.len() as _; - self.p_set_layouts = p_set_layouts.as_ptr(); + self.set_layout_count = set_layouts.len() as _; + self.p_set_layouts = set_layouts.as_ptr(); self } pub fn push_constant_range_count( @@ -274,19 +274,19 @@ pub(crate) mod reexport { self.push_constant_range_count = push_constant_range_count; self } - pub fn p_push_constant_ranges( + pub fn push_constant_ranges( mut self, - p_push_constant_ranges: &'a [crate::vk::PushConstantRange], + push_constant_ranges: &'a [crate::vk::PushConstantRange], ) -> Self { - self.push_constant_range_count = p_push_constant_ranges.len() as _; - self.p_push_constant_ranges = p_push_constant_ranges.as_ptr(); + self.push_constant_range_count = push_constant_ranges.len() as _; + self.p_push_constant_ranges = push_constant_ranges.as_ptr(); self } - pub fn p_specialization_info( + pub fn specialization_info( mut self, - p_specialization_info: &'a crate::vk::SpecializationInfo<'a>, + specialization_info: &'a crate::vk::SpecializationInfo<'a>, ) -> Self { - self.p_specialization_info = p_specialization_info; + self.p_specialization_info = specialization_info; self } } @@ -487,7 +487,7 @@ pub(crate) mod reexport { pub type PFN_vkCmdBindShadersEXT = unsafe extern "system" fn( command_buffer: crate::vk::CommandBuffer, stage_count: u32, - p_stages: *const crate::vk::ShaderStageFlagBits, + p_stages: *const crate::vk::ShaderStageFlags, p_shaders: *const crate::vk::ShaderEXT, ); pub type PFN_vkCmdSetDepthClampRangeEXT = unsafe extern "system" fn( diff --git a/ash-rewrite/src/generated/ext/subpass_merge_feedback.rs b/ash-rewrite/src/generated/ext/subpass_merge_feedback.rs index 96a4afecb..27d68c3a7 100644 --- a/ash-rewrite/src/generated/ext/subpass_merge_feedback.rs +++ b/ash-rewrite/src/generated/ext/subpass_merge_feedback.rs @@ -68,11 +68,11 @@ impl<'a> Default for RenderPassCreationFeedbackCreateInfoEXT<'a> { } } impl<'a> RenderPassCreationFeedbackCreateInfoEXT<'a> { - pub fn p_render_pass_feedback( + pub fn render_pass_feedback( mut self, - p_render_pass_feedback: &'a mut crate::vk::RenderPassCreationFeedbackInfoEXT, + render_pass_feedback: &'a mut crate::vk::RenderPassCreationFeedbackInfoEXT, ) -> Self { - self.p_render_pass_feedback = p_render_pass_feedback; + self.p_render_pass_feedback = render_pass_feedback; self } } @@ -142,11 +142,11 @@ impl<'a> Default for RenderPassSubpassFeedbackCreateInfoEXT<'a> { } } impl<'a> RenderPassSubpassFeedbackCreateInfoEXT<'a> { - pub fn p_subpass_feedback( + pub fn subpass_feedback( mut self, - p_subpass_feedback: &'a mut crate::vk::RenderPassSubpassFeedbackInfoEXT, + subpass_feedback: &'a mut crate::vk::RenderPassSubpassFeedbackInfoEXT, ) -> Self { - self.p_subpass_feedback = p_subpass_feedback; + self.p_subpass_feedback = subpass_feedback; self } } diff --git a/ash-rewrite/src/generated/ext/validation_cache.rs b/ash-rewrite/src/generated/ext/validation_cache.rs index c6c9278ce..23fe6c922 100644 --- a/ash-rewrite/src/generated/ext/validation_cache.rs +++ b/ash-rewrite/src/generated/ext/validation_cache.rs @@ -121,9 +121,9 @@ pub(crate) mod reexport { self.initial_data_size = initial_data_size; self } - pub fn p_initial_data(mut self, p_initial_data: &'a [u8]) -> Self { - self.initial_data_size = p_initial_data.len() as _; - self.p_initial_data = p_initial_data.as_ptr().cast(); + pub fn initial_data(mut self, initial_data: &'a [u8]) -> Self { + self.initial_data_size = initial_data.len() as _; + self.p_initial_data = initial_data.as_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/ext/validation_features.rs b/ash-rewrite/src/generated/ext/validation_features.rs index 6692a3015..199e6c84d 100644 --- a/ash-rewrite/src/generated/ext/validation_features.rs +++ b/ash-rewrite/src/generated/ext/validation_features.rs @@ -42,12 +42,12 @@ impl<'a> ValidationFeaturesEXT<'a> { self.enabled_validation_feature_count = enabled_validation_feature_count; self } - pub fn p_enabled_validation_features( + pub fn enabled_validation_features( mut self, - p_enabled_validation_features: &'a [crate::vk::ValidationFeatureEnableEXT], + enabled_validation_features: &'a [crate::vk::ValidationFeatureEnableEXT], ) -> Self { - self.enabled_validation_feature_count = p_enabled_validation_features.len() as _; - self.p_enabled_validation_features = p_enabled_validation_features.as_ptr(); + self.enabled_validation_feature_count = enabled_validation_features.len() as _; + self.p_enabled_validation_features = enabled_validation_features.as_ptr(); self } pub fn disabled_validation_feature_count( @@ -57,13 +57,12 @@ impl<'a> ValidationFeaturesEXT<'a> { self.disabled_validation_feature_count = disabled_validation_feature_count; self } - pub fn p_disabled_validation_features( + pub fn disabled_validation_features( mut self, - p_disabled_validation_features: &'a [crate::vk::ValidationFeatureDisableEXT], + disabled_validation_features: &'a [crate::vk::ValidationFeatureDisableEXT], ) -> Self { - self.disabled_validation_feature_count = p_disabled_validation_features.len() - as _; - self.p_disabled_validation_features = p_disabled_validation_features.as_ptr(); + self.disabled_validation_feature_count = disabled_validation_features.len() as _; + self.p_disabled_validation_features = disabled_validation_features.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/ext/validation_flags.rs b/ash-rewrite/src/generated/ext/validation_flags.rs index ef0ddc700..763258f61 100644 --- a/ash-rewrite/src/generated/ext/validation_flags.rs +++ b/ash-rewrite/src/generated/ext/validation_flags.rs @@ -34,12 +34,12 @@ impl<'a> ValidationFlagsEXT<'a> { self.disabled_validation_check_count = disabled_validation_check_count; self } - pub fn p_disabled_validation_checks( + pub fn disabled_validation_checks( mut self, - p_disabled_validation_checks: &'a [crate::vk::ValidationCheckEXT], + disabled_validation_checks: &'a [crate::vk::ValidationCheckEXT], ) -> Self { - self.disabled_validation_check_count = p_disabled_validation_checks.len() as _; - self.p_disabled_validation_checks = p_disabled_validation_checks.as_ptr(); + self.disabled_validation_check_count = disabled_validation_checks.len() as _; + self.p_disabled_validation_checks = disabled_validation_checks.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/fuchsia/buffer_collection.rs b/ash-rewrite/src/generated/fuchsia/buffer_collection.rs index 962c74255..a26fba250 100644 --- a/ash-rewrite/src/generated/fuchsia/buffer_collection.rs +++ b/ash-rewrite/src/generated/fuchsia/buffer_collection.rs @@ -501,12 +501,12 @@ pub(crate) mod reexport { self.color_space_count = color_space_count; self } - pub fn p_color_spaces( + pub fn color_spaces( mut self, - p_color_spaces: &'a [crate::vk::SysmemColorSpaceFUCHSIA<'a>], + color_spaces: &'a [crate::vk::SysmemColorSpaceFUCHSIA<'a>], ) -> Self { - self.color_space_count = p_color_spaces.len() as _; - self.p_color_spaces = p_color_spaces.as_ptr(); + self.color_space_count = color_spaces.len() as _; + self.p_color_spaces = color_spaces.as_ptr(); self } } @@ -549,12 +549,12 @@ pub(crate) mod reexport { self.format_constraints_count = format_constraints_count; self } - pub fn p_format_constraints( + pub fn format_constraints( mut self, - p_format_constraints: &'a [crate::vk::ImageFormatConstraintsInfoFUCHSIA<'a>], + format_constraints: &'a [crate::vk::ImageFormatConstraintsInfoFUCHSIA<'a>], ) -> Self { - self.format_constraints_count = p_format_constraints.len() as _; - self.p_format_constraints = p_format_constraints.as_ptr(); + self.format_constraints_count = format_constraints.len() as _; + self.p_format_constraints = format_constraints.as_ptr(); self } pub fn buffer_collection_constraints( diff --git a/ash-rewrite/src/generated/fuchsia/external_memory.rs b/ash-rewrite/src/generated/fuchsia/external_memory.rs index 3c18c13de..88424f7af 100644 --- a/ash-rewrite/src/generated/fuchsia/external_memory.rs +++ b/ash-rewrite/src/generated/fuchsia/external_memory.rs @@ -36,7 +36,7 @@ impl DeviceFn { get_memory_zircon_handle_properties_fuchsia: unsafe { unsafe extern "system" fn get_memory_zircon_handle_properties_fuchsia( _: crate::vk::Device, - _: crate::vk::ExternalMemoryHandleTypeFlagBits, + _: crate::vk::ExternalMemoryHandleTypeFlags, _: crate::platform_types::zx_handle_t, _: *mut crate::vk::MemoryZirconHandlePropertiesFUCHSIA<'_>, ) -> crate::vk::Result { @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub struct ImportMemoryZirconHandleInfoFUCHSIA<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub handle: crate::platform_types::zx_handle_t, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -82,7 +82,7 @@ pub(crate) mod reexport { impl<'a> ImportMemoryZirconHandleInfoFUCHSIA<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -126,7 +126,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub memory: crate::vk::DeviceMemory, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for MemoryGetZirconHandleInfoFUCHSIA<'a> { @@ -150,7 +150,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -173,7 +173,7 @@ pub(crate) mod reexport { ) -> crate::vk::Result; pub type PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA = unsafe extern "system" fn( device: crate::vk::Device, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, zircon_handle: crate::platform_types::zx_handle_t, p_memory_zircon_handle_properties: *mut crate::vk::MemoryZirconHandlePropertiesFUCHSIA< '_, diff --git a/ash-rewrite/src/generated/fuchsia/external_semaphore.rs b/ash-rewrite/src/generated/fuchsia/external_semaphore.rs index 5dc6a2ece..b6d8b1e02 100644 --- a/ash-rewrite/src/generated/fuchsia/external_semaphore.rs +++ b/ash-rewrite/src/generated/fuchsia/external_semaphore.rs @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub semaphore: crate::vk::Semaphore, pub flags: crate::vk::SemaphoreImportFlags, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub zircon_handle: crate::platform_types::zx_handle_t, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -90,7 +90,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -109,7 +109,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub semaphore: crate::vk::Semaphore, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -134,7 +134,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/google/display_timing.rs b/ash-rewrite/src/generated/google/display_timing.rs index e30072ac3..ebad792e8 100644 --- a/ash-rewrite/src/generated/google/display_timing.rs +++ b/ash-rewrite/src/generated/google/display_timing.rs @@ -125,9 +125,9 @@ pub(crate) mod reexport { self.swapchain_count = swapchain_count; self } - pub fn p_times(mut self, p_times: &'a [crate::vk::PresentTimeGOOGLE]) -> Self { - self.swapchain_count = p_times.len() as _; - self.p_times = p_times.as_ptr(); + pub fn times(mut self, times: &'a [crate::vk::PresentTimeGOOGLE]) -> Self { + self.swapchain_count = times.len() as _; + self.p_times = times.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/huawei/hdr_vivid.rs b/ash-rewrite/src/generated/huawei/hdr_vivid.rs index 4324c6040..bdc539682 100644 --- a/ash-rewrite/src/generated/huawei/hdr_vivid.rs +++ b/ash-rewrite/src/generated/huawei/hdr_vivid.rs @@ -31,9 +31,9 @@ impl<'a> HdrVividDynamicMetadataHUAWEI<'a> { self.dynamic_metadata_size = dynamic_metadata_size; self } - pub fn p_dynamic_metadata(mut self, p_dynamic_metadata: &'a [u8]) -> Self { - self.dynamic_metadata_size = p_dynamic_metadata.len() as _; - self.p_dynamic_metadata = p_dynamic_metadata.as_ptr().cast(); + pub fn dynamic_metadata(mut self, dynamic_metadata: &'a [u8]) -> Self { + self.dynamic_metadata_size = dynamic_metadata.len() as _; + self.p_dynamic_metadata = dynamic_metadata.as_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/intel/performance_query.rs b/ash-rewrite/src/generated/intel/performance_query.rs index 7e7b93653..9de5d4ddb 100644 --- a/ash-rewrite/src/generated/intel/performance_query.rs +++ b/ash-rewrite/src/generated/intel/performance_query.rs @@ -195,8 +195,8 @@ pub(crate) mod reexport { } } impl<'a> InitializePerformanceApiInfoINTEL<'a> { - pub fn p_user_data(mut self, p_user_data: &'a mut core::ffi::c_void) -> Self { - self.p_user_data = p_user_data; + pub fn user_data(mut self, user_data: &'a mut core::ffi::c_void) -> Self { + self.p_user_data = user_data; self } } diff --git a/ash-rewrite/src/generated/khr/acceleration_structure.rs b/ash-rewrite/src/generated/khr/acceleration_structure.rs index 24054133d..0c57d3cb0 100644 --- a/ash-rewrite/src/generated/khr/acceleration_structure.rs +++ b/ash-rewrite/src/generated/khr/acceleration_structure.rs @@ -326,12 +326,12 @@ pub(crate) mod reexport { self.acceleration_structure_count = acceleration_structure_count; self } - pub fn p_acceleration_structures( + pub fn acceleration_structures( mut self, - p_acceleration_structures: &'a [crate::vk::AccelerationStructureKHR], + acceleration_structures: &'a [crate::vk::AccelerationStructureKHR], ) -> Self { - self.acceleration_structure_count = p_acceleration_structures.len() as _; - self.p_acceleration_structures = p_acceleration_structures.as_ptr(); + self.acceleration_structure_count = acceleration_structures.len() as _; + self.p_acceleration_structures = acceleration_structures.as_ptr(); self } } @@ -755,20 +755,20 @@ pub(crate) mod reexport { self.geometry_count = geometry_count; self } - pub fn p_geometries( + pub fn geometries( mut self, - p_geometries: &'a [crate::vk::AccelerationStructureGeometryKHR<'a>], + geometries: &'a [crate::vk::AccelerationStructureGeometryKHR<'a>], ) -> Self { - self.geometry_count = p_geometries.len() as _; - self.p_geometries = p_geometries.as_ptr(); + self.geometry_count = geometries.len() as _; + self.p_geometries = geometries.as_ptr(); self } - pub fn pp_geometries( + pub fn geometries_ptrs( mut self, - pp_geometries: &'a [&'a crate::vk::AccelerationStructureGeometryKHR<'a>], + geometries_ptrs: &'a [&'a crate::vk::AccelerationStructureGeometryKHR<'a>], ) -> Self { - self.geometry_count = pp_geometries.len() as _; - self.pp_geometries = pp_geometries.as_ptr().cast(); + self.geometry_count = geometries_ptrs.len() as _; + self.pp_geometries = geometries_ptrs.as_ptr().cast(); self } pub fn scratch_data( @@ -1026,8 +1026,8 @@ pub(crate) mod reexport { } } impl<'a> AccelerationStructureVersionInfoKHR<'a> { - pub fn p_version_data(mut self, p_version_data: *const u8) -> Self { - self.p_version_data = p_version_data; + pub fn version_data(mut self, version_data: *const u8) -> Self { + self.p_version_data = version_data; self } } diff --git a/ash-rewrite/src/generated/khr/copy_memory_indirect.rs b/ash-rewrite/src/generated/khr/copy_memory_indirect.rs index 1f32ec140..1059c9aec 100644 --- a/ash-rewrite/src/generated/khr/copy_memory_indirect.rs +++ b/ash-rewrite/src/generated/khr/copy_memory_indirect.rs @@ -225,12 +225,12 @@ pub(crate) mod reexport { self.dst_image_layout = dst_image_layout; self } - pub fn p_image_subresources( + pub fn image_subresources( mut self, - p_image_subresources: &'a [crate::vk::ImageSubresourceLayers], + image_subresources: &'a [crate::vk::ImageSubresourceLayers], ) -> Self { - self.copy_count = p_image_subresources.len() as _; - self.p_image_subresources = p_image_subresources.as_ptr(); + self.copy_count = image_subresources.len() as _; + self.p_image_subresources = image_subresources.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/device_address_commands.rs b/ash-rewrite/src/generated/khr/device_address_commands.rs index 291b95cec..4d541c5a9 100644 --- a/ash-rewrite/src/generated/khr/device_address_commands.rs +++ b/ash-rewrite/src/generated/khr/device_address_commands.rs @@ -490,12 +490,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::DeviceMemoryCopyKHR<'a>], + regions: &'a [crate::vk::DeviceMemoryCopyKHR<'a>], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -611,12 +611,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::DeviceMemoryImageCopyKHR<'a>], + regions: &'a [crate::vk::DeviceMemoryImageCopyKHR<'a>], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -653,12 +653,12 @@ pub(crate) mod reexport { self.memory_range_barrier_count = memory_range_barrier_count; self } - pub fn p_memory_range_barriers( + pub fn memory_range_barriers( mut self, - p_memory_range_barriers: &'a [crate::vk::MemoryRangeBarrierKHR<'a>], + memory_range_barriers: &'a [crate::vk::MemoryRangeBarrierKHR<'a>], ) -> Self { - self.memory_range_barrier_count = p_memory_range_barriers.len() as _; - self.p_memory_range_barriers = p_memory_range_barriers.as_ptr(); + self.memory_range_barrier_count = memory_range_barriers.len() as _; + self.p_memory_range_barriers = memory_range_barriers.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/device_fault.rs b/ash-rewrite/src/generated/khr/device_fault.rs index e58d2eb49..cd9dd8bad 100644 --- a/ash-rewrite/src/generated/khr/device_fault.rs +++ b/ash-rewrite/src/generated/khr/device_fault.rs @@ -222,12 +222,9 @@ pub(crate) mod reexport { self.vendor_binary_size = vendor_binary_size; self } - pub fn p_vendor_binary_data( - mut self, - p_vendor_binary_data: &'a mut [u8], - ) -> Self { - self.vendor_binary_size = p_vendor_binary_data.len() as _; - self.p_vendor_binary_data = p_vendor_binary_data.as_mut_ptr().cast(); + pub fn vendor_binary_data(mut self, vendor_binary_data: &'a mut [u8]) -> Self { + self.vendor_binary_size = vendor_binary_data.len() as _; + self.p_vendor_binary_data = vendor_binary_data.as_mut_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/khr/display.rs b/ash-rewrite/src/generated/khr/display.rs index e18735e8e..4e0707d80 100644 --- a/ash-rewrite/src/generated/khr/display.rs +++ b/ash-rewrite/src/generated/khr/display.rs @@ -361,9 +361,9 @@ pub(crate) mod reexport { pub display_mode: crate::vk::DisplayModeKHR, pub plane_index: u32, pub plane_stack_index: u32, - pub transform: crate::vk::SurfaceTransformFlagBitsKHR, + pub transform: crate::vk::SurfaceTransformFlagsKHR, pub global_alpha: core::ffi::c_float, - pub alpha_mode: crate::vk::DisplayPlaneAlphaFlagBitsKHR, + pub alpha_mode: crate::vk::DisplayPlaneAlphaFlagsKHR, pub image_extent: crate::vk::Extent2D, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -406,7 +406,7 @@ pub(crate) mod reexport { } pub fn transform( mut self, - transform: crate::vk::SurfaceTransformFlagBitsKHR, + transform: crate::vk::SurfaceTransformFlagsKHR, ) -> Self { self.transform = transform; self @@ -417,7 +417,7 @@ pub(crate) mod reexport { } pub fn alpha_mode( mut self, - alpha_mode: crate::vk::DisplayPlaneAlphaFlagBitsKHR, + alpha_mode: crate::vk::DisplayPlaneAlphaFlagsKHR, ) -> Self { self.alpha_mode = alpha_mode; self diff --git a/ash-rewrite/src/generated/khr/external_fence_fd.rs b/ash-rewrite/src/generated/khr/external_fence_fd.rs index c1b5f96dd..64ccdb5d5 100644 --- a/ash-rewrite/src/generated/khr/external_fence_fd.rs +++ b/ash-rewrite/src/generated/khr/external_fence_fd.rs @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub fence: crate::vk::Fence, pub flags: crate::vk::FenceImportFlags, - pub handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalFenceHandleTypeFlags, pub fd: core::ffi::c_int, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -89,7 +89,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + handle_type: crate::vk::ExternalFenceHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -105,7 +105,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub fence: crate::vk::Fence, - pub handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalFenceHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for FenceGetFdInfoKHR<'a> { @@ -129,7 +129,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + handle_type: crate::vk::ExternalFenceHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/khr/external_fence_win32.rs b/ash-rewrite/src/generated/khr/external_fence_win32.rs index b4c95ef9a..2126ce8c1 100644 --- a/ash-rewrite/src/generated/khr/external_fence_win32.rs +++ b/ash-rewrite/src/generated/khr/external_fence_win32.rs @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub fence: crate::vk::Fence, pub flags: crate::vk::FenceImportFlags, - pub handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalFenceHandleTypeFlags, pub handle: crate::platform_types::HANDLE, pub name: crate::platform_types::LPCWSTR, pub _marker: ::core::marker::PhantomData<&'a ()>, @@ -91,7 +91,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + handle_type: crate::vk::ExternalFenceHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -133,11 +133,11 @@ pub(crate) mod reexport { } } impl<'a> ExportFenceWin32HandleInfoKHR<'a> { - pub fn p_attributes( + pub fn attributes( mut self, - p_attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, + attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, ) -> Self { - self.p_attributes = p_attributes; + self.p_attributes = attributes; self } pub fn dw_access(mut self, dw_access: crate::platform_types::DWORD) -> Self { @@ -155,7 +155,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub fence: crate::vk::Fence, - pub handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalFenceHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for FenceGetWin32HandleInfoKHR<'a> { @@ -179,7 +179,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + handle_type: crate::vk::ExternalFenceHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/khr/external_memory_fd.rs b/ash-rewrite/src/generated/khr/external_memory_fd.rs index 564e4786d..55b6e5704 100644 --- a/ash-rewrite/src/generated/khr/external_memory_fd.rs +++ b/ash-rewrite/src/generated/khr/external_memory_fd.rs @@ -36,7 +36,7 @@ impl DeviceFn { get_memory_fd_properties_khr: unsafe { unsafe extern "system" fn get_memory_fd_properties_khr( _: crate::vk::Device, - _: crate::vk::ExternalMemoryHandleTypeFlagBits, + _: crate::vk::ExternalMemoryHandleTypeFlags, _: core::ffi::c_int, _: *mut crate::vk::MemoryFdPropertiesKHR<'_>, ) -> crate::vk::Result { @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub struct ImportMemoryFdInfoKHR<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub fd: core::ffi::c_int, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -81,7 +81,7 @@ pub(crate) mod reexport { impl<'a> ImportMemoryFdInfoKHR<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -124,7 +124,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub memory: crate::vk::DeviceMemory, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for MemoryGetFdInfoKHR<'a> { @@ -148,7 +148,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -167,7 +167,7 @@ pub(crate) mod reexport { ) -> crate::vk::Result; pub type PFN_vkGetMemoryFdPropertiesKHR = unsafe extern "system" fn( device: crate::vk::Device, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, fd: core::ffi::c_int, p_memory_fd_properties: *mut crate::vk::MemoryFdPropertiesKHR<'_>, ) -> crate::vk::Result; diff --git a/ash-rewrite/src/generated/khr/external_memory_win32.rs b/ash-rewrite/src/generated/khr/external_memory_win32.rs index 1fb059597..014c1259e 100644 --- a/ash-rewrite/src/generated/khr/external_memory_win32.rs +++ b/ash-rewrite/src/generated/khr/external_memory_win32.rs @@ -36,7 +36,7 @@ impl DeviceFn { get_memory_win32_handle_properties_khr: unsafe { unsafe extern "system" fn get_memory_win32_handle_properties_khr( _: crate::vk::Device, - _: crate::vk::ExternalMemoryHandleTypeFlagBits, + _: crate::vk::ExternalMemoryHandleTypeFlags, _: crate::platform_types::HANDLE, _: *mut crate::vk::MemoryWin32HandlePropertiesKHR<'_>, ) -> crate::vk::Result { @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub struct ImportMemoryWin32HandleInfoKHR<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub handle: crate::platform_types::HANDLE, pub name: crate::platform_types::LPCWSTR, pub _marker: ::core::marker::PhantomData<&'a ()>, @@ -83,7 +83,7 @@ pub(crate) mod reexport { impl<'a> ImportMemoryWin32HandleInfoKHR<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -125,11 +125,11 @@ pub(crate) mod reexport { } } impl<'a> ExportMemoryWin32HandleInfoKHR<'a> { - pub fn p_attributes( + pub fn attributes( mut self, - p_attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, + attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, ) -> Self { - self.p_attributes = p_attributes; + self.p_attributes = attributes; self } pub fn dw_access(mut self, dw_access: crate::platform_types::DWORD) -> Self { @@ -174,7 +174,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub memory: crate::vk::DeviceMemory, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for MemoryGetWin32HandleInfoKHR<'a> { @@ -198,7 +198,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -218,7 +218,7 @@ pub(crate) mod reexport { ) -> crate::vk::Result; pub type PFN_vkGetMemoryWin32HandlePropertiesKHR = unsafe extern "system" fn( device: crate::vk::Device, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, handle: crate::platform_types::HANDLE, p_memory_win32_handle_properties: *mut crate::vk::MemoryWin32HandlePropertiesKHR< '_, diff --git a/ash-rewrite/src/generated/khr/external_semaphore_fd.rs b/ash-rewrite/src/generated/khr/external_semaphore_fd.rs index 17a4f7632..024aad3c9 100644 --- a/ash-rewrite/src/generated/khr/external_semaphore_fd.rs +++ b/ash-rewrite/src/generated/khr/external_semaphore_fd.rs @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub semaphore: crate::vk::Semaphore, pub flags: crate::vk::SemaphoreImportFlags, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub fd: core::ffi::c_int, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -89,7 +89,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -105,7 +105,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub semaphore: crate::vk::Semaphore, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for SemaphoreGetFdInfoKHR<'a> { @@ -129,7 +129,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/khr/external_semaphore_win32.rs b/ash-rewrite/src/generated/khr/external_semaphore_win32.rs index 967b02907..59b7003e7 100644 --- a/ash-rewrite/src/generated/khr/external_semaphore_win32.rs +++ b/ash-rewrite/src/generated/khr/external_semaphore_win32.rs @@ -58,7 +58,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub semaphore: crate::vk::Semaphore, pub flags: crate::vk::SemaphoreImportFlags, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub handle: crate::platform_types::HANDLE, pub name: crate::platform_types::LPCWSTR, pub _marker: ::core::marker::PhantomData<&'a ()>, @@ -92,7 +92,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -135,11 +135,11 @@ pub(crate) mod reexport { } } impl<'a> ExportSemaphoreWin32HandleInfoKHR<'a> { - pub fn p_attributes( + pub fn attributes( mut self, - p_attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, + attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, ) -> Self { - self.p_attributes = p_attributes; + self.p_attributes = attributes; self } pub fn dw_access(mut self, dw_access: crate::platform_types::DWORD) -> Self { @@ -188,12 +188,12 @@ pub(crate) mod reexport { self.wait_semaphore_values_count = wait_semaphore_values_count; self } - pub fn p_wait_semaphore_values( + pub fn wait_semaphore_values( mut self, - p_wait_semaphore_values: &'a [u64], + wait_semaphore_values: &'a [u64], ) -> Self { - self.wait_semaphore_values_count = p_wait_semaphore_values.len() as _; - self.p_wait_semaphore_values = p_wait_semaphore_values.as_ptr(); + self.wait_semaphore_values_count = wait_semaphore_values.len() as _; + self.p_wait_semaphore_values = wait_semaphore_values.as_ptr(); self } pub fn signal_semaphore_values_count( @@ -203,12 +203,12 @@ pub(crate) mod reexport { self.signal_semaphore_values_count = signal_semaphore_values_count; self } - pub fn p_signal_semaphore_values( + pub fn signal_semaphore_values( mut self, - p_signal_semaphore_values: &'a [u64], + signal_semaphore_values: &'a [u64], ) -> Self { - self.signal_semaphore_values_count = p_signal_semaphore_values.len() as _; - self.p_signal_semaphore_values = p_signal_semaphore_values.as_ptr(); + self.signal_semaphore_values_count = signal_semaphore_values.len() as _; + self.p_signal_semaphore_values = signal_semaphore_values.as_ptr(); self } } @@ -218,7 +218,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub semaphore: crate::vk::Semaphore, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for SemaphoreGetWin32HandleInfoKHR<'a> { @@ -242,7 +242,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/khr/fragment_shading_rate.rs b/ash-rewrite/src/generated/khr/fragment_shading_rate.rs index 08bd905e0..b43c4c12e 100644 --- a/ash-rewrite/src/generated/khr/fragment_shading_rate.rs +++ b/ash-rewrite/src/generated/khr/fragment_shading_rate.rs @@ -99,11 +99,11 @@ pub(crate) mod reexport { } } impl<'a> FragmentShadingRateAttachmentInfoKHR<'a> { - pub fn p_fragment_shading_rate_attachment( + pub fn fragment_shading_rate_attachment( mut self, - p_fragment_shading_rate_attachment: &'a crate::vk::AttachmentReference2<'a>, + fragment_shading_rate_attachment: &'a crate::vk::AttachmentReference2<'a>, ) -> Self { - self.p_fragment_shading_rate_attachment = p_fragment_shading_rate_attachment; + self.p_fragment_shading_rate_attachment = fragment_shading_rate_attachment; self } pub fn shading_rate_attachment_texel_size( @@ -222,7 +222,7 @@ pub(crate) mod reexport { pub max_fragment_size: crate::vk::Extent2D, pub max_fragment_size_aspect_ratio: u32, pub max_fragment_shading_rate_coverage_samples: u32, - pub max_fragment_shading_rate_rasterization_samples: crate::vk::SampleCountFlagBits, + pub max_fragment_shading_rate_rasterization_samples: crate::vk::SampleCountFlags, pub fragment_shading_rate_with_shader_depth_stencil_writes: crate::vk::Bool32, pub fragment_shading_rate_with_sample_mask: crate::vk::Bool32, pub fragment_shading_rate_with_shader_sample_mask: crate::vk::Bool32, @@ -333,7 +333,7 @@ pub(crate) mod reexport { } pub fn max_fragment_shading_rate_rasterization_samples( mut self, - max_fragment_shading_rate_rasterization_samples: crate::vk::SampleCountFlagBits, + max_fragment_shading_rate_rasterization_samples: crate::vk::SampleCountFlags, ) -> Self { self.max_fragment_shading_rate_rasterization_samples = max_fragment_shading_rate_rasterization_samples; self diff --git a/ash-rewrite/src/generated/khr/incremental_present.rs b/ash-rewrite/src/generated/khr/incremental_present.rs index 064bd868f..9c65e1f4f 100644 --- a/ash-rewrite/src/generated/khr/incremental_present.rs +++ b/ash-rewrite/src/generated/khr/incremental_present.rs @@ -30,12 +30,9 @@ impl<'a> PresentRegionsKHR<'a> { self.swapchain_count = swapchain_count; self } - pub fn p_regions( - mut self, - p_regions: &'a [crate::vk::PresentRegionKHR<'a>], - ) -> Self { - self.swapchain_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::PresentRegionKHR<'a>]) -> Self { + self.swapchain_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -51,9 +48,9 @@ impl<'a> PresentRegionKHR<'a> { self.rectangle_count = rectangle_count; self } - pub fn p_rectangles(mut self, p_rectangles: &'a [crate::vk::RectLayerKHR]) -> Self { - self.rectangle_count = p_rectangles.len() as _; - self.p_rectangles = p_rectangles.as_ptr(); + pub fn rectangles(mut self, rectangles: &'a [crate::vk::RectLayerKHR]) -> Self { + self.rectangle_count = rectangles.len() as _; + self.p_rectangles = rectangles.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/maintenance10.rs b/ash-rewrite/src/generated/khr/maintenance10.rs index b800c2231..c69b03467 100644 --- a/ash-rewrite/src/generated/khr/maintenance10.rs +++ b/ash-rewrite/src/generated/khr/maintenance10.rs @@ -175,8 +175,8 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub flags: crate::vk::ResolveImageFlagsKHR, - pub resolve_mode: crate::vk::ResolveModeFlagBits, - pub stencil_resolve_mode: crate::vk::ResolveModeFlagBits, + pub resolve_mode: crate::vk::ResolveModeFlags, + pub stencil_resolve_mode: crate::vk::ResolveModeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for ResolveImageModeInfoKHR<'a> { @@ -203,14 +203,14 @@ pub(crate) mod reexport { } pub fn resolve_mode( mut self, - resolve_mode: crate::vk::ResolveModeFlagBits, + resolve_mode: crate::vk::ResolveModeFlags, ) -> Self { self.resolve_mode = resolve_mode; self } pub fn stencil_resolve_mode( mut self, - stencil_resolve_mode: crate::vk::ResolveModeFlagBits, + stencil_resolve_mode: crate::vk::ResolveModeFlags, ) -> Self { self.stencil_resolve_mode = stencil_resolve_mode; self diff --git a/ash-rewrite/src/generated/khr/maintenance6.rs b/ash-rewrite/src/generated/khr/maintenance6.rs index 9324601a9..04a43608b 100644 --- a/ash-rewrite/src/generated/khr/maintenance6.rs +++ b/ash-rewrite/src/generated/khr/maintenance6.rs @@ -161,14 +161,14 @@ pub(crate) mod reexport { self.set_count = set_count; self } - pub fn p_buffer_indices(mut self, p_buffer_indices: &'a [u32]) -> Self { - self.set_count = p_buffer_indices.len() as _; - self.p_buffer_indices = p_buffer_indices.as_ptr(); + pub fn buffer_indices(mut self, buffer_indices: &'a [u32]) -> Self { + self.set_count = buffer_indices.len() as _; + self.p_buffer_indices = buffer_indices.as_ptr(); self } - pub fn p_offsets(mut self, p_offsets: &'a [crate::vk::DeviceSize]) -> Self { - self.set_count = p_offsets.len() as _; - self.p_offsets = p_offsets.as_ptr(); + pub fn offsets(mut self, offsets: &'a [crate::vk::DeviceSize]) -> Self { + self.set_count = offsets.len() as _; + self.p_offsets = offsets.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/maintenance7.rs b/ash-rewrite/src/generated/khr/maintenance7.rs index e6d7c82a4..6a4a11c7d 100644 --- a/ash-rewrite/src/generated/khr/maintenance7.rs +++ b/ash-rewrite/src/generated/khr/maintenance7.rs @@ -162,12 +162,12 @@ impl<'a> PhysicalDeviceLayeredApiPropertiesListKHR<'a> { self.layered_api_count = layered_api_count; self } - pub fn p_layered_apis( + pub fn layered_apis( mut self, - p_layered_apis: &'a mut [crate::vk::PhysicalDeviceLayeredApiPropertiesKHR<'a>], + layered_apis: &'a mut [crate::vk::PhysicalDeviceLayeredApiPropertiesKHR<'a>], ) -> Self { - self.layered_api_count = p_layered_apis.len() as _; - self.p_layered_apis = p_layered_apis.as_mut_ptr(); + self.layered_api_count = layered_apis.len() as _; + self.p_layered_apis = layered_apis.as_mut_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/performance_query.rs b/ash-rewrite/src/generated/khr/performance_query.rs index 6f326fcfe..0db0c83f5 100644 --- a/ash-rewrite/src/generated/khr/performance_query.rs +++ b/ash-rewrite/src/generated/khr/performance_query.rs @@ -342,9 +342,9 @@ pub(crate) mod reexport { self.counter_index_count = counter_index_count; self } - pub fn p_counter_indices(mut self, p_counter_indices: &'a [u32]) -> Self { - self.counter_index_count = p_counter_indices.len() as _; - self.p_counter_indices = p_counter_indices.as_ptr(); + pub fn counter_indices(mut self, counter_indices: &'a [u32]) -> Self { + self.counter_index_count = counter_indices.len() as _; + self.p_counter_indices = counter_indices.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/pipeline_binary.rs b/ash-rewrite/src/generated/khr/pipeline_binary.rs index 13e23a177..126a59de7 100644 --- a/ash-rewrite/src/generated/khr/pipeline_binary.rs +++ b/ash-rewrite/src/generated/khr/pipeline_binary.rs @@ -129,22 +129,22 @@ pub(crate) mod reexport { } } impl<'a> PipelineBinaryCreateInfoKHR<'a> { - pub fn p_keys_and_data_info( + pub fn keys_and_data_info( mut self, - p_keys_and_data_info: &'a crate::vk::PipelineBinaryKeysAndDataKHR<'a>, + keys_and_data_info: &'a crate::vk::PipelineBinaryKeysAndDataKHR<'a>, ) -> Self { - self.p_keys_and_data_info = p_keys_and_data_info; + self.p_keys_and_data_info = keys_and_data_info; self } pub fn pipeline(mut self, pipeline: crate::vk::Pipeline) -> Self { self.pipeline = pipeline; self } - pub fn p_pipeline_create_info( + pub fn pipeline_create_info( mut self, - p_pipeline_create_info: &'a crate::vk::PipelineCreateInfoKHR<'a>, + pipeline_create_info: &'a crate::vk::PipelineCreateInfoKHR<'a>, ) -> Self { - self.p_pipeline_create_info = p_pipeline_create_info; + self.p_pipeline_create_info = pipeline_create_info; self } } @@ -176,12 +176,12 @@ pub(crate) mod reexport { self.pipeline_binary_count = pipeline_binary_count; self } - pub fn p_pipeline_binaries( + pub fn pipeline_binaries( mut self, - p_pipeline_binaries: &'a mut [crate::vk::PipelineBinaryKHR], + pipeline_binaries: &'a mut [crate::vk::PipelineBinaryKHR], ) -> Self { - self.pipeline_binary_count = p_pipeline_binaries.len() as _; - self.p_pipeline_binaries = p_pipeline_binaries.as_mut_ptr(); + self.pipeline_binary_count = pipeline_binaries.len() as _; + self.p_pipeline_binaries = pipeline_binaries.as_mut_ptr(); self } } @@ -197,9 +197,9 @@ pub(crate) mod reexport { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a mut [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_mut_ptr().cast(); + pub fn data(mut self, data: &'a mut [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_mut_ptr().cast(); self } } @@ -216,20 +216,20 @@ pub(crate) mod reexport { self.binary_count = binary_count; self } - pub fn p_pipeline_binary_keys( + pub fn pipeline_binary_keys( mut self, - p_pipeline_binary_keys: &'a [crate::vk::PipelineBinaryKeyKHR<'a>], + pipeline_binary_keys: &'a [crate::vk::PipelineBinaryKeyKHR<'a>], ) -> Self { - self.binary_count = p_pipeline_binary_keys.len() as _; - self.p_pipeline_binary_keys = p_pipeline_binary_keys.as_ptr(); + self.binary_count = pipeline_binary_keys.len() as _; + self.p_pipeline_binary_keys = pipeline_binary_keys.as_ptr(); self } - pub fn p_pipeline_binary_data( + pub fn pipeline_binary_data( mut self, - p_pipeline_binary_data: &'a [crate::vk::PipelineBinaryDataKHR<'a>], + pipeline_binary_data: &'a [crate::vk::PipelineBinaryDataKHR<'a>], ) -> Self { - self.binary_count = p_pipeline_binary_data.len() as _; - self.p_pipeline_binary_data = p_pipeline_binary_data.as_ptr(); + self.binary_count = pipeline_binary_data.len() as _; + self.p_pipeline_binary_data = pipeline_binary_data.as_ptr(); self } } @@ -303,12 +303,12 @@ pub(crate) mod reexport { self.binary_count = binary_count; self } - pub fn p_pipeline_binaries( + pub fn pipeline_binaries( mut self, - p_pipeline_binaries: &'a [crate::vk::PipelineBinaryKHR], + pipeline_binaries: &'a [crate::vk::PipelineBinaryKHR], ) -> Self { - self.binary_count = p_pipeline_binaries.len() as _; - self.p_pipeline_binaries = p_pipeline_binaries.as_ptr(); + self.binary_count = pipeline_binaries.len() as _; + self.p_pipeline_binaries = pipeline_binaries.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/pipeline_executable_properties.rs b/ash-rewrite/src/generated/khr/pipeline_executable_properties.rs index ff671f8fa..9448d12db 100644 --- a/ash-rewrite/src/generated/khr/pipeline_executable_properties.rs +++ b/ash-rewrite/src/generated/khr/pipeline_executable_properties.rs @@ -356,9 +356,9 @@ pub(crate) mod reexport { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a mut [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_mut_ptr().cast(); + pub fn data(mut self, data: &'a mut [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_mut_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/khr/pipeline_library.rs b/ash-rewrite/src/generated/khr/pipeline_library.rs index 124d85ac7..230ae1522 100644 --- a/ash-rewrite/src/generated/khr/pipeline_library.rs +++ b/ash-rewrite/src/generated/khr/pipeline_library.rs @@ -31,9 +31,9 @@ impl<'a> PipelineLibraryCreateInfoKHR<'a> { self.library_count = library_count; self } - pub fn p_libraries(mut self, p_libraries: &'a [crate::vk::Pipeline]) -> Self { - self.library_count = p_libraries.len() as _; - self.p_libraries = p_libraries.as_ptr(); + pub fn libraries(mut self, libraries: &'a [crate::vk::Pipeline]) -> Self { + self.library_count = libraries.len() as _; + self.p_libraries = libraries.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/present_id.rs b/ash-rewrite/src/generated/khr/present_id.rs index 160097063..83114e51f 100644 --- a/ash-rewrite/src/generated/khr/present_id.rs +++ b/ash-rewrite/src/generated/khr/present_id.rs @@ -61,9 +61,9 @@ impl<'a> PresentIdKHR<'a> { self.swapchain_count = swapchain_count; self } - pub fn p_present_ids(mut self, p_present_ids: &'a [u64]) -> Self { - self.swapchain_count = p_present_ids.len() as _; - self.p_present_ids = p_present_ids.as_ptr(); + pub fn present_ids(mut self, present_ids: &'a [u64]) -> Self { + self.swapchain_count = present_ids.len() as _; + self.p_present_ids = present_ids.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/present_id2.rs b/ash-rewrite/src/generated/khr/present_id2.rs index a952c2e0d..dcecfb417 100644 --- a/ash-rewrite/src/generated/khr/present_id2.rs +++ b/ash-rewrite/src/generated/khr/present_id2.rs @@ -61,9 +61,9 @@ impl<'a> PresentId2KHR<'a> { self.swapchain_count = swapchain_count; self } - pub fn p_present_ids(mut self, p_present_ids: &'a [u64]) -> Self { - self.swapchain_count = p_present_ids.len() as _; - self.p_present_ids = p_present_ids.as_ptr(); + pub fn present_ids(mut self, present_ids: &'a [u64]) -> Self { + self.swapchain_count = present_ids.len() as _; + self.p_present_ids = present_ids.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/ray_tracing_pipeline.rs b/ash-rewrite/src/generated/khr/ray_tracing_pipeline.rs index 3a054aa7e..9f7615fe9 100644 --- a/ash-rewrite/src/generated/khr/ray_tracing_pipeline.rs +++ b/ash-rewrite/src/generated/khr/ray_tracing_pipeline.rs @@ -205,11 +205,11 @@ pub(crate) mod reexport { self.intersection_shader = intersection_shader; self } - pub fn p_shader_group_capture_replay_handle( + pub fn shader_group_capture_replay_handle( mut self, - p_shader_group_capture_replay_handle: &'a core::ffi::c_void, + shader_group_capture_replay_handle: &'a core::ffi::c_void, ) -> Self { - self.p_shader_group_capture_replay_handle = p_shader_group_capture_replay_handle; + self.p_shader_group_capture_replay_handle = shader_group_capture_replay_handle; self } } @@ -267,24 +267,24 @@ pub(crate) mod reexport { self.stage_count = stage_count; self } - pub fn p_stages( + pub fn stages( mut self, - p_stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], + stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], ) -> Self { - self.stage_count = p_stages.len() as _; - self.p_stages = p_stages.as_ptr(); + self.stage_count = stages.len() as _; + self.p_stages = stages.as_ptr(); self } pub fn group_count(mut self, group_count: u32) -> Self { self.group_count = group_count; self } - pub fn p_groups( + pub fn groups( mut self, - p_groups: &'a [crate::vk::RayTracingShaderGroupCreateInfoKHR<'a>], + groups: &'a [crate::vk::RayTracingShaderGroupCreateInfoKHR<'a>], ) -> Self { - self.group_count = p_groups.len() as _; - self.p_groups = p_groups.as_ptr(); + self.group_count = groups.len() as _; + self.p_groups = groups.as_ptr(); self } pub fn max_pipeline_ray_recursion_depth( @@ -294,27 +294,27 @@ pub(crate) mod reexport { self.max_pipeline_ray_recursion_depth = max_pipeline_ray_recursion_depth; self } - pub fn p_library_info( + pub fn library_info( mut self, - p_library_info: &'a crate::vk::PipelineLibraryCreateInfoKHR<'a>, + library_info: &'a crate::vk::PipelineLibraryCreateInfoKHR<'a>, ) -> Self { - self.p_library_info = p_library_info; + self.p_library_info = library_info; self } - pub fn p_library_interface( + pub fn library_interface( mut self, - p_library_interface: &'a crate::vk::RayTracingPipelineInterfaceCreateInfoKHR< + library_interface: &'a crate::vk::RayTracingPipelineInterfaceCreateInfoKHR< 'a, >, ) -> Self { - self.p_library_interface = p_library_interface; + self.p_library_interface = library_interface; self } - pub fn p_dynamic_state( + pub fn dynamic_state( mut self, - p_dynamic_state: &'a crate::vk::PipelineDynamicStateCreateInfo<'a>, + dynamic_state: &'a crate::vk::PipelineDynamicStateCreateInfo<'a>, ) -> Self { - self.p_dynamic_state = p_dynamic_state; + self.p_dynamic_state = dynamic_state; self } pub fn layout(mut self, layout: crate::vk::PipelineLayout) -> Self { diff --git a/ash-rewrite/src/generated/khr/shader_abort.rs b/ash-rewrite/src/generated/khr/shader_abort.rs index e6aa8efe3..13322fec1 100644 --- a/ash-rewrite/src/generated/khr/shader_abort.rs +++ b/ash-rewrite/src/generated/khr/shader_abort.rs @@ -95,9 +95,9 @@ impl<'a> DeviceFaultShaderAbortMessageInfoKHR<'a> { self.message_data_size = message_data_size; self } - pub fn p_message_data(mut self, p_message_data: &'a mut [u8]) -> Self { - self.message_data_size = p_message_data.len() as _; - self.p_message_data = p_message_data.as_mut_ptr().cast(); + pub fn message_data(mut self, message_data: &'a mut [u8]) -> Self { + self.message_data_size = message_data.len() as _; + self.p_message_data = message_data.as_mut_ptr().cast(); self } } diff --git a/ash-rewrite/src/generated/khr/surface.rs b/ash-rewrite/src/generated/khr/surface.rs index 8e03f3a2c..3cad240c4 100644 --- a/ash-rewrite/src/generated/khr/surface.rs +++ b/ash-rewrite/src/generated/khr/surface.rs @@ -113,7 +113,7 @@ pub(crate) mod reexport { pub max_image_extent: crate::vk::Extent2D, pub max_image_array_layers: u32, pub supported_transforms: crate::vk::SurfaceTransformFlagsKHR, - pub current_transform: crate::vk::SurfaceTransformFlagBitsKHR, + pub current_transform: crate::vk::SurfaceTransformFlagsKHR, pub supported_composite_alpha: crate::vk::CompositeAlphaFlagsKHR, pub supported_usage_flags: crate::vk::ImageUsageFlags, } @@ -157,7 +157,7 @@ pub(crate) mod reexport { } pub fn current_transform( mut self, - current_transform: crate::vk::SurfaceTransformFlagBitsKHR, + current_transform: crate::vk::SurfaceTransformFlagsKHR, ) -> Self { self.current_transform = current_transform; self diff --git a/ash-rewrite/src/generated/khr/surface_maintenance1.rs b/ash-rewrite/src/generated/khr/surface_maintenance1.rs index 253c5671f..85d1de057 100644 --- a/ash-rewrite/src/generated/khr/surface_maintenance1.rs +++ b/ash-rewrite/src/generated/khr/surface_maintenance1.rs @@ -128,12 +128,12 @@ impl<'a> SurfacePresentModeCompatibilityKHR<'a> { self.present_mode_count = present_mode_count; self } - pub fn p_present_modes( + pub fn present_modes( mut self, - p_present_modes: &'a mut [crate::vk::PresentModeKHR], + present_modes: &'a mut [crate::vk::PresentModeKHR], ) -> Self { - self.present_mode_count = p_present_modes.len() as _; - self.p_present_modes = p_present_modes.as_mut_ptr(); + self.present_mode_count = present_modes.len() as _; + self.p_present_modes = present_modes.as_mut_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/swapchain.rs b/ash-rewrite/src/generated/khr/swapchain.rs index 78c7ef522..1aaaaa15c 100644 --- a/ash-rewrite/src/generated/khr/swapchain.rs +++ b/ash-rewrite/src/generated/khr/swapchain.rs @@ -202,8 +202,8 @@ pub(crate) mod reexport { pub image_sharing_mode: crate::vk::SharingMode, pub queue_family_index_count: u32, pub p_queue_family_indices: *const u32, - pub pre_transform: crate::vk::SurfaceTransformFlagBitsKHR, - pub composite_alpha: crate::vk::CompositeAlphaFlagBitsKHR, + pub pre_transform: crate::vk::SurfaceTransformFlagsKHR, + pub composite_alpha: crate::vk::CompositeAlphaFlagsKHR, pub present_mode: crate::vk::PresentModeKHR, pub clipped: crate::vk::Bool32, pub old_swapchain: crate::vk::SwapchainKHR, @@ -287,24 +287,21 @@ pub(crate) mod reexport { self.queue_family_index_count = queue_family_index_count; self } - pub fn p_queue_family_indices( - mut self, - p_queue_family_indices: &'a [u32], - ) -> Self { - self.queue_family_index_count = p_queue_family_indices.len() as _; - self.p_queue_family_indices = p_queue_family_indices.as_ptr(); + pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self { + self.queue_family_index_count = queue_family_indices.len() as _; + self.p_queue_family_indices = queue_family_indices.as_ptr(); self } pub fn pre_transform( mut self, - pre_transform: crate::vk::SurfaceTransformFlagBitsKHR, + pre_transform: crate::vk::SurfaceTransformFlagsKHR, ) -> Self { self.pre_transform = pre_transform; self } pub fn composite_alpha( mut self, - composite_alpha: crate::vk::CompositeAlphaFlagBitsKHR, + composite_alpha: crate::vk::CompositeAlphaFlagsKHR, ) -> Self { self.composite_alpha = composite_alpha; self @@ -358,34 +355,31 @@ pub(crate) mod reexport { self.wait_semaphore_count = wait_semaphore_count; self } - pub fn p_wait_semaphores( + pub fn wait_semaphores( mut self, - p_wait_semaphores: &'a [crate::vk::Semaphore], + wait_semaphores: &'a [crate::vk::Semaphore], ) -> Self { - self.wait_semaphore_count = p_wait_semaphores.len() as _; - self.p_wait_semaphores = p_wait_semaphores.as_ptr(); + self.wait_semaphore_count = wait_semaphores.len() as _; + self.p_wait_semaphores = wait_semaphores.as_ptr(); self } pub fn swapchain_count(mut self, swapchain_count: u32) -> Self { self.swapchain_count = swapchain_count; self } - pub fn p_swapchains( - mut self, - p_swapchains: &'a [crate::vk::SwapchainKHR], - ) -> Self { - self.swapchain_count = p_swapchains.len() as _; - self.p_swapchains = p_swapchains.as_ptr(); + pub fn swapchains(mut self, swapchains: &'a [crate::vk::SwapchainKHR]) -> Self { + self.swapchain_count = swapchains.len() as _; + self.p_swapchains = swapchains.as_ptr(); self } - pub fn p_image_indices(mut self, p_image_indices: &'a [u32]) -> Self { - self.swapchain_count = p_image_indices.len() as _; - self.p_image_indices = p_image_indices.as_ptr(); + pub fn image_indices(mut self, image_indices: &'a [u32]) -> Self { + self.swapchain_count = image_indices.len() as _; + self.p_image_indices = image_indices.as_ptr(); self } - pub fn p_results(mut self, p_results: &'a mut [crate::vk::Result]) -> Self { - self.swapchain_count = p_results.len() as _; - self.p_results = p_results.as_mut_ptr(); + pub fn results(mut self, results: &'a mut [crate::vk::Result]) -> Self { + self.swapchain_count = results.len() as _; + self.p_results = results.as_mut_ptr(); self } } @@ -551,7 +545,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub swapchain_count: u32, pub p_device_masks: *const u32, - pub mode: crate::vk::DeviceGroupPresentModeFlagBitsKHR, + pub mode: crate::vk::DeviceGroupPresentModeFlagsKHR, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for DeviceGroupPresentInfoKHR<'a> { @@ -576,15 +570,12 @@ pub(crate) mod reexport { self.swapchain_count = swapchain_count; self } - pub fn p_device_masks(mut self, p_device_masks: &'a [u32]) -> Self { - self.swapchain_count = p_device_masks.len() as _; - self.p_device_masks = p_device_masks.as_ptr(); + pub fn device_masks(mut self, device_masks: &'a [u32]) -> Self { + self.swapchain_count = device_masks.len() as _; + self.p_device_masks = device_masks.as_ptr(); self } - pub fn mode( - mut self, - mode: crate::vk::DeviceGroupPresentModeFlagBitsKHR, - ) -> Self { + pub fn mode(mut self, mode: crate::vk::DeviceGroupPresentModeFlagsKHR) -> Self { self.mode = mode; self } diff --git a/ash-rewrite/src/generated/khr/swapchain_maintenance1.rs b/ash-rewrite/src/generated/khr/swapchain_maintenance1.rs index f5068bbf7..901bfc0e4 100644 --- a/ash-rewrite/src/generated/khr/swapchain_maintenance1.rs +++ b/ash-rewrite/src/generated/khr/swapchain_maintenance1.rs @@ -97,9 +97,9 @@ pub(crate) mod reexport { self.swapchain_count = swapchain_count; self } - pub fn p_fences(mut self, p_fences: &'a [crate::vk::Fence]) -> Self { - self.swapchain_count = p_fences.len() as _; - self.p_fences = p_fences.as_ptr(); + pub fn fences(mut self, fences: &'a [crate::vk::Fence]) -> Self { + self.swapchain_count = fences.len() as _; + self.p_fences = fences.as_ptr(); self } } @@ -134,12 +134,12 @@ pub(crate) mod reexport { self.present_mode_count = present_mode_count; self } - pub fn p_present_modes( + pub fn present_modes( mut self, - p_present_modes: &'a [crate::vk::PresentModeKHR], + present_modes: &'a [crate::vk::PresentModeKHR], ) -> Self { - self.present_mode_count = p_present_modes.len() as _; - self.p_present_modes = p_present_modes.as_ptr(); + self.present_mode_count = present_modes.len() as _; + self.p_present_modes = present_modes.as_ptr(); self } } @@ -173,12 +173,12 @@ pub(crate) mod reexport { self.swapchain_count = swapchain_count; self } - pub fn p_present_modes( + pub fn present_modes( mut self, - p_present_modes: &'a [crate::vk::PresentModeKHR], + present_modes: &'a [crate::vk::PresentModeKHR], ) -> Self { - self.swapchain_count = p_present_modes.len() as _; - self.p_present_modes = p_present_modes.as_ptr(); + self.swapchain_count = present_modes.len() as _; + self.p_present_modes = present_modes.as_ptr(); self } } @@ -267,9 +267,9 @@ pub(crate) mod reexport { self.image_index_count = image_index_count; self } - pub fn p_image_indices(mut self, p_image_indices: &'a [u32]) -> Self { - self.image_index_count = p_image_indices.len() as _; - self.p_image_indices = p_image_indices.as_ptr(); + pub fn image_indices(mut self, image_indices: &'a [u32]) -> Self { + self.image_index_count = image_indices.len() as _; + self.p_image_indices = image_indices.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/video_decode_av1.rs b/ash-rewrite/src/generated/khr/video_decode_av1.rs index 813a270e5..abca9d7bb 100644 --- a/ash-rewrite/src/generated/khr/video_decode_av1.rs +++ b/ash-rewrite/src/generated/khr/video_decode_av1.rs @@ -92,11 +92,11 @@ impl<'a> Default for VideoDecodeAV1SessionParametersCreateInfoKHR<'a> { } } impl<'a> VideoDecodeAV1SessionParametersCreateInfoKHR<'a> { - pub fn p_std_sequence_header( + pub fn std_sequence_header( mut self, - p_std_sequence_header: &'a crate::vk::AV1SequenceHeader<'a>, + std_sequence_header: &'a crate::vk::AV1SequenceHeader<'a>, ) -> Self { - self.p_std_sequence_header = p_std_sequence_header; + self.p_std_sequence_header = std_sequence_header; self } } @@ -135,11 +135,11 @@ impl<'a> Default for VideoDecodeAV1PictureInfoKHR<'a> { } } impl<'a> VideoDecodeAV1PictureInfoKHR<'a> { - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::DecodeAV1PictureInfo<'a>, + std_picture_info: &'a crate::vk::DecodeAV1PictureInfo<'a>, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } pub fn reference_name_slot_indices( @@ -158,14 +158,14 @@ impl<'a> VideoDecodeAV1PictureInfoKHR<'a> { self.tile_count = tile_count; self } - pub fn p_tile_offsets(mut self, p_tile_offsets: &'a [u32]) -> Self { - self.tile_count = p_tile_offsets.len() as _; - self.p_tile_offsets = p_tile_offsets.as_ptr(); + pub fn tile_offsets(mut self, tile_offsets: &'a [u32]) -> Self { + self.tile_count = tile_offsets.len() as _; + self.p_tile_offsets = tile_offsets.as_ptr(); self } - pub fn p_tile_sizes(mut self, p_tile_sizes: &'a [u32]) -> Self { - self.tile_count = p_tile_sizes.len() as _; - self.p_tile_sizes = p_tile_sizes.as_ptr(); + pub fn tile_sizes(mut self, tile_sizes: &'a [u32]) -> Self { + self.tile_count = tile_sizes.len() as _; + self.p_tile_sizes = tile_sizes.as_ptr(); self } } @@ -193,11 +193,11 @@ impl<'a> Default for VideoDecodeAV1DpbSlotInfoKHR<'a> { } } impl<'a> VideoDecodeAV1DpbSlotInfoKHR<'a> { - pub fn p_std_reference_info( + pub fn std_reference_info( mut self, - p_std_reference_info: &'a crate::vk::DecodeAV1ReferenceInfo, + std_reference_info: &'a crate::vk::DecodeAV1ReferenceInfo, ) -> Self { - self.p_std_reference_info = p_std_reference_info; + self.p_std_reference_info = std_reference_info; self } } diff --git a/ash-rewrite/src/generated/khr/video_decode_h264.rs b/ash-rewrite/src/generated/khr/video_decode_h264.rs index 13ddbd60c..d145ee412 100644 --- a/ash-rewrite/src/generated/khr/video_decode_h264.rs +++ b/ash-rewrite/src/generated/khr/video_decode_h264.rs @@ -7,7 +7,7 @@ pub struct VideoDecodeH264ProfileInfoKHR<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub std_profile_idc: crate::vk::H264ProfileIdc, - pub picture_layout: crate::vk::VideoDecodeH264PictureLayoutFlagBitsKHR, + pub picture_layout: crate::vk::VideoDecodeH264PictureLayoutFlagsKHR, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for VideoDecodeH264ProfileInfoKHR<'a> { @@ -38,7 +38,7 @@ impl<'a> VideoDecodeH264ProfileInfoKHR<'a> { } pub fn picture_layout( mut self, - picture_layout: crate::vk::VideoDecodeH264PictureLayoutFlagBitsKHR, + picture_layout: crate::vk::VideoDecodeH264PictureLayoutFlagsKHR, ) -> Self { self.picture_layout = picture_layout; self @@ -117,24 +117,24 @@ impl<'a> VideoDecodeH264SessionParametersAddInfoKHR<'a> { self.std_sps_count = std_sps_count; self } - pub fn p_std_sp_ss( + pub fn std_sp_ss( mut self, - p_std_sp_ss: &'a [crate::vk::H264SequenceParameterSet<'a>], + std_sp_ss: &'a [crate::vk::H264SequenceParameterSet<'a>], ) -> Self { - self.std_sps_count = p_std_sp_ss.len() as _; - self.p_std_sp_ss = p_std_sp_ss.as_ptr(); + self.std_sps_count = std_sp_ss.len() as _; + self.p_std_sp_ss = std_sp_ss.as_ptr(); self } pub fn std_pps_count(mut self, std_pps_count: u32) -> Self { self.std_pps_count = std_pps_count; self } - pub fn p_std_pp_ss( + pub fn std_pp_ss( mut self, - p_std_pp_ss: &'a [crate::vk::H264PictureParameterSet<'a>], + std_pp_ss: &'a [crate::vk::H264PictureParameterSet<'a>], ) -> Self { - self.std_pps_count = p_std_pp_ss.len() as _; - self.p_std_pp_ss = p_std_pp_ss.as_ptr(); + self.std_pps_count = std_pp_ss.len() as _; + self.p_std_pp_ss = std_pp_ss.as_ptr(); self } } @@ -177,13 +177,13 @@ impl<'a> VideoDecodeH264SessionParametersCreateInfoKHR<'a> { self.max_std_pps_count = max_std_pps_count; self } - pub fn p_parameters_add_info( + pub fn parameters_add_info( mut self, - p_parameters_add_info: &'a crate::vk::VideoDecodeH264SessionParametersAddInfoKHR< + parameters_add_info: &'a crate::vk::VideoDecodeH264SessionParametersAddInfoKHR< 'a, >, ) -> Self { - self.p_parameters_add_info = p_parameters_add_info; + self.p_parameters_add_info = parameters_add_info; self } } @@ -215,20 +215,20 @@ impl<'a> Default for VideoDecodeH264PictureInfoKHR<'a> { } } impl<'a> VideoDecodeH264PictureInfoKHR<'a> { - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::DecodeH264PictureInfo, + std_picture_info: &'a crate::vk::DecodeH264PictureInfo, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } pub fn slice_count(mut self, slice_count: u32) -> Self { self.slice_count = slice_count; self } - pub fn p_slice_offsets(mut self, p_slice_offsets: &'a [u32]) -> Self { - self.slice_count = p_slice_offsets.len() as _; - self.p_slice_offsets = p_slice_offsets.as_ptr(); + pub fn slice_offsets(mut self, slice_offsets: &'a [u32]) -> Self { + self.slice_count = slice_offsets.len() as _; + self.p_slice_offsets = slice_offsets.as_ptr(); self } } @@ -256,11 +256,11 @@ impl<'a> Default for VideoDecodeH264DpbSlotInfoKHR<'a> { } } impl<'a> VideoDecodeH264DpbSlotInfoKHR<'a> { - pub fn p_std_reference_info( + pub fn std_reference_info( mut self, - p_std_reference_info: &'a crate::vk::DecodeH264ReferenceInfo, + std_reference_info: &'a crate::vk::DecodeH264ReferenceInfo, ) -> Self { - self.p_std_reference_info = p_std_reference_info; + self.p_std_reference_info = std_reference_info; self } } diff --git a/ash-rewrite/src/generated/khr/video_decode_h265.rs b/ash-rewrite/src/generated/khr/video_decode_h265.rs index e71b502a0..f7e097ad9 100644 --- a/ash-rewrite/src/generated/khr/video_decode_h265.rs +++ b/ash-rewrite/src/generated/khr/video_decode_h265.rs @@ -103,36 +103,36 @@ impl<'a> VideoDecodeH265SessionParametersAddInfoKHR<'a> { self.std_vps_count = std_vps_count; self } - pub fn p_std_vp_ss( + pub fn std_vp_ss( mut self, - p_std_vp_ss: &'a [crate::vk::H265VideoParameterSet<'a>], + std_vp_ss: &'a [crate::vk::H265VideoParameterSet<'a>], ) -> Self { - self.std_vps_count = p_std_vp_ss.len() as _; - self.p_std_vp_ss = p_std_vp_ss.as_ptr(); + self.std_vps_count = std_vp_ss.len() as _; + self.p_std_vp_ss = std_vp_ss.as_ptr(); self } pub fn std_sps_count(mut self, std_sps_count: u32) -> Self { self.std_sps_count = std_sps_count; self } - pub fn p_std_sp_ss( + pub fn std_sp_ss( mut self, - p_std_sp_ss: &'a [crate::vk::H265SequenceParameterSet<'a>], + std_sp_ss: &'a [crate::vk::H265SequenceParameterSet<'a>], ) -> Self { - self.std_sps_count = p_std_sp_ss.len() as _; - self.p_std_sp_ss = p_std_sp_ss.as_ptr(); + self.std_sps_count = std_sp_ss.len() as _; + self.p_std_sp_ss = std_sp_ss.as_ptr(); self } pub fn std_pps_count(mut self, std_pps_count: u32) -> Self { self.std_pps_count = std_pps_count; self } - pub fn p_std_pp_ss( + pub fn std_pp_ss( mut self, - p_std_pp_ss: &'a [crate::vk::H265PictureParameterSet<'a>], + std_pp_ss: &'a [crate::vk::H265PictureParameterSet<'a>], ) -> Self { - self.std_pps_count = p_std_pp_ss.len() as _; - self.p_std_pp_ss = p_std_pp_ss.as_ptr(); + self.std_pps_count = std_pp_ss.len() as _; + self.p_std_pp_ss = std_pp_ss.as_ptr(); self } } @@ -181,13 +181,13 @@ impl<'a> VideoDecodeH265SessionParametersCreateInfoKHR<'a> { self.max_std_pps_count = max_std_pps_count; self } - pub fn p_parameters_add_info( + pub fn parameters_add_info( mut self, - p_parameters_add_info: &'a crate::vk::VideoDecodeH265SessionParametersAddInfoKHR< + parameters_add_info: &'a crate::vk::VideoDecodeH265SessionParametersAddInfoKHR< 'a, >, ) -> Self { - self.p_parameters_add_info = p_parameters_add_info; + self.p_parameters_add_info = parameters_add_info; self } } @@ -219,23 +219,20 @@ impl<'a> Default for VideoDecodeH265PictureInfoKHR<'a> { } } impl<'a> VideoDecodeH265PictureInfoKHR<'a> { - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::DecodeH265PictureInfo, + std_picture_info: &'a crate::vk::DecodeH265PictureInfo, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } pub fn slice_segment_count(mut self, slice_segment_count: u32) -> Self { self.slice_segment_count = slice_segment_count; self } - pub fn p_slice_segment_offsets( - mut self, - p_slice_segment_offsets: &'a [u32], - ) -> Self { - self.slice_segment_count = p_slice_segment_offsets.len() as _; - self.p_slice_segment_offsets = p_slice_segment_offsets.as_ptr(); + pub fn slice_segment_offsets(mut self, slice_segment_offsets: &'a [u32]) -> Self { + self.slice_segment_count = slice_segment_offsets.len() as _; + self.p_slice_segment_offsets = slice_segment_offsets.as_ptr(); self } } @@ -263,11 +260,11 @@ impl<'a> Default for VideoDecodeH265DpbSlotInfoKHR<'a> { } } impl<'a> VideoDecodeH265DpbSlotInfoKHR<'a> { - pub fn p_std_reference_info( + pub fn std_reference_info( mut self, - p_std_reference_info: &'a crate::vk::DecodeH265ReferenceInfo, + std_reference_info: &'a crate::vk::DecodeH265ReferenceInfo, ) -> Self { - self.p_std_reference_info = p_std_reference_info; + self.p_std_reference_info = std_reference_info; self } } diff --git a/ash-rewrite/src/generated/khr/video_decode_queue.rs b/ash-rewrite/src/generated/khr/video_decode_queue.rs index 4f39924a9..50cbce05b 100644 --- a/ash-rewrite/src/generated/khr/video_decode_queue.rs +++ b/ash-rewrite/src/generated/khr/video_decode_queue.rs @@ -163,23 +163,23 @@ pub(crate) mod reexport { self.dst_picture_resource = dst_picture_resource; self } - pub fn p_setup_reference_slot( + pub fn setup_reference_slot( mut self, - p_setup_reference_slot: &'a crate::vk::VideoReferenceSlotInfoKHR<'a>, + setup_reference_slot: &'a crate::vk::VideoReferenceSlotInfoKHR<'a>, ) -> Self { - self.p_setup_reference_slot = p_setup_reference_slot; + self.p_setup_reference_slot = setup_reference_slot; self } pub fn reference_slot_count(mut self, reference_slot_count: u32) -> Self { self.reference_slot_count = reference_slot_count; self } - pub fn p_reference_slots( + pub fn reference_slots( mut self, - p_reference_slots: &'a [crate::vk::VideoReferenceSlotInfoKHR<'a>], + reference_slots: &'a [crate::vk::VideoReferenceSlotInfoKHR<'a>], ) -> Self { - self.reference_slot_count = p_reference_slots.len() as _; - self.p_reference_slots = p_reference_slots.as_ptr(); + self.reference_slot_count = reference_slots.len() as _; + self.p_reference_slots = reference_slots.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/video_decode_vp9.rs b/ash-rewrite/src/generated/khr/video_decode_vp9.rs index 280a0d168..c6cff3e27 100644 --- a/ash-rewrite/src/generated/khr/video_decode_vp9.rs +++ b/ash-rewrite/src/generated/khr/video_decode_vp9.rs @@ -126,11 +126,11 @@ impl<'a> Default for VideoDecodeVP9PictureInfoKHR<'a> { } } impl<'a> VideoDecodeVP9PictureInfoKHR<'a> { - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::DecodeVP9PictureInfo<'a>, + std_picture_info: &'a crate::vk::DecodeVP9PictureInfo<'a>, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } pub fn reference_name_slot_indices( diff --git a/ash-rewrite/src/generated/khr/video_encode_av1.rs b/ash-rewrite/src/generated/khr/video_encode_av1.rs index f4ff64803..5abcf1836 100644 --- a/ash-rewrite/src/generated/khr/video_encode_av1.rs +++ b/ash-rewrite/src/generated/khr/video_encode_av1.rs @@ -464,30 +464,30 @@ impl<'a> Default for VideoEncodeAV1SessionParametersCreateInfoKHR<'a> { } } impl<'a> VideoEncodeAV1SessionParametersCreateInfoKHR<'a> { - pub fn p_std_sequence_header( + pub fn std_sequence_header( mut self, - p_std_sequence_header: &'a crate::vk::AV1SequenceHeader<'a>, + std_sequence_header: &'a crate::vk::AV1SequenceHeader<'a>, ) -> Self { - self.p_std_sequence_header = p_std_sequence_header; + self.p_std_sequence_header = std_sequence_header; self } - pub fn p_std_decoder_model_info( + pub fn std_decoder_model_info( mut self, - p_std_decoder_model_info: &'a crate::vk::EncodeAV1DecoderModelInfo, + std_decoder_model_info: &'a crate::vk::EncodeAV1DecoderModelInfo, ) -> Self { - self.p_std_decoder_model_info = p_std_decoder_model_info; + self.p_std_decoder_model_info = std_decoder_model_info; self } pub fn std_operating_point_count(mut self, std_operating_point_count: u32) -> Self { self.std_operating_point_count = std_operating_point_count; self } - pub fn p_std_operating_points( + pub fn std_operating_points( mut self, - p_std_operating_points: &'a [crate::vk::EncodeAV1OperatingPointInfo], + std_operating_points: &'a [crate::vk::EncodeAV1OperatingPointInfo], ) -> Self { - self.std_operating_point_count = p_std_operating_points.len() as _; - self.p_std_operating_points = p_std_operating_points.as_ptr(); + self.std_operating_point_count = std_operating_points.len() as _; + self.p_std_operating_points = std_operating_points.as_ptr(); self } } @@ -515,11 +515,11 @@ impl<'a> Default for VideoEncodeAV1DpbSlotInfoKHR<'a> { } } impl<'a> VideoEncodeAV1DpbSlotInfoKHR<'a> { - pub fn p_std_reference_info( + pub fn std_reference_info( mut self, - p_std_reference_info: &'a crate::vk::EncodeAV1ReferenceInfo<'a>, + std_reference_info: &'a crate::vk::EncodeAV1ReferenceInfo<'a>, ) -> Self { - self.p_std_reference_info = p_std_reference_info; + self.p_std_reference_info = std_reference_info; self } } @@ -578,11 +578,11 @@ impl<'a> VideoEncodeAV1PictureInfoKHR<'a> { self.constant_q_index = constant_q_index; self } - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::EncodeAV1PictureInfo<'a>, + std_picture_info: &'a crate::vk::EncodeAV1PictureInfo<'a>, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } pub fn reference_name_slot_indices( diff --git a/ash-rewrite/src/generated/khr/video_encode_h264.rs b/ash-rewrite/src/generated/khr/video_encode_h264.rs index 3c3277608..4d56960d5 100644 --- a/ash-rewrite/src/generated/khr/video_encode_h264.rs +++ b/ash-rewrite/src/generated/khr/video_encode_h264.rs @@ -291,24 +291,24 @@ impl<'a> VideoEncodeH264SessionParametersAddInfoKHR<'a> { self.std_sps_count = std_sps_count; self } - pub fn p_std_sp_ss( + pub fn std_sp_ss( mut self, - p_std_sp_ss: &'a [crate::vk::H264SequenceParameterSet<'a>], + std_sp_ss: &'a [crate::vk::H264SequenceParameterSet<'a>], ) -> Self { - self.std_sps_count = p_std_sp_ss.len() as _; - self.p_std_sp_ss = p_std_sp_ss.as_ptr(); + self.std_sps_count = std_sp_ss.len() as _; + self.p_std_sp_ss = std_sp_ss.as_ptr(); self } pub fn std_pps_count(mut self, std_pps_count: u32) -> Self { self.std_pps_count = std_pps_count; self } - pub fn p_std_pp_ss( + pub fn std_pp_ss( mut self, - p_std_pp_ss: &'a [crate::vk::H264PictureParameterSet<'a>], + std_pp_ss: &'a [crate::vk::H264PictureParameterSet<'a>], ) -> Self { - self.std_pps_count = p_std_pp_ss.len() as _; - self.p_std_pp_ss = p_std_pp_ss.as_ptr(); + self.std_pps_count = std_pp_ss.len() as _; + self.p_std_pp_ss = std_pp_ss.as_ptr(); self } } @@ -351,13 +351,13 @@ impl<'a> VideoEncodeH264SessionParametersCreateInfoKHR<'a> { self.max_std_pps_count = max_std_pps_count; self } - pub fn p_parameters_add_info( + pub fn parameters_add_info( mut self, - p_parameters_add_info: &'a crate::vk::VideoEncodeH264SessionParametersAddInfoKHR< + parameters_add_info: &'a crate::vk::VideoEncodeH264SessionParametersAddInfoKHR< 'a, >, ) -> Self { - self.p_parameters_add_info = p_parameters_add_info; + self.p_parameters_add_info = parameters_add_info; self } } @@ -471,11 +471,11 @@ impl<'a> Default for VideoEncodeH264DpbSlotInfoKHR<'a> { } } impl<'a> VideoEncodeH264DpbSlotInfoKHR<'a> { - pub fn p_std_reference_info( + pub fn std_reference_info( mut self, - p_std_reference_info: &'a crate::vk::EncodeH264ReferenceInfo, + std_reference_info: &'a crate::vk::EncodeH264ReferenceInfo, ) -> Self { - self.p_std_reference_info = p_std_reference_info; + self.p_std_reference_info = std_reference_info; self } } @@ -513,19 +513,19 @@ impl<'a> VideoEncodeH264PictureInfoKHR<'a> { self.nalu_slice_entry_count = nalu_slice_entry_count; self } - pub fn p_nalu_slice_entries( + pub fn nalu_slice_entries( mut self, - p_nalu_slice_entries: &'a [crate::vk::VideoEncodeH264NaluSliceInfoKHR<'a>], + nalu_slice_entries: &'a [crate::vk::VideoEncodeH264NaluSliceInfoKHR<'a>], ) -> Self { - self.nalu_slice_entry_count = p_nalu_slice_entries.len() as _; - self.p_nalu_slice_entries = p_nalu_slice_entries.as_ptr(); + self.nalu_slice_entry_count = nalu_slice_entries.len() as _; + self.p_nalu_slice_entries = nalu_slice_entries.as_ptr(); self } - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::EncodeH264PictureInfo<'a>, + std_picture_info: &'a crate::vk::EncodeH264PictureInfo<'a>, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } pub fn generate_prefix_nalu(mut self, generate_prefix_nalu: bool) -> Self { @@ -595,11 +595,11 @@ impl<'a> VideoEncodeH264NaluSliceInfoKHR<'a> { self.constant_qp = constant_qp; self } - pub fn p_std_slice_header( + pub fn std_slice_header( mut self, - p_std_slice_header: &'a crate::vk::EncodeH264SliceHeader<'a>, + std_slice_header: &'a crate::vk::EncodeH264SliceHeader<'a>, ) -> Self { - self.p_std_slice_header = p_std_slice_header; + self.p_std_slice_header = std_slice_header; self } } diff --git a/ash-rewrite/src/generated/khr/video_encode_h265.rs b/ash-rewrite/src/generated/khr/video_encode_h265.rs index 36bc2c08b..6bfd0f93e 100644 --- a/ash-rewrite/src/generated/khr/video_encode_h265.rs +++ b/ash-rewrite/src/generated/khr/video_encode_h265.rs @@ -306,36 +306,36 @@ impl<'a> VideoEncodeH265SessionParametersAddInfoKHR<'a> { self.std_vps_count = std_vps_count; self } - pub fn p_std_vp_ss( + pub fn std_vp_ss( mut self, - p_std_vp_ss: &'a [crate::vk::H265VideoParameterSet<'a>], + std_vp_ss: &'a [crate::vk::H265VideoParameterSet<'a>], ) -> Self { - self.std_vps_count = p_std_vp_ss.len() as _; - self.p_std_vp_ss = p_std_vp_ss.as_ptr(); + self.std_vps_count = std_vp_ss.len() as _; + self.p_std_vp_ss = std_vp_ss.as_ptr(); self } pub fn std_sps_count(mut self, std_sps_count: u32) -> Self { self.std_sps_count = std_sps_count; self } - pub fn p_std_sp_ss( + pub fn std_sp_ss( mut self, - p_std_sp_ss: &'a [crate::vk::H265SequenceParameterSet<'a>], + std_sp_ss: &'a [crate::vk::H265SequenceParameterSet<'a>], ) -> Self { - self.std_sps_count = p_std_sp_ss.len() as _; - self.p_std_sp_ss = p_std_sp_ss.as_ptr(); + self.std_sps_count = std_sp_ss.len() as _; + self.p_std_sp_ss = std_sp_ss.as_ptr(); self } pub fn std_pps_count(mut self, std_pps_count: u32) -> Self { self.std_pps_count = std_pps_count; self } - pub fn p_std_pp_ss( + pub fn std_pp_ss( mut self, - p_std_pp_ss: &'a [crate::vk::H265PictureParameterSet<'a>], + std_pp_ss: &'a [crate::vk::H265PictureParameterSet<'a>], ) -> Self { - self.std_pps_count = p_std_pp_ss.len() as _; - self.p_std_pp_ss = p_std_pp_ss.as_ptr(); + self.std_pps_count = std_pp_ss.len() as _; + self.p_std_pp_ss = std_pp_ss.as_ptr(); self } } @@ -384,13 +384,13 @@ impl<'a> VideoEncodeH265SessionParametersCreateInfoKHR<'a> { self.max_std_pps_count = max_std_pps_count; self } - pub fn p_parameters_add_info( + pub fn parameters_add_info( mut self, - p_parameters_add_info: &'a crate::vk::VideoEncodeH265SessionParametersAddInfoKHR< + parameters_add_info: &'a crate::vk::VideoEncodeH265SessionParametersAddInfoKHR< 'a, >, ) -> Self { - self.p_parameters_add_info = p_parameters_add_info; + self.p_parameters_add_info = parameters_add_info; self } } @@ -535,21 +535,21 @@ impl<'a> VideoEncodeH265PictureInfoKHR<'a> { self.nalu_slice_segment_entry_count = nalu_slice_segment_entry_count; self } - pub fn p_nalu_slice_segment_entries( + pub fn nalu_slice_segment_entries( mut self, - p_nalu_slice_segment_entries: &'a [crate::vk::VideoEncodeH265NaluSliceSegmentInfoKHR< + nalu_slice_segment_entries: &'a [crate::vk::VideoEncodeH265NaluSliceSegmentInfoKHR< 'a, >], ) -> Self { - self.nalu_slice_segment_entry_count = p_nalu_slice_segment_entries.len() as _; - self.p_nalu_slice_segment_entries = p_nalu_slice_segment_entries.as_ptr(); + self.nalu_slice_segment_entry_count = nalu_slice_segment_entries.len() as _; + self.p_nalu_slice_segment_entries = nalu_slice_segment_entries.as_ptr(); self } - pub fn p_std_picture_info( + pub fn std_picture_info( mut self, - p_std_picture_info: &'a crate::vk::EncodeH265PictureInfo<'a>, + std_picture_info: &'a crate::vk::EncodeH265PictureInfo<'a>, ) -> Self { - self.p_std_picture_info = p_std_picture_info; + self.p_std_picture_info = std_picture_info; self } } @@ -582,11 +582,11 @@ impl<'a> VideoEncodeH265NaluSliceSegmentInfoKHR<'a> { self.constant_qp = constant_qp; self } - pub fn p_std_slice_segment_header( + pub fn std_slice_segment_header( mut self, - p_std_slice_segment_header: &'a crate::vk::EncodeH265SliceSegmentHeader<'a>, + std_slice_segment_header: &'a crate::vk::EncodeH265SliceSegmentHeader<'a>, ) -> Self { - self.p_std_slice_segment_header = p_std_slice_segment_header; + self.p_std_slice_segment_header = std_slice_segment_header; self } } @@ -859,11 +859,11 @@ impl<'a> Default for VideoEncodeH265DpbSlotInfoKHR<'a> { } } impl<'a> VideoEncodeH265DpbSlotInfoKHR<'a> { - pub fn p_std_reference_info( + pub fn std_reference_info( mut self, - p_std_reference_info: &'a crate::vk::EncodeH265ReferenceInfo, + std_reference_info: &'a crate::vk::EncodeH265ReferenceInfo, ) -> Self { - self.p_std_reference_info = p_std_reference_info; + self.p_std_reference_info = std_reference_info; self } } diff --git a/ash-rewrite/src/generated/khr/video_encode_intra_refresh.rs b/ash-rewrite/src/generated/khr/video_encode_intra_refresh.rs index c75f286f4..2582cb370 100644 --- a/ash-rewrite/src/generated/khr/video_encode_intra_refresh.rs +++ b/ash-rewrite/src/generated/khr/video_encode_intra_refresh.rs @@ -77,7 +77,7 @@ impl<'a> VideoEncodeIntraRefreshCapabilitiesKHR<'a> { pub struct VideoEncodeSessionIntraRefreshCreateInfoKHR<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub intra_refresh_mode: crate::vk::VideoEncodeIntraRefreshModeFlagBitsKHR, + pub intra_refresh_mode: crate::vk::VideoEncodeIntraRefreshModeFlagsKHR, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -99,7 +99,7 @@ impl<'a> Default for VideoEncodeSessionIntraRefreshCreateInfoKHR<'a> { impl<'a> VideoEncodeSessionIntraRefreshCreateInfoKHR<'a> { pub fn intra_refresh_mode( mut self, - intra_refresh_mode: crate::vk::VideoEncodeIntraRefreshModeFlagBitsKHR, + intra_refresh_mode: crate::vk::VideoEncodeIntraRefreshModeFlagsKHR, ) -> Self { self.intra_refresh_mode = intra_refresh_mode; self diff --git a/ash-rewrite/src/generated/khr/video_encode_queue.rs b/ash-rewrite/src/generated/khr/video_encode_queue.rs index da7f4ea02..c93a9988f 100644 --- a/ash-rewrite/src/generated/khr/video_encode_queue.rs +++ b/ash-rewrite/src/generated/khr/video_encode_queue.rs @@ -269,23 +269,23 @@ pub(crate) mod reexport { self.src_picture_resource = src_picture_resource; self } - pub fn p_setup_reference_slot( + pub fn setup_reference_slot( mut self, - p_setup_reference_slot: &'a crate::vk::VideoReferenceSlotInfoKHR<'a>, + setup_reference_slot: &'a crate::vk::VideoReferenceSlotInfoKHR<'a>, ) -> Self { - self.p_setup_reference_slot = p_setup_reference_slot; + self.p_setup_reference_slot = setup_reference_slot; self } pub fn reference_slot_count(mut self, reference_slot_count: u32) -> Self { self.reference_slot_count = reference_slot_count; self } - pub fn p_reference_slots( + pub fn reference_slots( mut self, - p_reference_slots: &'a [crate::vk::VideoReferenceSlotInfoKHR<'a>], + reference_slots: &'a [crate::vk::VideoReferenceSlotInfoKHR<'a>], ) -> Self { - self.reference_slot_count = p_reference_slots.len() as _; - self.p_reference_slots = p_reference_slots.as_ptr(); + self.reference_slot_count = reference_slots.len() as _; + self.p_reference_slots = reference_slots.as_ptr(); self } pub fn preceding_externally_encoded_bytes( @@ -385,11 +385,11 @@ pub(crate) mod reexport { } } impl<'a> PhysicalDeviceVideoEncodeQualityLevelInfoKHR<'a> { - pub fn p_video_profile( + pub fn video_profile( mut self, - p_video_profile: &'a crate::vk::VideoProfileInfoKHR<'a>, + video_profile: &'a crate::vk::VideoProfileInfoKHR<'a>, ) -> Self { - self.p_video_profile = p_video_profile; + self.p_video_profile = video_profile; self } pub fn quality_level(mut self, quality_level: u32) -> Self { @@ -402,7 +402,7 @@ pub(crate) mod reexport { pub struct VideoEncodeQualityLevelPropertiesKHR<'a> { pub s_type: crate::vk::StructureType, pub p_next: *mut core::ffi::c_void, - pub preferred_rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagBitsKHR, + pub preferred_rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagsKHR, pub preferred_rate_control_layer_count: u32, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -424,7 +424,7 @@ pub(crate) mod reexport { impl<'a> VideoEncodeQualityLevelPropertiesKHR<'a> { pub fn preferred_rate_control_mode( mut self, - preferred_rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagBitsKHR, + preferred_rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagsKHR, ) -> Self { self.preferred_rate_control_mode = preferred_rate_control_mode; self @@ -443,7 +443,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub flags: crate::vk::VideoEncodeRateControlFlagsKHR, - pub rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagBitsKHR, + pub rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagsKHR, pub layer_count: u32, pub p_layers: *const crate::vk::VideoEncodeRateControlLayerInfoKHR<'a>, pub virtual_buffer_size_in_ms: u32, @@ -482,7 +482,7 @@ pub(crate) mod reexport { } pub fn rate_control_mode( mut self, - rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagBitsKHR, + rate_control_mode: crate::vk::VideoEncodeRateControlModeFlagsKHR, ) -> Self { self.rate_control_mode = rate_control_mode; self @@ -491,12 +491,12 @@ pub(crate) mod reexport { self.layer_count = layer_count; self } - pub fn p_layers( + pub fn layers( mut self, - p_layers: &'a [crate::vk::VideoEncodeRateControlLayerInfoKHR<'a>], + layers: &'a [crate::vk::VideoEncodeRateControlLayerInfoKHR<'a>], ) -> Self { - self.layer_count = p_layers.len() as _; - self.p_layers = p_layers.as_ptr(); + self.layer_count = layers.len() as _; + self.p_layers = layers.as_ptr(); self } pub fn virtual_buffer_size_in_ms( diff --git a/ash-rewrite/src/generated/khr/video_maintenance2.rs b/ash-rewrite/src/generated/khr/video_maintenance2.rs index 800e588a0..a45d4cef9 100644 --- a/ash-rewrite/src/generated/khr/video_maintenance2.rs +++ b/ash-rewrite/src/generated/khr/video_maintenance2.rs @@ -60,18 +60,18 @@ impl<'a> Default for VideoDecodeH264InlineSessionParametersInfoKHR<'a> { } } impl<'a> VideoDecodeH264InlineSessionParametersInfoKHR<'a> { - pub fn p_std_sps( + pub fn std_sps( mut self, - p_std_sps: &'a crate::vk::H264SequenceParameterSet<'a>, + std_sps: &'a crate::vk::H264SequenceParameterSet<'a>, ) -> Self { - self.p_std_sps = p_std_sps; + self.p_std_sps = std_sps; self } - pub fn p_std_pps( + pub fn std_pps( mut self, - p_std_pps: &'a crate::vk::H264PictureParameterSet<'a>, + std_pps: &'a crate::vk::H264PictureParameterSet<'a>, ) -> Self { - self.p_std_pps = p_std_pps; + self.p_std_pps = std_pps; self } } @@ -104,25 +104,22 @@ impl<'a> Default for VideoDecodeH265InlineSessionParametersInfoKHR<'a> { } } impl<'a> VideoDecodeH265InlineSessionParametersInfoKHR<'a> { - pub fn p_std_vps( - mut self, - p_std_vps: &'a crate::vk::H265VideoParameterSet<'a>, - ) -> Self { - self.p_std_vps = p_std_vps; + pub fn std_vps(mut self, std_vps: &'a crate::vk::H265VideoParameterSet<'a>) -> Self { + self.p_std_vps = std_vps; self } - pub fn p_std_sps( + pub fn std_sps( mut self, - p_std_sps: &'a crate::vk::H265SequenceParameterSet<'a>, + std_sps: &'a crate::vk::H265SequenceParameterSet<'a>, ) -> Self { - self.p_std_sps = p_std_sps; + self.p_std_sps = std_sps; self } - pub fn p_std_pps( + pub fn std_pps( mut self, - p_std_pps: &'a crate::vk::H265PictureParameterSet<'a>, + std_pps: &'a crate::vk::H265PictureParameterSet<'a>, ) -> Self { - self.p_std_pps = p_std_pps; + self.p_std_pps = std_pps; self } } @@ -151,11 +148,11 @@ impl<'a> Default for VideoDecodeAV1InlineSessionParametersInfoKHR<'a> { } } impl<'a> VideoDecodeAV1InlineSessionParametersInfoKHR<'a> { - pub fn p_std_sequence_header( + pub fn std_sequence_header( mut self, - p_std_sequence_header: &'a crate::vk::AV1SequenceHeader<'a>, + std_sequence_header: &'a crate::vk::AV1SequenceHeader<'a>, ) -> Self { - self.p_std_sequence_header = p_std_sequence_header; + self.p_std_sequence_header = std_sequence_header; self } } diff --git a/ash-rewrite/src/generated/khr/video_queue.rs b/ash-rewrite/src/generated/khr/video_queue.rs index bf59d4067..26eb4723d 100644 --- a/ash-rewrite/src/generated/khr/video_queue.rs +++ b/ash-rewrite/src/generated/khr/video_queue.rs @@ -333,12 +333,12 @@ pub(crate) mod reexport { self.profile_count = profile_count; self } - pub fn p_profiles( + pub fn profiles( mut self, - p_profiles: &'a [crate::vk::VideoProfileInfoKHR<'a>], + profiles: &'a [crate::vk::VideoProfileInfoKHR<'a>], ) -> Self { - self.profile_count = p_profiles.len() as _; - self.p_profiles = p_profiles.as_ptr(); + self.profile_count = profiles.len() as _; + self.p_profiles = profiles.as_ptr(); self } } @@ -440,7 +440,7 @@ pub(crate) mod reexport { pub struct VideoProfileInfoKHR<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub video_codec_operation: crate::vk::VideoCodecOperationFlagBitsKHR, + pub video_codec_operation: crate::vk::VideoCodecOperationFlagsKHR, pub chroma_subsampling: crate::vk::VideoChromaSubsamplingFlagsKHR, pub luma_bit_depth: crate::vk::VideoComponentBitDepthFlagsKHR, pub chroma_bit_depth: crate::vk::VideoComponentBitDepthFlagsKHR, @@ -467,7 +467,7 @@ pub(crate) mod reexport { impl<'a> VideoProfileInfoKHR<'a> { pub fn video_codec_operation( mut self, - video_codec_operation: crate::vk::VideoCodecOperationFlagBitsKHR, + video_codec_operation: crate::vk::VideoCodecOperationFlagsKHR, ) -> Self { self.video_codec_operation = video_codec_operation; self @@ -748,11 +748,11 @@ pub(crate) mod reexport { self.slot_index = slot_index; self } - pub fn p_picture_resource( + pub fn picture_resource( mut self, - p_picture_resource: &'a crate::vk::VideoPictureResourceInfoKHR<'a>, + picture_resource: &'a crate::vk::VideoPictureResourceInfoKHR<'a>, ) -> Self { - self.p_picture_resource = p_picture_resource; + self.p_picture_resource = picture_resource; self } } @@ -802,11 +802,11 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_video_profile( + pub fn video_profile( mut self, - p_video_profile: &'a crate::vk::VideoProfileInfoKHR<'a>, + video_profile: &'a crate::vk::VideoProfileInfoKHR<'a>, ) -> Self { - self.p_video_profile = p_video_profile; + self.p_video_profile = video_profile; self } pub fn picture_format(mut self, picture_format: crate::vk::Format) -> Self { @@ -838,11 +838,11 @@ pub(crate) mod reexport { self.max_active_reference_pictures = max_active_reference_pictures; self } - pub fn p_std_header_version( + pub fn std_header_version( mut self, - p_std_header_version: &'a crate::vk::ExtensionProperties, + std_header_version: &'a crate::vk::ExtensionProperties, ) -> Self { - self.p_std_header_version = p_std_header_version; + self.p_std_header_version = std_header_version; self } } @@ -975,12 +975,12 @@ pub(crate) mod reexport { self.reference_slot_count = reference_slot_count; self } - pub fn p_reference_slots( + pub fn reference_slots( mut self, - p_reference_slots: &'a [crate::vk::VideoReferenceSlotInfoKHR<'a>], + reference_slots: &'a [crate::vk::VideoReferenceSlotInfoKHR<'a>], ) -> Self { - self.reference_slot_count = p_reference_slots.len() as _; - self.p_reference_slots = p_reference_slots.as_ptr(); + self.reference_slot_count = reference_slots.len() as _; + self.p_reference_slots = reference_slots.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/khr/win32_keyed_mutex.rs b/ash-rewrite/src/generated/khr/win32_keyed_mutex.rs index bab4d34ae..d5650c256 100644 --- a/ash-rewrite/src/generated/khr/win32_keyed_mutex.rs +++ b/ash-rewrite/src/generated/khr/win32_keyed_mutex.rs @@ -43,39 +43,39 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoKHR<'a> { self.acquire_count = acquire_count; self } - pub fn p_acquire_syncs( + pub fn acquire_syncs( mut self, - p_acquire_syncs: &'a [crate::vk::DeviceMemory], + acquire_syncs: &'a [crate::vk::DeviceMemory], ) -> Self { - self.acquire_count = p_acquire_syncs.len() as _; - self.p_acquire_syncs = p_acquire_syncs.as_ptr(); + self.acquire_count = acquire_syncs.len() as _; + self.p_acquire_syncs = acquire_syncs.as_ptr(); self } - pub fn p_acquire_keys(mut self, p_acquire_keys: &'a [u64]) -> Self { - self.acquire_count = p_acquire_keys.len() as _; - self.p_acquire_keys = p_acquire_keys.as_ptr(); + pub fn acquire_keys(mut self, acquire_keys: &'a [u64]) -> Self { + self.acquire_count = acquire_keys.len() as _; + self.p_acquire_keys = acquire_keys.as_ptr(); self } - pub fn p_acquire_timeouts(mut self, p_acquire_timeouts: &'a [u32]) -> Self { - self.acquire_count = p_acquire_timeouts.len() as _; - self.p_acquire_timeouts = p_acquire_timeouts.as_ptr(); + pub fn acquire_timeouts(mut self, acquire_timeouts: &'a [u32]) -> Self { + self.acquire_count = acquire_timeouts.len() as _; + self.p_acquire_timeouts = acquire_timeouts.as_ptr(); self } pub fn release_count(mut self, release_count: u32) -> Self { self.release_count = release_count; self } - pub fn p_release_syncs( + pub fn release_syncs( mut self, - p_release_syncs: &'a [crate::vk::DeviceMemory], + release_syncs: &'a [crate::vk::DeviceMemory], ) -> Self { - self.release_count = p_release_syncs.len() as _; - self.p_release_syncs = p_release_syncs.as_ptr(); + self.release_count = release_syncs.len() as _; + self.p_release_syncs = release_syncs.as_ptr(); self } - pub fn p_release_keys(mut self, p_release_keys: &'a [u64]) -> Self { - self.release_count = p_release_keys.len() as _; - self.p_release_keys = p_release_keys.as_ptr(); + pub fn release_keys(mut self, release_keys: &'a [u64]) -> Self { + self.release_count = release_keys.len() as _; + self.p_release_keys = release_keys.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/lunarg/direct_driver_loading.rs b/ash-rewrite/src/generated/lunarg/direct_driver_loading.rs index 55d69ffe1..963a7ae51 100644 --- a/ash-rewrite/src/generated/lunarg/direct_driver_loading.rs +++ b/ash-rewrite/src/generated/lunarg/direct_driver_loading.rs @@ -73,12 +73,12 @@ impl<'a> DirectDriverLoadingListLUNARG<'a> { self.driver_count = driver_count; self } - pub fn p_drivers( + pub fn drivers( mut self, - p_drivers: &'a [crate::vk::DirectDriverLoadingInfoLUNARG<'a>], + drivers: &'a [crate::vk::DirectDriverLoadingInfoLUNARG<'a>], ) -> Self { - self.driver_count = p_drivers.len() as _; - self.p_drivers = p_drivers.as_ptr(); + self.driver_count = drivers.len() as _; + self.p_drivers = drivers.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/mvk/ios_surface.rs b/ash-rewrite/src/generated/mvk/ios_surface.rs index dea1cc931..5a55f2613 100644 --- a/ash-rewrite/src/generated/mvk/ios_surface.rs +++ b/ash-rewrite/src/generated/mvk/ios_surface.rs @@ -65,8 +65,8 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_view(mut self, p_view: &'a core::ffi::c_void) -> Self { - self.p_view = p_view; + pub fn view(mut self, view: &'a core::ffi::c_void) -> Self { + self.p_view = view; self } } diff --git a/ash-rewrite/src/generated/mvk/macos_surface.rs b/ash-rewrite/src/generated/mvk/macos_surface.rs index b5d282130..c7a3d0121 100644 --- a/ash-rewrite/src/generated/mvk/macos_surface.rs +++ b/ash-rewrite/src/generated/mvk/macos_surface.rs @@ -65,8 +65,8 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_view(mut self, p_view: &'a core::ffi::c_void) -> Self { - self.p_view = p_view; + pub fn view(mut self, view: &'a core::ffi::c_void) -> Self { + self.p_view = view; self } } diff --git a/ash-rewrite/src/generated/nv/clip_space_w_scaling.rs b/ash-rewrite/src/generated/nv/clip_space_w_scaling.rs index 03bcafdec..fa74b9ed8 100644 --- a/ash-rewrite/src/generated/nv/clip_space_w_scaling.rs +++ b/ash-rewrite/src/generated/nv/clip_space_w_scaling.rs @@ -93,12 +93,12 @@ pub(crate) mod reexport { self.viewport_count = viewport_count; self } - pub fn p_viewport_w_scalings( + pub fn viewport_w_scalings( mut self, - p_viewport_w_scalings: &'a [crate::vk::ViewportWScalingNV], + viewport_w_scalings: &'a [crate::vk::ViewportWScalingNV], ) -> Self { - self.viewport_count = p_viewport_w_scalings.len() as _; - self.p_viewport_w_scalings = p_viewport_w_scalings.as_ptr(); + self.viewport_count = viewport_w_scalings.len() as _; + self.p_viewport_w_scalings = viewport_w_scalings.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/cooperative_vector.rs b/ash-rewrite/src/generated/nv/cooperative_vector.rs index 920a5ca6e..99bcb53ec 100644 --- a/ash-rewrite/src/generated/nv/cooperative_vector.rs +++ b/ash-rewrite/src/generated/nv/cooperative_vector.rs @@ -312,8 +312,8 @@ pub(crate) mod reexport { self.src_data = src_data; self } - pub fn p_dst_size(mut self, p_dst_size: &'a mut usize) -> Self { - self.p_dst_size = p_dst_size; + pub fn dst_size(mut self, dst_size: &'a mut usize) -> Self { + self.p_dst_size = dst_size; self } pub fn dst_data(mut self, dst_data: crate::vk::DeviceOrHostAddressKHR) -> Self { diff --git a/ash-rewrite/src/generated/nv/coverage_reduction_mode.rs b/ash-rewrite/src/generated/nv/coverage_reduction_mode.rs index a3a1a0c24..77cc45c4f 100644 --- a/ash-rewrite/src/generated/nv/coverage_reduction_mode.rs +++ b/ash-rewrite/src/generated/nv/coverage_reduction_mode.rs @@ -120,7 +120,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *mut core::ffi::c_void, pub coverage_reduction_mode: crate::vk::CoverageReductionModeNV, - pub rasterization_samples: crate::vk::SampleCountFlagBits, + pub rasterization_samples: crate::vk::SampleCountFlags, pub depth_stencil_samples: crate::vk::SampleCountFlags, pub color_samples: crate::vk::SampleCountFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, @@ -152,7 +152,7 @@ pub(crate) mod reexport { } pub fn rasterization_samples( mut self, - rasterization_samples: crate::vk::SampleCountFlagBits, + rasterization_samples: crate::vk::SampleCountFlags, ) -> Self { self.rasterization_samples = rasterization_samples; self diff --git a/ash-rewrite/src/generated/nv/cuda_kernel_launch.rs b/ash-rewrite/src/generated/nv/cuda_kernel_launch.rs index a94eeb87d..5de7ac4f9 100644 --- a/ash-rewrite/src/generated/nv/cuda_kernel_launch.rs +++ b/ash-rewrite/src/generated/nv/cuda_kernel_launch.rs @@ -146,9 +146,9 @@ pub(crate) mod reexport { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_ptr().cast(); + pub fn data(mut self, data: &'a [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_ptr().cast(); self } } @@ -180,11 +180,11 @@ pub(crate) mod reexport { self.module = module; self } - pub fn p_name(mut self, p_name: &'a core::ffi::CStr) -> Self { - self.p_name = p_name.as_ptr(); + pub fn name(mut self, name: &'a core::ffi::CStr) -> Self { + self.p_name = name.as_ptr(); self } - pub unsafe fn p_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_name.is_null() { None } else { @@ -272,18 +272,18 @@ pub(crate) mod reexport { self.param_count = param_count; self } - pub fn p_params(mut self, p_params: &'a [*const core::ffi::c_void]) -> Self { - self.param_count = p_params.len() as _; - self.p_params = p_params.as_ptr(); + pub fn params(mut self, params: &'a [*const core::ffi::c_void]) -> Self { + self.param_count = params.len() as _; + self.p_params = params.as_ptr(); self } pub fn extra_count(mut self, extra_count: usize) -> Self { self.extra_count = extra_count; self } - pub fn p_extras(mut self, p_extras: &'a [*const core::ffi::c_void]) -> Self { - self.extra_count = p_extras.len() as _; - self.p_extras = p_extras.as_ptr(); + pub fn extras(mut self, extras: &'a [*const core::ffi::c_void]) -> Self { + self.extra_count = extras.len() as _; + self.p_extras = extras.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/device_diagnostic_checkpoints.rs b/ash-rewrite/src/generated/nv/device_diagnostic_checkpoints.rs index e6d22f9b4..850192118 100644 --- a/ash-rewrite/src/generated/nv/device_diagnostic_checkpoints.rs +++ b/ash-rewrite/src/generated/nv/device_diagnostic_checkpoints.rs @@ -105,7 +105,7 @@ pub(crate) mod reexport { pub struct CheckpointDataNV<'a> { pub s_type: crate::vk::StructureType, pub p_next: *mut core::ffi::c_void, - pub stage: crate::vk::PipelineStageFlagBits, + pub stage: crate::vk::PipelineStageFlags, pub p_checkpoint_marker: *mut core::ffi::c_void, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -124,15 +124,15 @@ pub(crate) mod reexport { } } impl<'a> CheckpointDataNV<'a> { - pub fn stage(mut self, stage: crate::vk::PipelineStageFlagBits) -> Self { + pub fn stage(mut self, stage: crate::vk::PipelineStageFlags) -> Self { self.stage = stage; self } - pub fn p_checkpoint_marker( + pub fn checkpoint_marker( mut self, - p_checkpoint_marker: &'a mut core::ffi::c_void, + checkpoint_marker: &'a mut core::ffi::c_void, ) -> Self { - self.p_checkpoint_marker = p_checkpoint_marker; + self.p_checkpoint_marker = checkpoint_marker; self } } @@ -197,11 +197,11 @@ pub(crate) mod reexport { self.stage = stage; self } - pub fn p_checkpoint_marker( + pub fn checkpoint_marker( mut self, - p_checkpoint_marker: &'a mut core::ffi::c_void, + checkpoint_marker: &'a mut core::ffi::c_void, ) -> Self { - self.p_checkpoint_marker = p_checkpoint_marker; + self.p_checkpoint_marker = checkpoint_marker; self } } diff --git a/ash-rewrite/src/generated/nv/device_generated_commands.rs b/ash-rewrite/src/generated/nv/device_generated_commands.rs index 32231a859..7c220b7f3 100644 --- a/ash-rewrite/src/generated/nv/device_generated_commands.rs +++ b/ash-rewrite/src/generated/nv/device_generated_commands.rs @@ -293,26 +293,26 @@ pub(crate) mod reexport { self.stage_count = stage_count; self } - pub fn p_stages( + pub fn stages( mut self, - p_stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], + stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], ) -> Self { - self.stage_count = p_stages.len() as _; - self.p_stages = p_stages.as_ptr(); + self.stage_count = stages.len() as _; + self.p_stages = stages.as_ptr(); self } - pub fn p_vertex_input_state( + pub fn vertex_input_state( mut self, - p_vertex_input_state: &'a crate::vk::PipelineVertexInputStateCreateInfo<'a>, + vertex_input_state: &'a crate::vk::PipelineVertexInputStateCreateInfo<'a>, ) -> Self { - self.p_vertex_input_state = p_vertex_input_state; + self.p_vertex_input_state = vertex_input_state; self } - pub fn p_tessellation_state( + pub fn tessellation_state( mut self, - p_tessellation_state: &'a crate::vk::PipelineTessellationStateCreateInfo<'a>, + tessellation_state: &'a crate::vk::PipelineTessellationStateCreateInfo<'a>, ) -> Self { - self.p_tessellation_state = p_tessellation_state; + self.p_tessellation_state = tessellation_state; self } } @@ -351,21 +351,21 @@ pub(crate) mod reexport { self.group_count = group_count; self } - pub fn p_groups( + pub fn groups( mut self, - p_groups: &'a [crate::vk::GraphicsShaderGroupCreateInfoNV<'a>], + groups: &'a [crate::vk::GraphicsShaderGroupCreateInfoNV<'a>], ) -> Self { - self.group_count = p_groups.len() as _; - self.p_groups = p_groups.as_ptr(); + self.group_count = groups.len() as _; + self.p_groups = groups.as_ptr(); self } pub fn pipeline_count(mut self, pipeline_count: u32) -> Self { self.pipeline_count = pipeline_count; self } - pub fn p_pipelines(mut self, p_pipelines: &'a [crate::vk::Pipeline]) -> Self { - self.pipeline_count = p_pipelines.len() as _; - self.p_pipelines = p_pipelines.as_ptr(); + pub fn pipelines(mut self, pipelines: &'a [crate::vk::Pipeline]) -> Self { + self.pipeline_count = pipelines.len() as _; + self.p_pipelines = pipelines.as_ptr(); self } } @@ -557,17 +557,14 @@ pub(crate) mod reexport { self.index_type_count = index_type_count; self } - pub fn p_index_types( - mut self, - p_index_types: &'a [crate::vk::IndexType], - ) -> Self { - self.index_type_count = p_index_types.len() as _; - self.p_index_types = p_index_types.as_ptr(); + pub fn index_types(mut self, index_types: &'a [crate::vk::IndexType]) -> Self { + self.index_type_count = index_types.len() as _; + self.p_index_types = index_types.as_ptr(); self } - pub fn p_index_type_values(mut self, p_index_type_values: &'a [u32]) -> Self { - self.index_type_count = p_index_type_values.len() as _; - self.p_index_type_values = p_index_type_values.as_ptr(); + pub fn index_type_values(mut self, index_type_values: &'a [u32]) -> Self { + self.index_type_count = index_type_values.len() as _; + self.p_index_type_values = index_type_values.as_ptr(); self } } @@ -622,21 +619,21 @@ pub(crate) mod reexport { self.token_count = token_count; self } - pub fn p_tokens( + pub fn tokens( mut self, - p_tokens: &'a [crate::vk::IndirectCommandsLayoutTokenNV<'a>], + tokens: &'a [crate::vk::IndirectCommandsLayoutTokenNV<'a>], ) -> Self { - self.token_count = p_tokens.len() as _; - self.p_tokens = p_tokens.as_ptr(); + self.token_count = tokens.len() as _; + self.p_tokens = tokens.as_ptr(); self } pub fn stream_count(mut self, stream_count: u32) -> Self { self.stream_count = stream_count; self } - pub fn p_stream_strides(mut self, p_stream_strides: &'a [u32]) -> Self { - self.stream_count = p_stream_strides.len() as _; - self.p_stream_strides = p_stream_strides.as_ptr(); + pub fn stream_strides(mut self, stream_strides: &'a [u32]) -> Self { + self.stream_count = stream_strides.len() as _; + self.p_stream_strides = stream_strides.as_ptr(); self } } @@ -708,12 +705,12 @@ pub(crate) mod reexport { self.stream_count = stream_count; self } - pub fn p_streams( + pub fn streams( mut self, - p_streams: &'a [crate::vk::IndirectCommandsStreamNV], + streams: &'a [crate::vk::IndirectCommandsStreamNV], ) -> Self { - self.stream_count = p_streams.len() as _; - self.p_streams = p_streams.as_ptr(); + self.stream_count = streams.len() as _; + self.p_streams = streams.as_ptr(); self } pub fn sequences_count(mut self, sequences_count: u32) -> Self { diff --git a/ash-rewrite/src/generated/nv/displacement_micromap.rs b/ash-rewrite/src/generated/nv/displacement_micromap.rs index d947dfc50..8aeb3a55a 100644 --- a/ash-rewrite/src/generated/nv/displacement_micromap.rs +++ b/ash-rewrite/src/generated/nv/displacement_micromap.rs @@ -202,20 +202,20 @@ impl<'a> AccelerationStructureTrianglesDisplacementMicromapNV<'a> { self.usage_counts_count = usage_counts_count; self } - pub fn p_usage_counts( + pub fn usage_counts( mut self, - p_usage_counts: &'a [crate::vk::MicromapUsageEXT], + usage_counts: &'a [crate::vk::MicromapUsageEXT], ) -> Self { - self.usage_counts_count = p_usage_counts.len() as _; - self.p_usage_counts = p_usage_counts.as_ptr(); + self.usage_counts_count = usage_counts.len() as _; + self.p_usage_counts = usage_counts.as_ptr(); self } - pub fn pp_usage_counts( + pub fn usage_counts_ptrs( mut self, - pp_usage_counts: &'a [&'a crate::vk::MicromapUsageEXT], + usage_counts_ptrs: &'a [&'a crate::vk::MicromapUsageEXT], ) -> Self { - self.usage_counts_count = pp_usage_counts.len() as _; - self.pp_usage_counts = pp_usage_counts.as_ptr().cast(); + self.usage_counts_count = usage_counts_ptrs.len() as _; + self.pp_usage_counts = usage_counts_ptrs.as_ptr().cast(); self } pub fn micromap(mut self, micromap: crate::vk::MicromapEXT) -> Self { diff --git a/ash-rewrite/src/generated/nv/external_memory_rdma.rs b/ash-rewrite/src/generated/nv/external_memory_rdma.rs index 8600fa4d0..d18df5641 100644 --- a/ash-rewrite/src/generated/nv/external_memory_rdma.rs +++ b/ash-rewrite/src/generated/nv/external_memory_rdma.rs @@ -74,7 +74,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub memory: crate::vk::DeviceMemory, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for MemoryGetRemoteAddressInfoNV<'a> { @@ -98,7 +98,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self diff --git a/ash-rewrite/src/generated/nv/external_memory_win32.rs b/ash-rewrite/src/generated/nv/external_memory_win32.rs index 5ceda9be7..9c22f7aac 100644 --- a/ash-rewrite/src/generated/nv/external_memory_win32.rs +++ b/ash-rewrite/src/generated/nv/external_memory_win32.rs @@ -101,11 +101,11 @@ pub(crate) mod reexport { } } impl<'a> ExportMemoryWin32HandleInfoNV<'a> { - pub fn p_attributes( + pub fn attributes( mut self, - p_attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, + attributes: &'a crate::platform_types::SECURITY_ATTRIBUTES, ) -> Self { - self.p_attributes = p_attributes; + self.p_attributes = attributes; self } pub fn dw_access(mut self, dw_access: crate::platform_types::DWORD) -> Self { diff --git a/ash-rewrite/src/generated/nv/fragment_shading_rate_enums.rs b/ash-rewrite/src/generated/nv/fragment_shading_rate_enums.rs index 7baea28a8..b360ebf77 100644 --- a/ash-rewrite/src/generated/nv/fragment_shading_rate_enums.rs +++ b/ash-rewrite/src/generated/nv/fragment_shading_rate_enums.rs @@ -96,7 +96,7 @@ pub(crate) mod reexport { pub struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV<'a> { pub s_type: crate::vk::StructureType, pub p_next: *mut core::ffi::c_void, - pub max_fragment_shading_rate_invocation_count: crate::vk::SampleCountFlagBits, + pub max_fragment_shading_rate_invocation_count: crate::vk::SampleCountFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -118,7 +118,7 @@ pub(crate) mod reexport { impl<'a> PhysicalDeviceFragmentShadingRateEnumsPropertiesNV<'a> { pub fn max_fragment_shading_rate_invocation_count( mut self, - max_fragment_shading_rate_invocation_count: crate::vk::SampleCountFlagBits, + max_fragment_shading_rate_invocation_count: crate::vk::SampleCountFlags, ) -> Self { self.max_fragment_shading_rate_invocation_count = max_fragment_shading_rate_invocation_count; self diff --git a/ash-rewrite/src/generated/nv/framebuffer_mixed_samples.rs b/ash-rewrite/src/generated/nv/framebuffer_mixed_samples.rs index 7eed9cbaa..33c6402f3 100644 --- a/ash-rewrite/src/generated/nv/framebuffer_mixed_samples.rs +++ b/ash-rewrite/src/generated/nv/framebuffer_mixed_samples.rs @@ -62,12 +62,12 @@ impl<'a> PipelineCoverageModulationStateCreateInfoNV<'a> { self.coverage_modulation_table_count = coverage_modulation_table_count; self } - pub fn p_coverage_modulation_table( + pub fn coverage_modulation_table( mut self, - p_coverage_modulation_table: &'a [core::ffi::c_float], + coverage_modulation_table: &'a [core::ffi::c_float], ) -> Self { - self.coverage_modulation_table_count = p_coverage_modulation_table.len() as _; - self.p_coverage_modulation_table = p_coverage_modulation_table.as_ptr(); + self.coverage_modulation_table_count = coverage_modulation_table.len() as _; + self.p_coverage_modulation_table = coverage_modulation_table.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/inherited_viewport_scissor.rs b/ash-rewrite/src/generated/nv/inherited_viewport_scissor.rs index 069a473d8..18a70c3d7 100644 --- a/ash-rewrite/src/generated/nv/inherited_viewport_scissor.rs +++ b/ash-rewrite/src/generated/nv/inherited_viewport_scissor.rs @@ -73,11 +73,8 @@ impl<'a> CommandBufferInheritanceViewportScissorInfoNV<'a> { self.viewport_depth_count = viewport_depth_count; self } - pub fn p_viewport_depths( - mut self, - p_viewport_depths: &'a crate::vk::Viewport, - ) -> Self { - self.p_viewport_depths = p_viewport_depths; + pub fn viewport_depths(mut self, viewport_depths: &'a crate::vk::Viewport) -> Self { + self.p_viewport_depths = viewport_depths; self } } diff --git a/ash-rewrite/src/generated/nv/low_latency.rs b/ash-rewrite/src/generated/nv/low_latency.rs index 9cc46ebb3..d82fb7c5b 100644 --- a/ash-rewrite/src/generated/nv/low_latency.rs +++ b/ash-rewrite/src/generated/nv/low_latency.rs @@ -25,11 +25,11 @@ impl<'a> Default for QueryLowLatencySupportNV<'a> { } } impl<'a> QueryLowLatencySupportNV<'a> { - pub fn p_queried_low_latency_data( + pub fn queried_low_latency_data( mut self, - p_queried_low_latency_data: &'a mut core::ffi::c_void, + queried_low_latency_data: &'a mut core::ffi::c_void, ) -> Self { - self.p_queried_low_latency_data = p_queried_low_latency_data; + self.p_queried_low_latency_data = queried_low_latency_data; self } } diff --git a/ash-rewrite/src/generated/nv/low_latency2.rs b/ash-rewrite/src/generated/nv/low_latency2.rs index d6511ca72..d9dd40c3c 100644 --- a/ash-rewrite/src/generated/nv/low_latency2.rs +++ b/ash-rewrite/src/generated/nv/low_latency2.rs @@ -235,12 +235,12 @@ pub(crate) mod reexport { self.timing_count = timing_count; self } - pub fn p_timings( + pub fn timings( mut self, - p_timings: &'a mut [crate::vk::LatencyTimingsFrameReportNV<'a>], + timings: &'a mut [crate::vk::LatencyTimingsFrameReportNV<'a>], ) -> Self { - self.timing_count = p_timings.len() as _; - self.p_timings = p_timings.as_mut_ptr(); + self.timing_count = timings.len() as _; + self.p_timings = timings.as_mut_ptr(); self } } @@ -484,12 +484,12 @@ pub(crate) mod reexport { self.present_mode_count = present_mode_count; self } - pub fn p_present_modes( + pub fn present_modes( mut self, - p_present_modes: &'a mut [crate::vk::PresentModeKHR], + present_modes: &'a mut [crate::vk::PresentModeKHR], ) -> Self { - self.present_mode_count = p_present_modes.len() as _; - self.p_present_modes = p_present_modes.as_mut_ptr(); + self.present_mode_count = present_modes.len() as _; + self.p_present_modes = present_modes.as_mut_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/optical_flow.rs b/ash-rewrite/src/generated/nv/optical_flow.rs index 3e3203ed1..213ff8fa8 100644 --- a/ash-rewrite/src/generated/nv/optical_flow.rs +++ b/ash-rewrite/src/generated/nv/optical_flow.rs @@ -442,8 +442,8 @@ pub(crate) mod reexport { self.size = size; self } - pub fn p_private_data(mut self, p_private_data: &'a core::ffi::c_void) -> Self { - self.p_private_data = p_private_data; + pub fn private_data(mut self, private_data: &'a core::ffi::c_void) -> Self { + self.p_private_data = private_data; self } } @@ -481,9 +481,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions(mut self, p_regions: &'a [crate::vk::Rect2D]) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::Rect2D]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/partitioned_acceleration_structure.rs b/ash-rewrite/src/generated/nv/partitioned_acceleration_structure.rs index 413eebeba..89b05cec7 100644 --- a/ash-rewrite/src/generated/nv/partitioned_acceleration_structure.rs +++ b/ash-rewrite/src/generated/nv/partitioned_acceleration_structure.rs @@ -348,12 +348,12 @@ pub(crate) mod reexport { self.acceleration_structure_count = acceleration_structure_count; self } - pub fn p_acceleration_structures( + pub fn acceleration_structures( mut self, - p_acceleration_structures: &'a [crate::vk::DeviceAddress], + acceleration_structures: &'a [crate::vk::DeviceAddress], ) -> Self { - self.acceleration_structure_count = p_acceleration_structures.len() as _; - self.p_acceleration_structures = p_acceleration_structures.as_ptr(); + self.acceleration_structure_count = acceleration_structures.len() as _; + self.p_acceleration_structures = acceleration_structures.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/ray_tracing.rs b/ash-rewrite/src/generated/nv/ray_tracing.rs index a90d1dc4b..bfcad8b44 100644 --- a/ash-rewrite/src/generated/nv/ray_tracing.rs +++ b/ash-rewrite/src/generated/nv/ray_tracing.rs @@ -344,24 +344,24 @@ pub(crate) mod reexport { self.stage_count = stage_count; self } - pub fn p_stages( + pub fn stages( mut self, - p_stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], + stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], ) -> Self { - self.stage_count = p_stages.len() as _; - self.p_stages = p_stages.as_ptr(); + self.stage_count = stages.len() as _; + self.p_stages = stages.as_ptr(); self } pub fn group_count(mut self, group_count: u32) -> Self { self.group_count = group_count; self } - pub fn p_groups( + pub fn groups( mut self, - p_groups: &'a [crate::vk::RayTracingShaderGroupCreateInfoNV<'a>], + groups: &'a [crate::vk::RayTracingShaderGroupCreateInfoNV<'a>], ) -> Self { - self.group_count = p_groups.len() as _; - self.p_groups = p_groups.as_ptr(); + self.group_count = groups.len() as _; + self.p_groups = groups.as_ptr(); self } pub fn max_recursion_depth(mut self, max_recursion_depth: u32) -> Self { @@ -630,12 +630,12 @@ pub(crate) mod reexport { self.geometry_count = geometry_count; self } - pub fn p_geometries( + pub fn geometries( mut self, - p_geometries: &'a [crate::vk::GeometryNV<'a>], + geometries: &'a [crate::vk::GeometryNV<'a>], ) -> Self { - self.geometry_count = p_geometries.len() as _; - self.p_geometries = p_geometries.as_ptr(); + self.geometry_count = geometries.len() as _; + self.p_geometries = geometries.as_ptr(); self } } @@ -723,9 +723,9 @@ pub(crate) mod reexport { self.device_index_count = device_index_count; self } - pub fn p_device_indices(mut self, p_device_indices: &'a [u32]) -> Self { - self.device_index_count = p_device_indices.len() as _; - self.p_device_indices = p_device_indices.as_ptr(); + pub fn device_indices(mut self, device_indices: &'a [u32]) -> Self { + self.device_index_count = device_indices.len() as _; + self.p_device_indices = device_indices.as_ptr(); self } } @@ -763,12 +763,12 @@ pub(crate) mod reexport { self.acceleration_structure_count = acceleration_structure_count; self } - pub fn p_acceleration_structures( + pub fn acceleration_structures( mut self, - p_acceleration_structures: &'a [crate::vk::AccelerationStructureNV], + acceleration_structures: &'a [crate::vk::AccelerationStructureNV], ) -> Self { - self.acceleration_structure_count = p_acceleration_structures.len() as _; - self.p_acceleration_structures = p_acceleration_structures.as_ptr(); + self.acceleration_structure_count = acceleration_structures.len() as _; + self.p_acceleration_structures = acceleration_structures.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/scissor_exclusive.rs b/ash-rewrite/src/generated/nv/scissor_exclusive.rs index 7533cee6b..36d09589e 100644 --- a/ash-rewrite/src/generated/nv/scissor_exclusive.rs +++ b/ash-rewrite/src/generated/nv/scissor_exclusive.rs @@ -117,12 +117,12 @@ pub(crate) mod reexport { self.exclusive_scissor_count = exclusive_scissor_count; self } - pub fn p_exclusive_scissors( + pub fn exclusive_scissors( mut self, - p_exclusive_scissors: &'a [crate::vk::Rect2D], + exclusive_scissors: &'a [crate::vk::Rect2D], ) -> Self { - self.exclusive_scissor_count = p_exclusive_scissors.len() as _; - self.p_exclusive_scissors = p_exclusive_scissors.as_ptr(); + self.exclusive_scissor_count = exclusive_scissors.len() as _; + self.p_exclusive_scissors = exclusive_scissors.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/shading_rate_image.rs b/ash-rewrite/src/generated/nv/shading_rate_image.rs index f26aa4fbc..bed435130 100644 --- a/ash-rewrite/src/generated/nv/shading_rate_image.rs +++ b/ash-rewrite/src/generated/nv/shading_rate_image.rs @@ -85,14 +85,13 @@ pub(crate) mod reexport { self.shading_rate_palette_entry_count = shading_rate_palette_entry_count; self } - pub fn p_shading_rate_palette_entries( + pub fn shading_rate_palette_entries( mut self, - p_shading_rate_palette_entries: &'a [crate::vk::ShadingRatePaletteEntryNV], + shading_rate_palette_entries: &'a [crate::vk::ShadingRatePaletteEntryNV], ) -> Self { - self.shading_rate_palette_entry_count = p_shading_rate_palette_entries.len() + self.shading_rate_palette_entry_count = shading_rate_palette_entries.len() as _; - self.p_shading_rate_palette_entries = p_shading_rate_palette_entries - .as_ptr(); + self.p_shading_rate_palette_entries = shading_rate_palette_entries.as_ptr(); self } } @@ -136,12 +135,12 @@ pub(crate) mod reexport { self.viewport_count = viewport_count; self } - pub fn p_shading_rate_palettes( + pub fn shading_rate_palettes( mut self, - p_shading_rate_palettes: &'a [crate::vk::ShadingRatePaletteNV<'a>], + shading_rate_palettes: &'a [crate::vk::ShadingRatePaletteNV<'a>], ) -> Self { - self.viewport_count = p_shading_rate_palettes.len() as _; - self.p_shading_rate_palettes = p_shading_rate_palettes.as_ptr(); + self.viewport_count = shading_rate_palettes.len() as _; + self.p_shading_rate_palettes = shading_rate_palettes.as_ptr(); self } } @@ -284,12 +283,12 @@ pub(crate) mod reexport { self.sample_location_count = sample_location_count; self } - pub fn p_sample_locations( + pub fn sample_locations( mut self, - p_sample_locations: &'a [crate::vk::CoarseSampleLocationNV], + sample_locations: &'a [crate::vk::CoarseSampleLocationNV], ) -> Self { - self.sample_location_count = p_sample_locations.len() as _; - self.p_sample_locations = p_sample_locations.as_ptr(); + self.sample_location_count = sample_locations.len() as _; + self.p_sample_locations = sample_locations.as_ptr(); self } } @@ -336,12 +335,12 @@ pub(crate) mod reexport { self.custom_sample_order_count = custom_sample_order_count; self } - pub fn p_custom_sample_orders( + pub fn custom_sample_orders( mut self, - p_custom_sample_orders: &'a [crate::vk::CoarseSampleOrderCustomNV<'a>], + custom_sample_orders: &'a [crate::vk::CoarseSampleOrderCustomNV<'a>], ) -> Self { - self.custom_sample_order_count = p_custom_sample_orders.len() as _; - self.p_custom_sample_orders = p_custom_sample_orders.as_ptr(); + self.custom_sample_order_count = custom_sample_orders.len() as _; + self.p_custom_sample_orders = custom_sample_orders.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/viewport_swizzle.rs b/ash-rewrite/src/generated/nv/viewport_swizzle.rs index 42284c4f1..7f34016b1 100644 --- a/ash-rewrite/src/generated/nv/viewport_swizzle.rs +++ b/ash-rewrite/src/generated/nv/viewport_swizzle.rs @@ -67,12 +67,12 @@ impl<'a> PipelineViewportSwizzleStateCreateInfoNV<'a> { self.viewport_count = viewport_count; self } - pub fn p_viewport_swizzles( + pub fn viewport_swizzles( mut self, - p_viewport_swizzles: &'a [crate::vk::ViewportSwizzleNV], + viewport_swizzles: &'a [crate::vk::ViewportSwizzleNV], ) -> Self { - self.viewport_count = p_viewport_swizzles.len() as _; - self.p_viewport_swizzles = p_viewport_swizzles.as_ptr(); + self.viewport_count = viewport_swizzles.len() as _; + self.p_viewport_swizzles = viewport_swizzles.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nv/win32_keyed_mutex.rs b/ash-rewrite/src/generated/nv/win32_keyed_mutex.rs index 45c06a48e..5dd94b8f9 100644 --- a/ash-rewrite/src/generated/nv/win32_keyed_mutex.rs +++ b/ash-rewrite/src/generated/nv/win32_keyed_mutex.rs @@ -43,42 +43,42 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoNV<'a> { self.acquire_count = acquire_count; self } - pub fn p_acquire_syncs( + pub fn acquire_syncs( mut self, - p_acquire_syncs: &'a [crate::vk::DeviceMemory], + acquire_syncs: &'a [crate::vk::DeviceMemory], ) -> Self { - self.acquire_count = p_acquire_syncs.len() as _; - self.p_acquire_syncs = p_acquire_syncs.as_ptr(); + self.acquire_count = acquire_syncs.len() as _; + self.p_acquire_syncs = acquire_syncs.as_ptr(); self } - pub fn p_acquire_keys(mut self, p_acquire_keys: &'a [u64]) -> Self { - self.acquire_count = p_acquire_keys.len() as _; - self.p_acquire_keys = p_acquire_keys.as_ptr(); + pub fn acquire_keys(mut self, acquire_keys: &'a [u64]) -> Self { + self.acquire_count = acquire_keys.len() as _; + self.p_acquire_keys = acquire_keys.as_ptr(); self } - pub fn p_acquire_timeout_milliseconds( + pub fn acquire_timeout_milliseconds( mut self, - p_acquire_timeout_milliseconds: &'a [u32], + acquire_timeout_milliseconds: &'a [u32], ) -> Self { - self.acquire_count = p_acquire_timeout_milliseconds.len() as _; - self.p_acquire_timeout_milliseconds = p_acquire_timeout_milliseconds.as_ptr(); + self.acquire_count = acquire_timeout_milliseconds.len() as _; + self.p_acquire_timeout_milliseconds = acquire_timeout_milliseconds.as_ptr(); self } pub fn release_count(mut self, release_count: u32) -> Self { self.release_count = release_count; self } - pub fn p_release_syncs( + pub fn release_syncs( mut self, - p_release_syncs: &'a [crate::vk::DeviceMemory], + release_syncs: &'a [crate::vk::DeviceMemory], ) -> Self { - self.release_count = p_release_syncs.len() as _; - self.p_release_syncs = p_release_syncs.as_ptr(); + self.release_count = release_syncs.len() as _; + self.p_release_syncs = release_syncs.as_ptr(); self } - pub fn p_release_keys(mut self, p_release_keys: &'a [u64]) -> Self { - self.release_count = p_release_keys.len() as _; - self.p_release_keys = p_release_keys.as_ptr(); + pub fn release_keys(mut self, release_keys: &'a [u64]) -> Self { + self.release_count = release_keys.len() as _; + self.p_release_keys = release_keys.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/nvx/binary_import.rs b/ash-rewrite/src/generated/nvx/binary_import.rs index faa57f152..61eccf1bc 100644 --- a/ash-rewrite/src/generated/nvx/binary_import.rs +++ b/ash-rewrite/src/generated/nvx/binary_import.rs @@ -129,9 +129,9 @@ pub(crate) mod reexport { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_ptr().cast(); + pub fn data(mut self, data: &'a [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_ptr().cast(); self } } @@ -193,11 +193,11 @@ pub(crate) mod reexport { self.module = module; self } - pub fn p_name(mut self, p_name: &'a core::ffi::CStr) -> Self { - self.p_name = p_name.as_ptr(); + pub fn name(mut self, name: &'a core::ffi::CStr) -> Self { + self.p_name = name.as_ptr(); self } - pub unsafe fn p_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_name.is_null() { None } else { @@ -285,18 +285,18 @@ pub(crate) mod reexport { self.param_count = param_count; self } - pub fn p_params(mut self, p_params: &'a [*const core::ffi::c_void]) -> Self { - self.param_count = p_params.len() as _; - self.p_params = p_params.as_ptr(); + pub fn params(mut self, params: &'a [*const core::ffi::c_void]) -> Self { + self.param_count = params.len() as _; + self.p_params = params.as_ptr(); self } pub fn extra_count(mut self, extra_count: usize) -> Self { self.extra_count = extra_count; self } - pub fn p_extras(mut self, p_extras: &'a [*const core::ffi::c_void]) -> Self { - self.extra_count = p_extras.len() as _; - self.p_extras = p_extras.as_ptr(); + pub fn extras(mut self, extras: &'a [*const core::ffi::c_void]) -> Self { + self.extra_count = extras.len() as _; + self.p_extras = extras.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/qcom/data_graph_model.rs b/ash-rewrite/src/generated/qcom/data_graph_model.rs index 29576a3cc..66aba988e 100644 --- a/ash-rewrite/src/generated/qcom/data_graph_model.rs +++ b/ash-rewrite/src/generated/qcom/data_graph_model.rs @@ -79,11 +79,11 @@ impl<'a> Default for DataGraphPipelineBuiltinModelCreateInfoQCOM<'a> { } } impl<'a> DataGraphPipelineBuiltinModelCreateInfoQCOM<'a> { - pub fn p_operation( + pub fn operation( mut self, - p_operation: &'a crate::vk::PhysicalDeviceDataGraphOperationSupportARM, + operation: &'a crate::vk::PhysicalDeviceDataGraphOperationSupportARM, ) -> Self { - self.p_operation = p_operation; + self.p_operation = operation; self } } diff --git a/ash-rewrite/src/generated/qcom/multiview_per_view_render_areas.rs b/ash-rewrite/src/generated/qcom/multiview_per_view_render_areas.rs index 4b40db48a..d2482d6a4 100644 --- a/ash-rewrite/src/generated/qcom/multiview_per_view_render_areas.rs +++ b/ash-rewrite/src/generated/qcom/multiview_per_view_render_areas.rs @@ -72,12 +72,12 @@ impl<'a> MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM<'a> { self.per_view_render_area_count = per_view_render_area_count; self } - pub fn p_per_view_render_areas( + pub fn per_view_render_areas( mut self, - p_per_view_render_areas: &'a [crate::vk::Rect2D], + per_view_render_areas: &'a [crate::vk::Rect2D], ) -> Self { - self.per_view_render_area_count = p_per_view_render_areas.len() as _; - self.p_per_view_render_areas = p_per_view_render_areas.as_ptr(); + self.per_view_render_area_count = per_view_render_areas.len() as _; + self.p_per_view_render_areas = per_view_render_areas.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/qcom/render_pass_transform.rs b/ash-rewrite/src/generated/qcom/render_pass_transform.rs index 71be3eb35..1c17f567b 100644 --- a/ash-rewrite/src/generated/qcom/render_pass_transform.rs +++ b/ash-rewrite/src/generated/qcom/render_pass_transform.rs @@ -6,7 +6,7 @@ pub struct RenderPassTransformBeginInfoQCOM<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub transform: crate::vk::SurfaceTransformFlagBitsKHR, + pub transform: crate::vk::SurfaceTransformFlagsKHR, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for RenderPassTransformBeginInfoQCOM<'a> { @@ -25,10 +25,7 @@ impl<'a> Default for RenderPassTransformBeginInfoQCOM<'a> { } } impl<'a> RenderPassTransformBeginInfoQCOM<'a> { - pub fn transform( - mut self, - transform: crate::vk::SurfaceTransformFlagBitsKHR, - ) -> Self { + pub fn transform(mut self, transform: crate::vk::SurfaceTransformFlagsKHR) -> Self { self.transform = transform; self } @@ -38,7 +35,7 @@ impl<'a> RenderPassTransformBeginInfoQCOM<'a> { pub struct CommandBufferInheritanceRenderPassTransformInfoQCOM<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub transform: crate::vk::SurfaceTransformFlagBitsKHR, + pub transform: crate::vk::SurfaceTransformFlagsKHR, pub render_area: crate::vk::Rect2D, pub _marker: ::core::marker::PhantomData<&'a ()>, } @@ -60,10 +57,7 @@ impl<'a> Default for CommandBufferInheritanceRenderPassTransformInfoQCOM<'a> { } } impl<'a> CommandBufferInheritanceRenderPassTransformInfoQCOM<'a> { - pub fn transform( - mut self, - transform: crate::vk::SurfaceTransformFlagBitsKHR, - ) -> Self { + pub fn transform(mut self, transform: crate::vk::SurfaceTransformFlagsKHR) -> Self { self.transform = transform; self } diff --git a/ash-rewrite/src/generated/qcom/rotated_copy_commands.rs b/ash-rewrite/src/generated/qcom/rotated_copy_commands.rs index d5b9d16ad..60b571643 100644 --- a/ash-rewrite/src/generated/qcom/rotated_copy_commands.rs +++ b/ash-rewrite/src/generated/qcom/rotated_copy_commands.rs @@ -6,7 +6,7 @@ pub struct CopyCommandTransformInfoQCOM<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub transform: crate::vk::SurfaceTransformFlagBitsKHR, + pub transform: crate::vk::SurfaceTransformFlagsKHR, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for CopyCommandTransformInfoQCOM<'a> { @@ -29,10 +29,7 @@ impl<'a> Default for CopyCommandTransformInfoQCOM<'a> { } } impl<'a> CopyCommandTransformInfoQCOM<'a> { - pub fn transform( - mut self, - transform: crate::vk::SurfaceTransformFlagBitsKHR, - ) -> Self { + pub fn transform(mut self, transform: crate::vk::SurfaceTransformFlagsKHR) -> Self { self.transform = transform; self } diff --git a/ash-rewrite/src/generated/valve/video_encode_rgb_conversion.rs b/ash-rewrite/src/generated/valve/video_encode_rgb_conversion.rs index 62622bf92..513923b09 100644 --- a/ash-rewrite/src/generated/valve/video_encode_rgb_conversion.rs +++ b/ash-rewrite/src/generated/valve/video_encode_rgb_conversion.rs @@ -134,10 +134,10 @@ impl<'a> VideoEncodeProfileRgbConversionInfoVALVE<'a> { pub struct VideoEncodeSessionRgbConversionCreateInfoVALVE<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub rgb_model: crate::vk::VideoEncodeRgbModelConversionFlagBitsVALVE, - pub rgb_range: crate::vk::VideoEncodeRgbRangeCompressionFlagBitsVALVE, - pub x_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagBitsVALVE, - pub y_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagBitsVALVE, + pub rgb_model: crate::vk::VideoEncodeRgbModelConversionFlagsVALVE, + pub rgb_range: crate::vk::VideoEncodeRgbRangeCompressionFlagsVALVE, + pub x_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagsVALVE, + pub y_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagsVALVE, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -162,28 +162,28 @@ impl<'a> Default for VideoEncodeSessionRgbConversionCreateInfoVALVE<'a> { impl<'a> VideoEncodeSessionRgbConversionCreateInfoVALVE<'a> { pub fn rgb_model( mut self, - rgb_model: crate::vk::VideoEncodeRgbModelConversionFlagBitsVALVE, + rgb_model: crate::vk::VideoEncodeRgbModelConversionFlagsVALVE, ) -> Self { self.rgb_model = rgb_model; self } pub fn rgb_range( mut self, - rgb_range: crate::vk::VideoEncodeRgbRangeCompressionFlagBitsVALVE, + rgb_range: crate::vk::VideoEncodeRgbRangeCompressionFlagsVALVE, ) -> Self { self.rgb_range = rgb_range; self } pub fn x_chroma_offset( mut self, - x_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagBitsVALVE, + x_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagsVALVE, ) -> Self { self.x_chroma_offset = x_chroma_offset; self } pub fn y_chroma_offset( mut self, - y_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagBitsVALVE, + y_chroma_offset: crate::vk::VideoEncodeRgbChromaOffsetFlagsVALVE, ) -> Self { self.y_chroma_offset = y_chroma_offset; self diff --git a/ash-rewrite/src/generated/video/codec_av1std.rs b/ash-rewrite/src/generated/video/codec_av1std.rs index 5bc6c417f..bc0f95a21 100644 --- a/ash-rewrite/src/generated/video/codec_av1std.rs +++ b/ash-rewrite/src/generated/video/codec_av1std.rs @@ -372,15 +372,12 @@ impl<'a> AV1SequenceHeader<'a> { self.reserved1 = reserved1; self } - pub fn p_color_config( - mut self, - p_color_config: &'a crate::vk::AV1ColorConfig, - ) -> Self { - self.p_color_config = p_color_config; + pub fn color_config(mut self, color_config: &'a crate::vk::AV1ColorConfig) -> Self { + self.p_color_config = color_config; self } - pub fn p_timing_info(mut self, p_timing_info: &'a crate::vk::AV1TimingInfo) -> Self { - self.p_timing_info = p_timing_info; + pub fn timing_info(mut self, timing_info: &'a crate::vk::AV1TimingInfo) -> Self { + self.p_timing_info = timing_info; self } } @@ -645,24 +642,24 @@ impl<'a> AV1TileInfo<'a> { self.reserved1 = reserved1; self } - pub fn p_mi_col_starts(mut self, p_mi_col_starts: &'a [u16]) -> Self { - self.tile_cols = p_mi_col_starts.len() as _; - self.p_mi_col_starts = p_mi_col_starts.as_ptr(); + pub fn mi_col_starts(mut self, mi_col_starts: &'a [u16]) -> Self { + self.tile_cols = mi_col_starts.len() as _; + self.p_mi_col_starts = mi_col_starts.as_ptr(); self } - pub fn p_mi_row_starts(mut self, p_mi_row_starts: &'a [u16]) -> Self { - self.tile_rows = p_mi_row_starts.len() as _; - self.p_mi_row_starts = p_mi_row_starts.as_ptr(); + pub fn mi_row_starts(mut self, mi_row_starts: &'a [u16]) -> Self { + self.tile_rows = mi_row_starts.len() as _; + self.p_mi_row_starts = mi_row_starts.as_ptr(); self } - pub fn p_width_in_sbs_minus1(mut self, p_width_in_sbs_minus1: &'a [u16]) -> Self { - self.tile_cols = p_width_in_sbs_minus1.len() as _; - self.p_width_in_sbs_minus1 = p_width_in_sbs_minus1.as_ptr(); + pub fn width_in_sbs_minus1(mut self, width_in_sbs_minus1: &'a [u16]) -> Self { + self.tile_cols = width_in_sbs_minus1.len() as _; + self.p_width_in_sbs_minus1 = width_in_sbs_minus1.as_ptr(); self } - pub fn p_height_in_sbs_minus1(mut self, p_height_in_sbs_minus1: &'a [u16]) -> Self { - self.tile_rows = p_height_in_sbs_minus1.len() as _; - self.p_height_in_sbs_minus1 = p_height_in_sbs_minus1.as_ptr(); + pub fn height_in_sbs_minus1(mut self, height_in_sbs_minus1: &'a [u16]) -> Self { + self.tile_rows = height_in_sbs_minus1.len() as _; + self.p_height_in_sbs_minus1 = height_in_sbs_minus1.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/video/codec_av1std_decode.rs b/ash-rewrite/src/generated/video/codec_av1std_decode.rs index 03b8dbf54..31628b51b 100644 --- a/ash-rewrite/src/generated/video/codec_av1std_decode.rs +++ b/ash-rewrite/src/generated/video/codec_av1std_decode.rs @@ -338,48 +338,42 @@ impl<'a> DecodeAV1PictureInfo<'a> { self.expected_frame_id = expected_frame_id; self } - pub fn p_tile_info(mut self, p_tile_info: &'a crate::vk::AV1TileInfo<'a>) -> Self { - self.p_tile_info = p_tile_info; + pub fn tile_info(mut self, tile_info: &'a crate::vk::AV1TileInfo<'a>) -> Self { + self.p_tile_info = tile_info; self } - pub fn p_quantization( - mut self, - p_quantization: &'a crate::vk::AV1Quantization, - ) -> Self { - self.p_quantization = p_quantization; + pub fn quantization(mut self, quantization: &'a crate::vk::AV1Quantization) -> Self { + self.p_quantization = quantization; self } - pub fn p_segmentation( - mut self, - p_segmentation: &'a crate::vk::AV1Segmentation, - ) -> Self { - self.p_segmentation = p_segmentation; + pub fn segmentation(mut self, segmentation: &'a crate::vk::AV1Segmentation) -> Self { + self.p_segmentation = segmentation; self } - pub fn p_loop_filter(mut self, p_loop_filter: &'a crate::vk::AV1LoopFilter) -> Self { - self.p_loop_filter = p_loop_filter; + pub fn loop_filter(mut self, loop_filter: &'a crate::vk::AV1LoopFilter) -> Self { + self.p_loop_filter = loop_filter; self } - pub fn p_cdef(mut self, p_cdef: &'a crate::vk::AV1CDEF) -> Self { - self.p_cdef = p_cdef; + pub fn cdef(mut self, cdef: &'a crate::vk::AV1CDEF) -> Self { + self.p_cdef = cdef; self } - pub fn p_loop_restoration( + pub fn loop_restoration( mut self, - p_loop_restoration: &'a crate::vk::AV1LoopRestoration, + loop_restoration: &'a crate::vk::AV1LoopRestoration, ) -> Self { - self.p_loop_restoration = p_loop_restoration; + self.p_loop_restoration = loop_restoration; self } - pub fn p_global_motion( + pub fn global_motion( mut self, - p_global_motion: &'a crate::vk::AV1GlobalMotion, + global_motion: &'a crate::vk::AV1GlobalMotion, ) -> Self { - self.p_global_motion = p_global_motion; + self.p_global_motion = global_motion; self } - pub fn p_film_grain(mut self, p_film_grain: &'a crate::vk::AV1FilmGrain) -> Self { - self.p_film_grain = p_film_grain; + pub fn film_grain(mut self, film_grain: &'a crate::vk::AV1FilmGrain) -> Self { + self.p_film_grain = film_grain; self } } diff --git a/ash-rewrite/src/generated/video/codec_av1std_encode.rs b/ash-rewrite/src/generated/video/codec_av1std_encode.rs index 4d373df1b..b731ca62a 100644 --- a/ash-rewrite/src/generated/video/codec_av1std_encode.rs +++ b/ash-rewrite/src/generated/video/codec_av1std_encode.rs @@ -487,55 +487,49 @@ impl<'a> EncodeAV1PictureInfo<'a> { self.delta_frame_id_minus_1 = delta_frame_id_minus_1; self } - pub fn p_tile_info(mut self, p_tile_info: &'a crate::vk::AV1TileInfo<'a>) -> Self { - self.p_tile_info = p_tile_info; + pub fn tile_info(mut self, tile_info: &'a crate::vk::AV1TileInfo<'a>) -> Self { + self.p_tile_info = tile_info; self } - pub fn p_quantization( - mut self, - p_quantization: &'a crate::vk::AV1Quantization, - ) -> Self { - self.p_quantization = p_quantization; + pub fn quantization(mut self, quantization: &'a crate::vk::AV1Quantization) -> Self { + self.p_quantization = quantization; self } - pub fn p_segmentation( - mut self, - p_segmentation: &'a crate::vk::AV1Segmentation, - ) -> Self { - self.p_segmentation = p_segmentation; + pub fn segmentation(mut self, segmentation: &'a crate::vk::AV1Segmentation) -> Self { + self.p_segmentation = segmentation; self } - pub fn p_loop_filter(mut self, p_loop_filter: &'a crate::vk::AV1LoopFilter) -> Self { - self.p_loop_filter = p_loop_filter; + pub fn loop_filter(mut self, loop_filter: &'a crate::vk::AV1LoopFilter) -> Self { + self.p_loop_filter = loop_filter; self } - pub fn p_cdef(mut self, p_cdef: &'a crate::vk::AV1CDEF) -> Self { - self.p_cdef = p_cdef; + pub fn cdef(mut self, cdef: &'a crate::vk::AV1CDEF) -> Self { + self.p_cdef = cdef; self } - pub fn p_loop_restoration( + pub fn loop_restoration( mut self, - p_loop_restoration: &'a crate::vk::AV1LoopRestoration, + loop_restoration: &'a crate::vk::AV1LoopRestoration, ) -> Self { - self.p_loop_restoration = p_loop_restoration; + self.p_loop_restoration = loop_restoration; self } - pub fn p_global_motion( + pub fn global_motion( mut self, - p_global_motion: &'a crate::vk::AV1GlobalMotion, + global_motion: &'a crate::vk::AV1GlobalMotion, ) -> Self { - self.p_global_motion = p_global_motion; + self.p_global_motion = global_motion; self } - pub fn p_extension_header( + pub fn extension_header( mut self, - p_extension_header: &'a crate::vk::EncodeAV1ExtensionHeader, + extension_header: &'a crate::vk::EncodeAV1ExtensionHeader, ) -> Self { - self.p_extension_header = p_extension_header; + self.p_extension_header = extension_header; self } - pub fn p_buffer_removal_times(mut self, p_buffer_removal_times: &'a u32) -> Self { - self.p_buffer_removal_times = p_buffer_removal_times; + pub fn buffer_removal_times(mut self, buffer_removal_times: &'a u32) -> Self { + self.p_buffer_removal_times = buffer_removal_times; self } } @@ -606,11 +600,11 @@ impl<'a> EncodeAV1ReferenceInfo<'a> { self.reserved1 = reserved1; self } - pub fn p_extension_header( + pub fn extension_header( mut self, - p_extension_header: &'a crate::vk::EncodeAV1ExtensionHeader, + extension_header: &'a crate::vk::EncodeAV1ExtensionHeader, ) -> Self { - self.p_extension_header = p_extension_header; + self.p_extension_header = extension_header; self } } diff --git a/ash-rewrite/src/generated/video/codec_h264std.rs b/ash-rewrite/src/generated/video/codec_h264std.rs index f0bc74ac4..c4b7a10a3 100644 --- a/ash-rewrite/src/generated/video/codec_h264std.rs +++ b/ash-rewrite/src/generated/video/codec_h264std.rs @@ -293,11 +293,11 @@ impl<'a> H264SequenceParameterSetVui<'a> { self.reserved1 = reserved1; self } - pub fn p_hrd_parameters( + pub fn hrd_parameters( mut self, - p_hrd_parameters: &'a crate::vk::H264HrdParameters, + hrd_parameters: &'a crate::vk::H264HrdParameters, ) -> Self { - self.p_hrd_parameters = p_hrd_parameters; + self.p_hrd_parameters = hrd_parameters; self } } @@ -615,23 +615,23 @@ impl<'a> H264SequenceParameterSet<'a> { self.reserved2 = reserved2; self } - pub fn p_offset_for_ref_frame(mut self, p_offset_for_ref_frame: &'a [i32]) -> Self { - self.num_ref_frames_in_pic_order_cnt_cycle = p_offset_for_ref_frame.len() as _; - self.p_offset_for_ref_frame = p_offset_for_ref_frame.as_ptr(); + pub fn offset_for_ref_frame(mut self, offset_for_ref_frame: &'a [i32]) -> Self { + self.num_ref_frames_in_pic_order_cnt_cycle = offset_for_ref_frame.len() as _; + self.p_offset_for_ref_frame = offset_for_ref_frame.as_ptr(); self } - pub fn p_scaling_lists( + pub fn scaling_lists( mut self, - p_scaling_lists: &'a crate::vk::H264ScalingLists, + scaling_lists: &'a crate::vk::H264ScalingLists, ) -> Self { - self.p_scaling_lists = p_scaling_lists; + self.p_scaling_lists = scaling_lists; self } - pub fn p_sequence_parameter_set_vui( + pub fn sequence_parameter_set_vui( mut self, - p_sequence_parameter_set_vui: &'a crate::vk::H264SequenceParameterSetVui<'a>, + sequence_parameter_set_vui: &'a crate::vk::H264SequenceParameterSetVui<'a>, ) -> Self { - self.p_sequence_parameter_set_vui = p_sequence_parameter_set_vui; + self.p_sequence_parameter_set_vui = sequence_parameter_set_vui; self } } @@ -776,11 +776,11 @@ impl<'a> H264PictureParameterSet<'a> { self.second_chroma_qp_index_offset = second_chroma_qp_index_offset; self } - pub fn p_scaling_lists( + pub fn scaling_lists( mut self, - p_scaling_lists: &'a crate::vk::H264ScalingLists, + scaling_lists: &'a crate::vk::H264ScalingLists, ) -> Self { - self.p_scaling_lists = p_scaling_lists; + self.p_scaling_lists = scaling_lists; self } } diff --git a/ash-rewrite/src/generated/video/codec_h264std_encode.rs b/ash-rewrite/src/generated/video/codec_h264std_encode.rs index bd9c2a2a3..386257dc5 100644 --- a/ash-rewrite/src/generated/video/codec_h264std_encode.rs +++ b/ash-rewrite/src/generated/video/codec_h264std_encode.rs @@ -398,28 +398,28 @@ impl<'a> EncodeH264ReferenceListsInfo<'a> { self.reserved1 = reserved1; self } - pub fn p_ref_list0_mod_operations( + pub fn ref_list0_mod_operations( mut self, - p_ref_list0_mod_operations: &'a [crate::vk::EncodeH264RefListModEntry], + ref_list0_mod_operations: &'a [crate::vk::EncodeH264RefListModEntry], ) -> Self { - self.ref_list0_mod_op_count = p_ref_list0_mod_operations.len() as _; - self.p_ref_list0_mod_operations = p_ref_list0_mod_operations.as_ptr(); + self.ref_list0_mod_op_count = ref_list0_mod_operations.len() as _; + self.p_ref_list0_mod_operations = ref_list0_mod_operations.as_ptr(); self } - pub fn p_ref_list1_mod_operations( + pub fn ref_list1_mod_operations( mut self, - p_ref_list1_mod_operations: &'a [crate::vk::EncodeH264RefListModEntry], + ref_list1_mod_operations: &'a [crate::vk::EncodeH264RefListModEntry], ) -> Self { - self.ref_list1_mod_op_count = p_ref_list1_mod_operations.len() as _; - self.p_ref_list1_mod_operations = p_ref_list1_mod_operations.as_ptr(); + self.ref_list1_mod_op_count = ref_list1_mod_operations.len() as _; + self.p_ref_list1_mod_operations = ref_list1_mod_operations.as_ptr(); self } - pub fn p_ref_pic_marking_operations( + pub fn ref_pic_marking_operations( mut self, - p_ref_pic_marking_operations: &'a [crate::vk::EncodeH264RefPicMarkingEntry], + ref_pic_marking_operations: &'a [crate::vk::EncodeH264RefPicMarkingEntry], ) -> Self { - self.ref_pic_marking_op_count = p_ref_pic_marking_operations.len() as _; - self.p_ref_pic_marking_operations = p_ref_pic_marking_operations.as_ptr(); + self.ref_pic_marking_op_count = ref_pic_marking_operations.len() as _; + self.p_ref_pic_marking_operations = ref_pic_marking_operations.as_ptr(); self } } @@ -495,11 +495,11 @@ impl<'a> EncodeH264PictureInfo<'a> { self.reserved1 = reserved1; self } - pub fn p_ref_lists( + pub fn ref_lists( mut self, - p_ref_lists: &'a crate::vk::EncodeH264ReferenceListsInfo<'a>, + ref_lists: &'a crate::vk::EncodeH264ReferenceListsInfo<'a>, ) -> Self { - self.p_ref_lists = p_ref_lists; + self.p_ref_lists = ref_lists; self } } @@ -605,11 +605,11 @@ impl<'a> EncodeH264SliceHeader<'a> { self.disable_deblocking_filter_idc = disable_deblocking_filter_idc; self } - pub fn p_weight_table( + pub fn weight_table( mut self, - p_weight_table: &'a crate::vk::EncodeH264WeightTable, + weight_table: &'a crate::vk::EncodeH264WeightTable, ) -> Self { - self.p_weight_table = p_weight_table; + self.p_weight_table = weight_table; self } } diff --git a/ash-rewrite/src/generated/video/codec_h265std.rs b/ash-rewrite/src/generated/video/codec_h265std.rs index d9c6a3171..7270a7436 100644 --- a/ash-rewrite/src/generated/video/codec_h265std.rs +++ b/ash-rewrite/src/generated/video/codec_h265std.rs @@ -364,18 +364,18 @@ impl<'a> H265HrdParameters<'a> { self.reserved = reserved; self } - pub fn p_sub_layer_hrd_parameters_nal( + pub fn sub_layer_hrd_parameters_nal( mut self, - p_sub_layer_hrd_parameters_nal: *const crate::vk::H265SubLayerHrdParameters, + sub_layer_hrd_parameters_nal: *const crate::vk::H265SubLayerHrdParameters, ) -> Self { - self.p_sub_layer_hrd_parameters_nal = p_sub_layer_hrd_parameters_nal; + self.p_sub_layer_hrd_parameters_nal = sub_layer_hrd_parameters_nal; self } - pub fn p_sub_layer_hrd_parameters_vcl( + pub fn sub_layer_hrd_parameters_vcl( mut self, - p_sub_layer_hrd_parameters_vcl: *const crate::vk::H265SubLayerHrdParameters, + sub_layer_hrd_parameters_vcl: *const crate::vk::H265SubLayerHrdParameters, ) -> Self { - self.p_sub_layer_hrd_parameters_vcl = p_sub_layer_hrd_parameters_vcl; + self.p_sub_layer_hrd_parameters_vcl = sub_layer_hrd_parameters_vcl; self } } @@ -481,25 +481,25 @@ impl<'a> H265VideoParameterSet<'a> { self.reserved3 = reserved3; self } - pub fn p_dec_pic_buf_mgr( + pub fn dec_pic_buf_mgr( mut self, - p_dec_pic_buf_mgr: &'a crate::vk::H265DecPicBufMgr, + dec_pic_buf_mgr: &'a crate::vk::H265DecPicBufMgr, ) -> Self { - self.p_dec_pic_buf_mgr = p_dec_pic_buf_mgr; + self.p_dec_pic_buf_mgr = dec_pic_buf_mgr; self } - pub fn p_hrd_parameters( + pub fn hrd_parameters( mut self, - p_hrd_parameters: &'a crate::vk::H265HrdParameters<'a>, + hrd_parameters: &'a crate::vk::H265HrdParameters<'a>, ) -> Self { - self.p_hrd_parameters = p_hrd_parameters; + self.p_hrd_parameters = hrd_parameters; self } - pub fn p_profile_tier_level( + pub fn profile_tier_level( mut self, - p_profile_tier_level: &'a crate::vk::H265ProfileTierLevel, + profile_tier_level: &'a crate::vk::H265ProfileTierLevel, ) -> Self { - self.p_profile_tier_level = p_profile_tier_level; + self.p_profile_tier_level = profile_tier_level; self } } @@ -1056,11 +1056,11 @@ impl<'a> H265SequenceParameterSetVui<'a> { self.log2_max_mv_length_vertical = log2_max_mv_length_vertical; self } - pub fn p_hrd_parameters( + pub fn hrd_parameters( mut self, - p_hrd_parameters: &'a crate::vk::H265HrdParameters<'a>, + hrd_parameters: &'a crate::vk::H265HrdParameters<'a>, ) -> Self { - self.p_hrd_parameters = p_hrd_parameters; + self.p_hrd_parameters = hrd_parameters; self } } @@ -1580,54 +1580,54 @@ impl<'a> H265SequenceParameterSet<'a> { self.conf_win_bottom_offset = conf_win_bottom_offset; self } - pub fn p_profile_tier_level( + pub fn profile_tier_level( mut self, - p_profile_tier_level: &'a crate::vk::H265ProfileTierLevel, + profile_tier_level: &'a crate::vk::H265ProfileTierLevel, ) -> Self { - self.p_profile_tier_level = p_profile_tier_level; + self.p_profile_tier_level = profile_tier_level; self } - pub fn p_dec_pic_buf_mgr( + pub fn dec_pic_buf_mgr( mut self, - p_dec_pic_buf_mgr: &'a crate::vk::H265DecPicBufMgr, + dec_pic_buf_mgr: &'a crate::vk::H265DecPicBufMgr, ) -> Self { - self.p_dec_pic_buf_mgr = p_dec_pic_buf_mgr; + self.p_dec_pic_buf_mgr = dec_pic_buf_mgr; self } - pub fn p_scaling_lists( + pub fn scaling_lists( mut self, - p_scaling_lists: &'a crate::vk::H265ScalingLists, + scaling_lists: &'a crate::vk::H265ScalingLists, ) -> Self { - self.p_scaling_lists = p_scaling_lists; + self.p_scaling_lists = scaling_lists; self } - pub fn p_short_term_ref_pic_set( + pub fn short_term_ref_pic_set( mut self, - p_short_term_ref_pic_set: &'a [crate::vk::H265ShortTermRefPicSet], + short_term_ref_pic_set: &'a [crate::vk::H265ShortTermRefPicSet], ) -> Self { - self.num_short_term_ref_pic_sets = p_short_term_ref_pic_set.len() as _; - self.p_short_term_ref_pic_set = p_short_term_ref_pic_set.as_ptr(); + self.num_short_term_ref_pic_sets = short_term_ref_pic_set.len() as _; + self.p_short_term_ref_pic_set = short_term_ref_pic_set.as_ptr(); self } - pub fn p_long_term_ref_pics_sps( + pub fn long_term_ref_pics_sps( mut self, - p_long_term_ref_pics_sps: &'a crate::vk::H265LongTermRefPicsSps, + long_term_ref_pics_sps: &'a crate::vk::H265LongTermRefPicsSps, ) -> Self { - self.p_long_term_ref_pics_sps = p_long_term_ref_pics_sps; + self.p_long_term_ref_pics_sps = long_term_ref_pics_sps; self } - pub fn p_sequence_parameter_set_vui( + pub fn sequence_parameter_set_vui( mut self, - p_sequence_parameter_set_vui: &'a crate::vk::H265SequenceParameterSetVui<'a>, + sequence_parameter_set_vui: &'a crate::vk::H265SequenceParameterSetVui<'a>, ) -> Self { - self.p_sequence_parameter_set_vui = p_sequence_parameter_set_vui; + self.p_sequence_parameter_set_vui = sequence_parameter_set_vui; self } - pub fn p_predictor_palette_entries( + pub fn predictor_palette_entries( mut self, - p_predictor_palette_entries: &'a crate::vk::H265PredictorPaletteEntries, + predictor_palette_entries: &'a crate::vk::H265PredictorPaletteEntries, ) -> Self { - self.p_predictor_palette_entries = p_predictor_palette_entries; + self.p_predictor_palette_entries = predictor_palette_entries; self } } @@ -2179,18 +2179,18 @@ impl<'a> H265PictureParameterSet<'a> { self.reserved3 = reserved3; self } - pub fn p_scaling_lists( + pub fn scaling_lists( mut self, - p_scaling_lists: &'a crate::vk::H265ScalingLists, + scaling_lists: &'a crate::vk::H265ScalingLists, ) -> Self { - self.p_scaling_lists = p_scaling_lists; + self.p_scaling_lists = scaling_lists; self } - pub fn p_predictor_palette_entries( + pub fn predictor_palette_entries( mut self, - p_predictor_palette_entries: &'a crate::vk::H265PredictorPaletteEntries, + predictor_palette_entries: &'a crate::vk::H265PredictorPaletteEntries, ) -> Self { - self.p_predictor_palette_entries = p_predictor_palette_entries; + self.p_predictor_palette_entries = predictor_palette_entries; self } } diff --git a/ash-rewrite/src/generated/video/codec_h265std_encode.rs b/ash-rewrite/src/generated/video/codec_h265std_encode.rs index 89ddb6570..f9ca5ddc8 100644 --- a/ash-rewrite/src/generated/video/codec_h265std_encode.rs +++ b/ash-rewrite/src/generated/video/codec_h265std_encode.rs @@ -387,11 +387,11 @@ impl<'a> EncodeH265SliceSegmentHeader<'a> { self.reserved1 = reserved1; self } - pub fn p_weight_table( + pub fn weight_table( mut self, - p_weight_table: &'a crate::vk::EncodeH265WeightTable, + weight_table: &'a crate::vk::EncodeH265WeightTable, ) -> Self { - self.p_weight_table = p_weight_table; + self.p_weight_table = weight_table; self } } @@ -639,25 +639,25 @@ impl<'a> EncodeH265PictureInfo<'a> { self.reserved1 = reserved1; self } - pub fn p_ref_lists( + pub fn ref_lists( mut self, - p_ref_lists: &'a crate::vk::EncodeH265ReferenceListsInfo, + ref_lists: &'a crate::vk::EncodeH265ReferenceListsInfo, ) -> Self { - self.p_ref_lists = p_ref_lists; + self.p_ref_lists = ref_lists; self } - pub fn p_short_term_ref_pic_set( + pub fn short_term_ref_pic_set( mut self, - p_short_term_ref_pic_set: &'a crate::vk::H265ShortTermRefPicSet, + short_term_ref_pic_set: &'a crate::vk::H265ShortTermRefPicSet, ) -> Self { - self.p_short_term_ref_pic_set = p_short_term_ref_pic_set; + self.p_short_term_ref_pic_set = short_term_ref_pic_set; self } - pub fn p_long_term_ref_pics( + pub fn long_term_ref_pics( mut self, - p_long_term_ref_pics: &'a crate::vk::EncodeH265LongTermRefPics, + long_term_ref_pics: &'a crate::vk::EncodeH265LongTermRefPics, ) -> Self { - self.p_long_term_ref_pics = p_long_term_ref_pics; + self.p_long_term_ref_pics = long_term_ref_pics; self } } diff --git a/ash-rewrite/src/generated/video/codec_vp9std_decode.rs b/ash-rewrite/src/generated/video/codec_vp9std_decode.rs index b5c2d93b7..3c9180777 100644 --- a/ash-rewrite/src/generated/video/codec_vp9std_decode.rs +++ b/ash-rewrite/src/generated/video/codec_vp9std_decode.rs @@ -171,22 +171,16 @@ impl<'a> DecodeVP9PictureInfo<'a> { self.reserved1 = reserved1; self } - pub fn p_color_config( - mut self, - p_color_config: &'a crate::vk::VP9ColorConfig, - ) -> Self { - self.p_color_config = p_color_config; + pub fn color_config(mut self, color_config: &'a crate::vk::VP9ColorConfig) -> Self { + self.p_color_config = color_config; self } - pub fn p_loop_filter(mut self, p_loop_filter: &'a crate::vk::VP9LoopFilter) -> Self { - self.p_loop_filter = p_loop_filter; + pub fn loop_filter(mut self, loop_filter: &'a crate::vk::VP9LoopFilter) -> Self { + self.p_loop_filter = loop_filter; self } - pub fn p_segmentation( - mut self, - p_segmentation: &'a crate::vk::VP9Segmentation, - ) -> Self { - self.p_segmentation = p_segmentation; + pub fn segmentation(mut self, segmentation: &'a crate::vk::VP9Segmentation) -> Self { + self.p_segmentation = segmentation; self } } diff --git a/ash-rewrite/src/generated/vk1_0.rs b/ash-rewrite/src/generated/vk1_0.rs index a3a1d087b..599a034c1 100644 --- a/ash-rewrite/src/generated/vk1_0.rs +++ b/ash-rewrite/src/generated/vk1_0.rs @@ -272,7 +272,7 @@ impl InstanceFnV1_0 { _: crate::vk::PhysicalDevice, _: crate::vk::Format, _: crate::vk::ImageType, - _: crate::vk::SampleCountFlagBits, + _: crate::vk::SampleCountFlags, _: crate::vk::ImageUsageFlags, _: crate::vk::ImageTiling, _: *mut u32, @@ -2128,7 +2128,7 @@ impl DeviceFnV1_0 { cmd_write_timestamp: unsafe { unsafe extern "system" fn cmd_write_timestamp( _: crate::vk::CommandBuffer, - _: crate::vk::PipelineStageFlagBits, + _: crate::vk::PipelineStageFlags, _: crate::vk::QueryPool, _: u32, ) { @@ -2627,14 +2627,14 @@ pub(crate) mod reexport { } } impl<'a> ApplicationInfo<'a> { - pub fn p_application_name( + pub fn application_name( mut self, - p_application_name: &'a core::ffi::CStr, + application_name: &'a core::ffi::CStr, ) -> Self { - self.p_application_name = p_application_name.as_ptr(); + self.p_application_name = application_name.as_ptr(); self } - pub unsafe fn p_application_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn application_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_application_name.is_null() { None } else { @@ -2645,11 +2645,11 @@ pub(crate) mod reexport { self.application_version = application_version; self } - pub fn p_engine_name(mut self, p_engine_name: &'a core::ffi::CStr) -> Self { - self.p_engine_name = p_engine_name.as_ptr(); + pub fn engine_name(mut self, engine_name: &'a core::ffi::CStr) -> Self { + self.p_engine_name = engine_name.as_ptr(); self } - pub unsafe fn p_engine_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn engine_name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_engine_name.is_null() { None } else { @@ -2677,8 +2677,8 @@ pub(crate) mod reexport { pub _marker: ::core::marker::PhantomData<&'a ()>, } impl<'a> AllocationCallbacks<'a> { - pub fn p_user_data(mut self, p_user_data: &'a mut core::ffi::c_void) -> Self { - self.p_user_data = p_user_data; + pub fn user_data(mut self, user_data: &'a mut core::ffi::c_void) -> Self { + self.p_user_data = user_data; self } pub fn pfn_allocation( @@ -2754,12 +2754,12 @@ pub(crate) mod reexport { self.queue_count = queue_count; self } - pub fn p_queue_priorities( + pub fn queue_priorities( mut self, - p_queue_priorities: &'a [core::ffi::c_float], + queue_priorities: &'a [core::ffi::c_float], ) -> Self { - self.queue_count = p_queue_priorities.len() as _; - self.p_queue_priorities = p_queue_priorities.as_ptr(); + self.queue_count = queue_priorities.len() as _; + self.p_queue_priorities = queue_priorities.as_ptr(); self } } @@ -2807,43 +2807,43 @@ pub(crate) mod reexport { self.queue_create_info_count = queue_create_info_count; self } - pub fn p_queue_create_infos( + pub fn queue_create_infos( mut self, - p_queue_create_infos: &'a [crate::vk::DeviceQueueCreateInfo<'a>], + queue_create_infos: &'a [crate::vk::DeviceQueueCreateInfo<'a>], ) -> Self { - self.queue_create_info_count = p_queue_create_infos.len() as _; - self.p_queue_create_infos = p_queue_create_infos.as_ptr(); + self.queue_create_info_count = queue_create_infos.len() as _; + self.p_queue_create_infos = queue_create_infos.as_ptr(); self } pub fn enabled_layer_count(mut self, enabled_layer_count: u32) -> Self { self.enabled_layer_count = enabled_layer_count; self } - pub fn pp_enabled_layer_names( + pub fn enabled_layer_names( mut self, - pp_enabled_layer_names: &'a [*const core::ffi::c_char], + enabled_layer_names: &'a [*const core::ffi::c_char], ) -> Self { - self.enabled_layer_count = pp_enabled_layer_names.len() as _; - self.pp_enabled_layer_names = pp_enabled_layer_names.as_ptr(); + self.enabled_layer_count = enabled_layer_names.len() as _; + self.pp_enabled_layer_names = enabled_layer_names.as_ptr(); self } pub fn enabled_extension_count(mut self, enabled_extension_count: u32) -> Self { self.enabled_extension_count = enabled_extension_count; self } - pub fn pp_enabled_extension_names( + pub fn enabled_extension_names( mut self, - pp_enabled_extension_names: &'a [*const core::ffi::c_char], + enabled_extension_names: &'a [*const core::ffi::c_char], ) -> Self { - self.enabled_extension_count = pp_enabled_extension_names.len() as _; - self.pp_enabled_extension_names = pp_enabled_extension_names.as_ptr(); + self.enabled_extension_count = enabled_extension_names.len() as _; + self.pp_enabled_extension_names = enabled_extension_names.as_ptr(); self } - pub fn p_enabled_features( + pub fn enabled_features( mut self, - p_enabled_features: &'a crate::vk::PhysicalDeviceFeatures, + enabled_features: &'a crate::vk::PhysicalDeviceFeatures, ) -> Self { - self.p_enabled_features = p_enabled_features; + self.p_enabled_features = enabled_features; self } } @@ -2883,35 +2883,35 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_application_info( + pub fn application_info( mut self, - p_application_info: &'a crate::vk::ApplicationInfo<'a>, + application_info: &'a crate::vk::ApplicationInfo<'a>, ) -> Self { - self.p_application_info = p_application_info; + self.p_application_info = application_info; self } pub fn enabled_layer_count(mut self, enabled_layer_count: u32) -> Self { self.enabled_layer_count = enabled_layer_count; self } - pub fn pp_enabled_layer_names( + pub fn enabled_layer_names( mut self, - pp_enabled_layer_names: &'a [*const core::ffi::c_char], + enabled_layer_names: &'a [*const core::ffi::c_char], ) -> Self { - self.enabled_layer_count = pp_enabled_layer_names.len() as _; - self.pp_enabled_layer_names = pp_enabled_layer_names.as_ptr(); + self.enabled_layer_count = enabled_layer_names.len() as _; + self.pp_enabled_layer_names = enabled_layer_names.as_ptr(); self } pub fn enabled_extension_count(mut self, enabled_extension_count: u32) -> Self { self.enabled_extension_count = enabled_extension_count; self } - pub fn pp_enabled_extension_names( + pub fn enabled_extension_names( mut self, - pp_enabled_extension_names: &'a [*const core::ffi::c_char], + enabled_extension_names: &'a [*const core::ffi::c_char], ) -> Self { - self.enabled_extension_count = pp_enabled_extension_names.len() as _; - self.pp_enabled_extension_names = pp_enabled_extension_names.as_ptr(); + self.enabled_extension_count = enabled_extension_names.len() as _; + self.pp_enabled_extension_names = enabled_extension_names.as_ptr(); self } } @@ -3357,28 +3357,28 @@ pub(crate) mod reexport { self.descriptor_type = descriptor_type; self } - pub fn p_image_info( + pub fn image_info( mut self, - p_image_info: &'a [crate::vk::DescriptorImageInfo], + image_info: &'a [crate::vk::DescriptorImageInfo], ) -> Self { - self.descriptor_count = p_image_info.len() as _; - self.p_image_info = p_image_info.as_ptr(); + self.descriptor_count = image_info.len() as _; + self.p_image_info = image_info.as_ptr(); self } - pub fn p_buffer_info( + pub fn buffer_info( mut self, - p_buffer_info: &'a [crate::vk::DescriptorBufferInfo], + buffer_info: &'a [crate::vk::DescriptorBufferInfo], ) -> Self { - self.descriptor_count = p_buffer_info.len() as _; - self.p_buffer_info = p_buffer_info.as_ptr(); + self.descriptor_count = buffer_info.len() as _; + self.p_buffer_info = buffer_info.as_ptr(); self } - pub fn p_texel_buffer_view( + pub fn texel_buffer_view( mut self, - p_texel_buffer_view: &'a [crate::vk::BufferView], + texel_buffer_view: &'a [crate::vk::BufferView], ) -> Self { - self.descriptor_count = p_texel_buffer_view.len() as _; - self.p_texel_buffer_view = p_texel_buffer_view.as_ptr(); + self.descriptor_count = texel_buffer_view.len() as _; + self.p_texel_buffer_view = texel_buffer_view.as_ptr(); self } } @@ -3500,12 +3500,9 @@ pub(crate) mod reexport { self.queue_family_index_count = queue_family_index_count; self } - pub fn p_queue_family_indices( - mut self, - p_queue_family_indices: &'a [u32], - ) -> Self { - self.queue_family_index_count = p_queue_family_indices.len() as _; - self.p_queue_family_indices = p_queue_family_indices.as_ptr(); + pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self { + self.queue_family_index_count = queue_family_indices.len() as _; + self.p_queue_family_indices = queue_family_indices.as_ptr(); self } } @@ -3835,7 +3832,7 @@ pub(crate) mod reexport { pub extent: crate::vk::Extent3D, pub mip_levels: u32, pub array_layers: u32, - pub samples: crate::vk::SampleCountFlagBits, + pub samples: crate::vk::SampleCountFlags, pub tiling: crate::vk::ImageTiling, pub usage: crate::vk::ImageUsageFlags, pub sharing_mode: crate::vk::SharingMode, @@ -3894,7 +3891,7 @@ pub(crate) mod reexport { self.array_layers = array_layers; self } - pub fn samples(mut self, samples: crate::vk::SampleCountFlagBits) -> Self { + pub fn samples(mut self, samples: crate::vk::SampleCountFlags) -> Self { self.samples = samples; self } @@ -3917,12 +3914,9 @@ pub(crate) mod reexport { self.queue_family_index_count = queue_family_index_count; self } - pub fn p_queue_family_indices( - mut self, - p_queue_family_indices: &'a [u32], - ) -> Self { - self.queue_family_index_count = p_queue_family_indices.len() as _; - self.p_queue_family_indices = p_queue_family_indices.as_ptr(); + pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self { + self.queue_family_index_count = queue_family_indices.len() as _; + self.p_queue_family_indices = queue_family_indices.as_ptr(); self } pub fn initial_layout(mut self, initial_layout: crate::vk::ImageLayout) -> Self { @@ -4129,9 +4123,9 @@ pub(crate) mod reexport { self.bind_count = bind_count; self } - pub fn p_binds(mut self, p_binds: &'a [crate::vk::SparseMemoryBind]) -> Self { - self.bind_count = p_binds.len() as _; - self.p_binds = p_binds.as_ptr(); + pub fn binds(mut self, binds: &'a [crate::vk::SparseMemoryBind]) -> Self { + self.bind_count = binds.len() as _; + self.p_binds = binds.as_ptr(); self } } @@ -4152,9 +4146,9 @@ pub(crate) mod reexport { self.bind_count = bind_count; self } - pub fn p_binds(mut self, p_binds: &'a [crate::vk::SparseMemoryBind]) -> Self { - self.bind_count = p_binds.len() as _; - self.p_binds = p_binds.as_ptr(); + pub fn binds(mut self, binds: &'a [crate::vk::SparseMemoryBind]) -> Self { + self.bind_count = binds.len() as _; + self.p_binds = binds.as_ptr(); self } } @@ -4175,12 +4169,9 @@ pub(crate) mod reexport { self.bind_count = bind_count; self } - pub fn p_binds( - mut self, - p_binds: &'a [crate::vk::SparseImageMemoryBind], - ) -> Self { - self.bind_count = p_binds.len() as _; - self.p_binds = p_binds.as_ptr(); + pub fn binds(mut self, binds: &'a [crate::vk::SparseImageMemoryBind]) -> Self { + self.bind_count = binds.len() as _; + self.p_binds = binds.as_ptr(); self } } @@ -4228,60 +4219,60 @@ pub(crate) mod reexport { self.wait_semaphore_count = wait_semaphore_count; self } - pub fn p_wait_semaphores( + pub fn wait_semaphores( mut self, - p_wait_semaphores: &'a [crate::vk::Semaphore], + wait_semaphores: &'a [crate::vk::Semaphore], ) -> Self { - self.wait_semaphore_count = p_wait_semaphores.len() as _; - self.p_wait_semaphores = p_wait_semaphores.as_ptr(); + self.wait_semaphore_count = wait_semaphores.len() as _; + self.p_wait_semaphores = wait_semaphores.as_ptr(); self } pub fn buffer_bind_count(mut self, buffer_bind_count: u32) -> Self { self.buffer_bind_count = buffer_bind_count; self } - pub fn p_buffer_binds( + pub fn buffer_binds( mut self, - p_buffer_binds: &'a [crate::vk::SparseBufferMemoryBindInfo<'a>], + buffer_binds: &'a [crate::vk::SparseBufferMemoryBindInfo<'a>], ) -> Self { - self.buffer_bind_count = p_buffer_binds.len() as _; - self.p_buffer_binds = p_buffer_binds.as_ptr(); + self.buffer_bind_count = buffer_binds.len() as _; + self.p_buffer_binds = buffer_binds.as_ptr(); self } pub fn image_opaque_bind_count(mut self, image_opaque_bind_count: u32) -> Self { self.image_opaque_bind_count = image_opaque_bind_count; self } - pub fn p_image_opaque_binds( + pub fn image_opaque_binds( mut self, - p_image_opaque_binds: &'a [crate::vk::SparseImageOpaqueMemoryBindInfo<'a>], + image_opaque_binds: &'a [crate::vk::SparseImageOpaqueMemoryBindInfo<'a>], ) -> Self { - self.image_opaque_bind_count = p_image_opaque_binds.len() as _; - self.p_image_opaque_binds = p_image_opaque_binds.as_ptr(); + self.image_opaque_bind_count = image_opaque_binds.len() as _; + self.p_image_opaque_binds = image_opaque_binds.as_ptr(); self } pub fn image_bind_count(mut self, image_bind_count: u32) -> Self { self.image_bind_count = image_bind_count; self } - pub fn p_image_binds( + pub fn image_binds( mut self, - p_image_binds: &'a [crate::vk::SparseImageMemoryBindInfo<'a>], + image_binds: &'a [crate::vk::SparseImageMemoryBindInfo<'a>], ) -> Self { - self.image_bind_count = p_image_binds.len() as _; - self.p_image_binds = p_image_binds.as_ptr(); + self.image_bind_count = image_binds.len() as _; + self.p_image_binds = image_binds.as_ptr(); self } pub fn signal_semaphore_count(mut self, signal_semaphore_count: u32) -> Self { self.signal_semaphore_count = signal_semaphore_count; self } - pub fn p_signal_semaphores( + pub fn signal_semaphores( mut self, - p_signal_semaphores: &'a [crate::vk::Semaphore], + signal_semaphores: &'a [crate::vk::Semaphore], ) -> Self { - self.signal_semaphore_count = p_signal_semaphores.len() as _; - self.p_signal_semaphores = p_signal_semaphores.as_ptr(); + self.signal_semaphore_count = signal_semaphores.len() as _; + self.p_signal_semaphores = signal_semaphores.as_ptr(); self } } @@ -4484,8 +4475,8 @@ pub(crate) mod reexport { self.code_size = code_size; self } - pub fn p_code(mut self, p_code: *const u32) -> Self { - self.p_code = p_code; + pub fn code(mut self, code: *const u32) -> Self { + self.p_code = code; self } } @@ -4519,12 +4510,12 @@ pub(crate) mod reexport { self.stage_flags = stage_flags; self } - pub fn p_immutable_samplers( + pub fn immutable_samplers( mut self, - p_immutable_samplers: &'a [crate::vk::Sampler], + immutable_samplers: &'a [crate::vk::Sampler], ) -> Self { - self.descriptor_count = p_immutable_samplers.len() as _; - self.p_immutable_samplers = p_immutable_samplers.as_ptr(); + self.descriptor_count = immutable_samplers.len() as _; + self.p_immutable_samplers = immutable_samplers.as_ptr(); self } } @@ -4565,12 +4556,12 @@ pub(crate) mod reexport { self.binding_count = binding_count; self } - pub fn p_bindings( + pub fn bindings( mut self, - p_bindings: &'a [crate::vk::DescriptorSetLayoutBinding<'a>], + bindings: &'a [crate::vk::DescriptorSetLayoutBinding<'a>], ) -> Self { - self.binding_count = p_bindings.len() as _; - self.p_bindings = p_bindings.as_ptr(); + self.binding_count = bindings.len() as _; + self.p_bindings = bindings.as_ptr(); self } } @@ -4630,12 +4621,12 @@ pub(crate) mod reexport { self.pool_size_count = pool_size_count; self } - pub fn p_pool_sizes( + pub fn pool_sizes( mut self, - p_pool_sizes: &'a [crate::vk::DescriptorPoolSize], + pool_sizes: &'a [crate::vk::DescriptorPoolSize], ) -> Self { - self.pool_size_count = p_pool_sizes.len() as _; - self.p_pool_sizes = p_pool_sizes.as_ptr(); + self.pool_size_count = pool_sizes.len() as _; + self.p_pool_sizes = pool_sizes.as_ptr(); self } } @@ -4676,12 +4667,12 @@ pub(crate) mod reexport { self.descriptor_set_count = descriptor_set_count; self } - pub fn p_set_layouts( + pub fn set_layouts( mut self, - p_set_layouts: &'a [crate::vk::DescriptorSetLayout], + set_layouts: &'a [crate::vk::DescriptorSetLayout], ) -> Self { - self.descriptor_set_count = p_set_layouts.len() as _; - self.p_set_layouts = p_set_layouts.as_ptr(); + self.descriptor_set_count = set_layouts.len() as _; + self.p_set_layouts = set_layouts.as_ptr(); self } } @@ -4720,21 +4711,21 @@ pub(crate) mod reexport { self.map_entry_count = map_entry_count; self } - pub fn p_map_entries( + pub fn map_entries( mut self, - p_map_entries: &'a [crate::vk::SpecializationMapEntry], + map_entries: &'a [crate::vk::SpecializationMapEntry], ) -> Self { - self.map_entry_count = p_map_entries.len() as _; - self.p_map_entries = p_map_entries.as_ptr(); + self.map_entry_count = map_entries.len() as _; + self.p_map_entries = map_entries.as_ptr(); self } pub fn data_size(mut self, data_size: usize) -> Self { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_ptr().cast(); + pub fn data(mut self, data: &'a [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_ptr().cast(); self } } @@ -4744,7 +4735,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub flags: crate::vk::PipelineShaderStageCreateFlags, - pub stage: crate::vk::ShaderStageFlagBits, + pub stage: crate::vk::ShaderStageFlags, pub module: crate::vk::ShaderModule, pub p_name: *const core::ffi::c_char, pub p_specialization_info: *const crate::vk::SpecializationInfo<'a>, @@ -4775,7 +4766,7 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn stage(mut self, stage: crate::vk::ShaderStageFlagBits) -> Self { + pub fn stage(mut self, stage: crate::vk::ShaderStageFlags) -> Self { self.stage = stage; self } @@ -4783,22 +4774,22 @@ pub(crate) mod reexport { self.module = module; self } - pub fn p_name(mut self, p_name: &'a core::ffi::CStr) -> Self { - self.p_name = p_name.as_ptr(); + pub fn name(mut self, name: &'a core::ffi::CStr) -> Self { + self.p_name = name.as_ptr(); self } - pub unsafe fn p_name_as_c_str(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn name_as_c_str(&self) -> Option<&core::ffi::CStr> { if self.p_name.is_null() { None } else { Some(unsafe { core::ffi::CStr::from_ptr(self.p_name) }) } } - pub fn p_specialization_info( + pub fn specialization_info( mut self, - p_specialization_info: &'a crate::vk::SpecializationInfo<'a>, + specialization_info: &'a crate::vk::SpecializationInfo<'a>, ) -> Self { - self.p_specialization_info = p_specialization_info; + self.p_specialization_info = specialization_info; self } } @@ -4951,13 +4942,13 @@ pub(crate) mod reexport { self.vertex_binding_description_count = vertex_binding_description_count; self } - pub fn p_vertex_binding_descriptions( + pub fn vertex_binding_descriptions( mut self, - p_vertex_binding_descriptions: &'a [crate::vk::VertexInputBindingDescription], + vertex_binding_descriptions: &'a [crate::vk::VertexInputBindingDescription], ) -> Self { - self.vertex_binding_description_count = p_vertex_binding_descriptions.len() + self.vertex_binding_description_count = vertex_binding_descriptions.len() as _; - self.p_vertex_binding_descriptions = p_vertex_binding_descriptions.as_ptr(); + self.p_vertex_binding_descriptions = vertex_binding_descriptions.as_ptr(); self } pub fn vertex_attribute_description_count( @@ -4967,13 +4958,13 @@ pub(crate) mod reexport { self.vertex_attribute_description_count = vertex_attribute_description_count; self } - pub fn p_vertex_attribute_descriptions( + pub fn vertex_attribute_descriptions( mut self, - p_vertex_attribute_descriptions: &'a [crate::vk::VertexInputAttributeDescription], + vertex_attribute_descriptions: &'a [crate::vk::VertexInputAttributeDescription], ) -> Self { - self.vertex_attribute_description_count = p_vertex_attribute_descriptions - .len() as _; - self.p_vertex_attribute_descriptions = p_vertex_attribute_descriptions + self.vertex_attribute_description_count = vertex_attribute_descriptions.len() + as _; + self.p_vertex_attribute_descriptions = vertex_attribute_descriptions .as_ptr(); self } @@ -5102,18 +5093,18 @@ pub(crate) mod reexport { self.viewport_count = viewport_count; self } - pub fn p_viewports(mut self, p_viewports: &'a [crate::vk::Viewport]) -> Self { - self.viewport_count = p_viewports.len() as _; - self.p_viewports = p_viewports.as_ptr(); + pub fn viewports(mut self, viewports: &'a [crate::vk::Viewport]) -> Self { + self.viewport_count = viewports.len() as _; + self.p_viewports = viewports.as_ptr(); self } pub fn scissor_count(mut self, scissor_count: u32) -> Self { self.scissor_count = scissor_count; self } - pub fn p_scissors(mut self, p_scissors: &'a [crate::vk::Rect2D]) -> Self { - self.scissor_count = p_scissors.len() as _; - self.p_scissors = p_scissors.as_ptr(); + pub fn scissors(mut self, scissors: &'a [crate::vk::Rect2D]) -> Self { + self.scissor_count = scissors.len() as _; + self.p_scissors = scissors.as_ptr(); self } } @@ -5223,7 +5214,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub flags: crate::vk::PipelineMultisampleStateCreateFlags, - pub rasterization_samples: crate::vk::SampleCountFlagBits, + pub rasterization_samples: crate::vk::SampleCountFlags, pub sample_shading_enable: crate::vk::Bool32, pub min_sample_shading: core::ffi::c_float, pub p_sample_mask: *const crate::vk::SampleMask, @@ -5261,7 +5252,7 @@ pub(crate) mod reexport { } pub fn rasterization_samples( mut self, - rasterization_samples: crate::vk::SampleCountFlagBits, + rasterization_samples: crate::vk::SampleCountFlags, ) -> Self { self.rasterization_samples = rasterization_samples; self @@ -5277,11 +5268,8 @@ pub(crate) mod reexport { self.min_sample_shading = min_sample_shading; self } - pub fn p_sample_mask( - mut self, - p_sample_mask: *const crate::vk::SampleMask, - ) -> Self { - self.p_sample_mask = p_sample_mask; + pub fn sample_mask(mut self, sample_mask: *const crate::vk::SampleMask) -> Self { + self.p_sample_mask = sample_mask; self } pub fn alpha_to_coverage_enable( @@ -5409,12 +5397,12 @@ pub(crate) mod reexport { self.attachment_count = attachment_count; self } - pub fn p_attachments( + pub fn attachments( mut self, - p_attachments: &'a [crate::vk::PipelineColorBlendAttachmentState], + attachments: &'a [crate::vk::PipelineColorBlendAttachmentState], ) -> Self { - self.attachment_count = p_attachments.len() as _; - self.p_attachments = p_attachments.as_ptr(); + self.attachment_count = attachments.len() as _; + self.p_attachments = attachments.as_ptr(); self } pub fn blend_constants( @@ -5462,12 +5450,12 @@ pub(crate) mod reexport { self.dynamic_state_count = dynamic_state_count; self } - pub fn p_dynamic_states( + pub fn dynamic_states( mut self, - p_dynamic_states: &'a [crate::vk::DynamicState], + dynamic_states: &'a [crate::vk::DynamicState], ) -> Self { - self.dynamic_state_count = p_dynamic_states.len() as _; - self.p_dynamic_states = p_dynamic_states.as_ptr(); + self.dynamic_state_count = dynamic_states.len() as _; + self.p_dynamic_states = dynamic_states.as_ptr(); self } } @@ -5677,79 +5665,75 @@ pub(crate) mod reexport { self.stage_count = stage_count; self } - pub fn p_stages( + pub fn stages( mut self, - p_stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], + stages: &'a [crate::vk::PipelineShaderStageCreateInfo<'a>], ) -> Self { - self.stage_count = p_stages.len() as _; - self.p_stages = p_stages.as_ptr(); + self.stage_count = stages.len() as _; + self.p_stages = stages.as_ptr(); self } - pub fn p_vertex_input_state( + pub fn vertex_input_state( mut self, - p_vertex_input_state: &'a crate::vk::PipelineVertexInputStateCreateInfo<'a>, + vertex_input_state: &'a crate::vk::PipelineVertexInputStateCreateInfo<'a>, ) -> Self { - self.p_vertex_input_state = p_vertex_input_state; + self.p_vertex_input_state = vertex_input_state; self } - pub fn p_input_assembly_state( + pub fn input_assembly_state( mut self, - p_input_assembly_state: &'a crate::vk::PipelineInputAssemblyStateCreateInfo< - 'a, - >, + input_assembly_state: &'a crate::vk::PipelineInputAssemblyStateCreateInfo<'a>, ) -> Self { - self.p_input_assembly_state = p_input_assembly_state; + self.p_input_assembly_state = input_assembly_state; self } - pub fn p_tessellation_state( + pub fn tessellation_state( mut self, - p_tessellation_state: &'a crate::vk::PipelineTessellationStateCreateInfo<'a>, + tessellation_state: &'a crate::vk::PipelineTessellationStateCreateInfo<'a>, ) -> Self { - self.p_tessellation_state = p_tessellation_state; + self.p_tessellation_state = tessellation_state; self } - pub fn p_viewport_state( + pub fn viewport_state( mut self, - p_viewport_state: &'a crate::vk::PipelineViewportStateCreateInfo<'a>, + viewport_state: &'a crate::vk::PipelineViewportStateCreateInfo<'a>, ) -> Self { - self.p_viewport_state = p_viewport_state; + self.p_viewport_state = viewport_state; self } - pub fn p_rasterization_state( + pub fn rasterization_state( mut self, - p_rasterization_state: &'a crate::vk::PipelineRasterizationStateCreateInfo< - 'a, - >, + rasterization_state: &'a crate::vk::PipelineRasterizationStateCreateInfo<'a>, ) -> Self { - self.p_rasterization_state = p_rasterization_state; + self.p_rasterization_state = rasterization_state; self } - pub fn p_multisample_state( + pub fn multisample_state( mut self, - p_multisample_state: &'a crate::vk::PipelineMultisampleStateCreateInfo<'a>, + multisample_state: &'a crate::vk::PipelineMultisampleStateCreateInfo<'a>, ) -> Self { - self.p_multisample_state = p_multisample_state; + self.p_multisample_state = multisample_state; self } - pub fn p_depth_stencil_state( + pub fn depth_stencil_state( mut self, - p_depth_stencil_state: &'a crate::vk::PipelineDepthStencilStateCreateInfo<'a>, + depth_stencil_state: &'a crate::vk::PipelineDepthStencilStateCreateInfo<'a>, ) -> Self { - self.p_depth_stencil_state = p_depth_stencil_state; + self.p_depth_stencil_state = depth_stencil_state; self } - pub fn p_color_blend_state( + pub fn color_blend_state( mut self, - p_color_blend_state: &'a crate::vk::PipelineColorBlendStateCreateInfo<'a>, + color_blend_state: &'a crate::vk::PipelineColorBlendStateCreateInfo<'a>, ) -> Self { - self.p_color_blend_state = p_color_blend_state; + self.p_color_blend_state = color_blend_state; self } - pub fn p_dynamic_state( + pub fn dynamic_state( mut self, - p_dynamic_state: &'a crate::vk::PipelineDynamicStateCreateInfo<'a>, + dynamic_state: &'a crate::vk::PipelineDynamicStateCreateInfo<'a>, ) -> Self { - self.p_dynamic_state = p_dynamic_state; + self.p_dynamic_state = dynamic_state; self } pub fn layout(mut self, layout: crate::vk::PipelineLayout) -> Self { @@ -5810,9 +5794,9 @@ pub(crate) mod reexport { self.initial_data_size = initial_data_size; self } - pub fn p_initial_data(mut self, p_initial_data: &'a [u8]) -> Self { - self.initial_data_size = p_initial_data.len() as _; - self.p_initial_data = p_initial_data.as_ptr().cast(); + pub fn initial_data(mut self, initial_data: &'a [u8]) -> Self { + self.initial_data_size = initial_data.len() as _; + self.p_initial_data = initial_data.as_ptr().cast(); self } } @@ -5939,12 +5923,12 @@ pub(crate) mod reexport { self.set_layout_count = set_layout_count; self } - pub fn p_set_layouts( + pub fn set_layouts( mut self, - p_set_layouts: &'a [crate::vk::DescriptorSetLayout], + set_layouts: &'a [crate::vk::DescriptorSetLayout], ) -> Self { - self.set_layout_count = p_set_layouts.len() as _; - self.p_set_layouts = p_set_layouts.as_ptr(); + self.set_layout_count = set_layouts.len() as _; + self.p_set_layouts = set_layouts.as_ptr(); self } pub fn push_constant_range_count( @@ -5954,12 +5938,12 @@ pub(crate) mod reexport { self.push_constant_range_count = push_constant_range_count; self } - pub fn p_push_constant_ranges( + pub fn push_constant_ranges( mut self, - p_push_constant_ranges: &'a [crate::vk::PushConstantRange], + push_constant_ranges: &'a [crate::vk::PushConstantRange], ) -> Self { - self.push_constant_range_count = p_push_constant_ranges.len() as _; - self.p_push_constant_ranges = p_push_constant_ranges.as_ptr(); + self.push_constant_range_count = push_constant_ranges.len() as _; + self.p_push_constant_ranges = push_constant_ranges.as_ptr(); self } } @@ -6252,11 +6236,11 @@ pub(crate) mod reexport { self.flags = flags; self } - pub fn p_inheritance_info( + pub fn inheritance_info( mut self, - p_inheritance_info: &'a crate::vk::CommandBufferInheritanceInfo<'a>, + inheritance_info: &'a crate::vk::CommandBufferInheritanceInfo<'a>, ) -> Self { - self.p_inheritance_info = p_inheritance_info; + self.p_inheritance_info = inheritance_info; self } } @@ -6306,12 +6290,12 @@ pub(crate) mod reexport { self.clear_value_count = clear_value_count; self } - pub fn p_clear_values( + pub fn clear_values( mut self, - p_clear_values: &'a [crate::vk::ClearValue], + clear_values: &'a [crate::vk::ClearValue], ) -> Self { - self.clear_value_count = p_clear_values.len() as _; - self.p_clear_values = p_clear_values.as_ptr(); + self.clear_value_count = clear_values.len() as _; + self.p_clear_values = clear_values.as_ptr(); self } } @@ -6357,7 +6341,7 @@ pub(crate) mod reexport { pub struct AttachmentDescription { pub flags: crate::vk::AttachmentDescriptionFlags, pub format: crate::vk::Format, - pub samples: crate::vk::SampleCountFlagBits, + pub samples: crate::vk::SampleCountFlags, pub load_op: crate::vk::AttachmentLoadOp, pub store_op: crate::vk::AttachmentStoreOp, pub stencil_load_op: crate::vk::AttachmentLoadOp, @@ -6374,7 +6358,7 @@ pub(crate) mod reexport { self.format = format; self } - pub fn samples(mut self, samples: crate::vk::SampleCountFlagBits) -> Self { + pub fn samples(mut self, samples: crate::vk::SampleCountFlags) -> Self { self.samples = samples; self } @@ -6456,39 +6440,39 @@ pub(crate) mod reexport { self.input_attachment_count = input_attachment_count; self } - pub fn p_input_attachments( + pub fn input_attachments( mut self, - p_input_attachments: &'a [crate::vk::AttachmentReference], + input_attachments: &'a [crate::vk::AttachmentReference], ) -> Self { - self.input_attachment_count = p_input_attachments.len() as _; - self.p_input_attachments = p_input_attachments.as_ptr(); + self.input_attachment_count = input_attachments.len() as _; + self.p_input_attachments = input_attachments.as_ptr(); self } pub fn color_attachment_count(mut self, color_attachment_count: u32) -> Self { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachments( + pub fn color_attachments( mut self, - p_color_attachments: &'a [crate::vk::AttachmentReference], + color_attachments: &'a [crate::vk::AttachmentReference], ) -> Self { - self.color_attachment_count = p_color_attachments.len() as _; - self.p_color_attachments = p_color_attachments.as_ptr(); + self.color_attachment_count = color_attachments.len() as _; + self.p_color_attachments = color_attachments.as_ptr(); self } - pub fn p_resolve_attachments( + pub fn resolve_attachments( mut self, - p_resolve_attachments: &'a [crate::vk::AttachmentReference], + resolve_attachments: &'a [crate::vk::AttachmentReference], ) -> Self { - self.color_attachment_count = p_resolve_attachments.len() as _; - self.p_resolve_attachments = p_resolve_attachments.as_ptr(); + self.color_attachment_count = resolve_attachments.len() as _; + self.p_resolve_attachments = resolve_attachments.as_ptr(); self } - pub fn p_depth_stencil_attachment( + pub fn depth_stencil_attachment( mut self, - p_depth_stencil_attachment: &'a crate::vk::AttachmentReference, + depth_stencil_attachment: &'a crate::vk::AttachmentReference, ) -> Self { - self.p_depth_stencil_attachment = p_depth_stencil_attachment; + self.p_depth_stencil_attachment = depth_stencil_attachment; self } pub fn preserve_attachment_count( @@ -6498,12 +6482,9 @@ pub(crate) mod reexport { self.preserve_attachment_count = preserve_attachment_count; self } - pub fn p_preserve_attachments( - mut self, - p_preserve_attachments: &'a [u32], - ) -> Self { - self.preserve_attachment_count = p_preserve_attachments.len() as _; - self.p_preserve_attachments = p_preserve_attachments.as_ptr(); + pub fn preserve_attachments(mut self, preserve_attachments: &'a [u32]) -> Self { + self.preserve_attachment_count = preserve_attachments.len() as _; + self.p_preserve_attachments = preserve_attachments.as_ptr(); self } } @@ -6605,36 +6586,36 @@ pub(crate) mod reexport { self.attachment_count = attachment_count; self } - pub fn p_attachments( + pub fn attachments( mut self, - p_attachments: &'a [crate::vk::AttachmentDescription], + attachments: &'a [crate::vk::AttachmentDescription], ) -> Self { - self.attachment_count = p_attachments.len() as _; - self.p_attachments = p_attachments.as_ptr(); + self.attachment_count = attachments.len() as _; + self.p_attachments = attachments.as_ptr(); self } pub fn subpass_count(mut self, subpass_count: u32) -> Self { self.subpass_count = subpass_count; self } - pub fn p_subpasses( + pub fn subpasses( mut self, - p_subpasses: &'a [crate::vk::SubpassDescription<'a>], + subpasses: &'a [crate::vk::SubpassDescription<'a>], ) -> Self { - self.subpass_count = p_subpasses.len() as _; - self.p_subpasses = p_subpasses.as_ptr(); + self.subpass_count = subpasses.len() as _; + self.p_subpasses = subpasses.as_ptr(); self } pub fn dependency_count(mut self, dependency_count: u32) -> Self { self.dependency_count = dependency_count; self } - pub fn p_dependencies( + pub fn dependencies( mut self, - p_dependencies: &'a [crate::vk::SubpassDependency], + dependencies: &'a [crate::vk::SubpassDependency], ) -> Self { - self.dependency_count = p_dependencies.len() as _; - self.p_dependencies = p_dependencies.as_ptr(); + self.dependency_count = dependencies.len() as _; + self.p_dependencies = dependencies.as_ptr(); self } } @@ -8125,12 +8106,9 @@ pub(crate) mod reexport { self.attachment_count = attachment_count; self } - pub fn p_attachments( - mut self, - p_attachments: &'a [crate::vk::ImageView], - ) -> Self { - self.attachment_count = p_attachments.len() as _; - self.p_attachments = p_attachments.as_ptr(); + pub fn attachments(mut self, attachments: &'a [crate::vk::ImageView]) -> Self { + self.attachment_count = attachments.len() as _; + self.p_attachments = attachments.as_ptr(); self } pub fn width(mut self, width: u32) -> Self { @@ -8262,44 +8240,44 @@ pub(crate) mod reexport { self.wait_semaphore_count = wait_semaphore_count; self } - pub fn p_wait_semaphores( + pub fn wait_semaphores( mut self, - p_wait_semaphores: &'a [crate::vk::Semaphore], + wait_semaphores: &'a [crate::vk::Semaphore], ) -> Self { - self.wait_semaphore_count = p_wait_semaphores.len() as _; - self.p_wait_semaphores = p_wait_semaphores.as_ptr(); + self.wait_semaphore_count = wait_semaphores.len() as _; + self.p_wait_semaphores = wait_semaphores.as_ptr(); self } - pub fn p_wait_dst_stage_mask( + pub fn wait_dst_stage_mask( mut self, - p_wait_dst_stage_mask: &'a [crate::vk::PipelineStageFlags], + wait_dst_stage_mask: &'a [crate::vk::PipelineStageFlags], ) -> Self { - self.wait_semaphore_count = p_wait_dst_stage_mask.len() as _; - self.p_wait_dst_stage_mask = p_wait_dst_stage_mask.as_ptr(); + self.wait_semaphore_count = wait_dst_stage_mask.len() as _; + self.p_wait_dst_stage_mask = wait_dst_stage_mask.as_ptr(); self } pub fn command_buffer_count(mut self, command_buffer_count: u32) -> Self { self.command_buffer_count = command_buffer_count; self } - pub fn p_command_buffers( + pub fn command_buffers( mut self, - p_command_buffers: &'a [crate::vk::CommandBuffer], + command_buffers: &'a [crate::vk::CommandBuffer], ) -> Self { - self.command_buffer_count = p_command_buffers.len() as _; - self.p_command_buffers = p_command_buffers.as_ptr(); + self.command_buffer_count = command_buffers.len() as _; + self.p_command_buffers = command_buffers.as_ptr(); self } pub fn signal_semaphore_count(mut self, signal_semaphore_count: u32) -> Self { self.signal_semaphore_count = signal_semaphore_count; self } - pub fn p_signal_semaphores( + pub fn signal_semaphores( mut self, - p_signal_semaphores: &'a [crate::vk::Semaphore], + signal_semaphores: &'a [crate::vk::Semaphore], ) -> Self { - self.signal_semaphore_count = p_signal_semaphores.len() as _; - self.p_signal_semaphores = p_signal_semaphores.as_ptr(); + self.signal_semaphore_count = signal_semaphores.len() as _; + self.p_signal_semaphores = signal_semaphores.as_ptr(); self } } @@ -15508,7 +15486,7 @@ pub(crate) mod reexport { physical_device: crate::vk::PhysicalDevice, format: crate::vk::Format, _type: crate::vk::ImageType, - samples: crate::vk::SampleCountFlagBits, + samples: crate::vk::SampleCountFlags, usage: crate::vk::ImageUsageFlags, tiling: crate::vk::ImageTiling, p_property_count: *mut u32, @@ -16095,7 +16073,7 @@ pub(crate) mod reexport { ); pub type PFN_vkCmdWriteTimestamp = unsafe extern "system" fn( command_buffer: crate::vk::CommandBuffer, - pipeline_stage: crate::vk::PipelineStageFlagBits, + pipeline_stage: crate::vk::PipelineStageFlags, query_pool: crate::vk::QueryPool, query: u32, ); diff --git a/ash-rewrite/src/generated/vk1_1.rs b/ash-rewrite/src/generated/vk1_1.rs index 818f528d5..ce1cb8348 100644 --- a/ash-rewrite/src/generated/vk1_1.rs +++ b/ash-rewrite/src/generated/vk1_1.rs @@ -780,7 +780,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub format: crate::vk::Format, pub _type: crate::vk::ImageType, - pub samples: crate::vk::SampleCountFlagBits, + pub samples: crate::vk::SampleCountFlags, pub usage: crate::vk::ImageUsageFlags, pub tiling: crate::vk::ImageTiling, pub _marker: ::core::marker::PhantomData<&'a ()>, @@ -812,7 +812,7 @@ pub(crate) mod reexport { self._type = _type; self } - pub fn samples(mut self, samples: crate::vk::SampleCountFlagBits) -> Self { + pub fn samples(mut self, samples: crate::vk::SampleCountFlags) -> Self { self.samples = samples; self } @@ -902,7 +902,7 @@ pub(crate) mod reexport { pub struct PhysicalDeviceExternalImageFormatInfo<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -924,7 +924,7 @@ pub(crate) mod reexport { impl<'a> PhysicalDeviceExternalImageFormatInfo<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -969,7 +969,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub flags: crate::vk::BufferCreateFlags, pub usage: crate::vk::BufferUsageFlags, - pub handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalMemoryHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for PhysicalDeviceExternalBufferInfo<'a> { @@ -998,7 +998,7 @@ pub(crate) mod reexport { } pub fn handle_type( mut self, - handle_type: crate::vk::ExternalMemoryHandleTypeFlagBits, + handle_type: crate::vk::ExternalMemoryHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -1197,7 +1197,7 @@ pub(crate) mod reexport { pub struct PhysicalDeviceExternalSemaphoreInfo<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -1217,7 +1217,7 @@ pub(crate) mod reexport { impl<'a> PhysicalDeviceExternalSemaphoreInfo<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalSemaphoreHandleTypeFlagBits, + handle_type: crate::vk::ExternalSemaphoreHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -1308,7 +1308,7 @@ pub(crate) mod reexport { pub struct PhysicalDeviceExternalFenceInfo<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + pub handle_type: crate::vk::ExternalFenceHandleTypeFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for PhysicalDeviceExternalFenceInfo<'a> { @@ -1327,7 +1327,7 @@ pub(crate) mod reexport { impl<'a> PhysicalDeviceExternalFenceInfo<'a> { pub fn handle_type( mut self, - handle_type: crate::vk::ExternalFenceHandleTypeFlagBits, + handle_type: crate::vk::ExternalFenceHandleTypeFlags, ) -> Self { self.handle_type = handle_type; self @@ -1542,27 +1542,27 @@ pub(crate) mod reexport { self.subpass_count = subpass_count; self } - pub fn p_view_masks(mut self, p_view_masks: &'a [u32]) -> Self { - self.subpass_count = p_view_masks.len() as _; - self.p_view_masks = p_view_masks.as_ptr(); + pub fn view_masks(mut self, view_masks: &'a [u32]) -> Self { + self.subpass_count = view_masks.len() as _; + self.p_view_masks = view_masks.as_ptr(); self } pub fn dependency_count(mut self, dependency_count: u32) -> Self { self.dependency_count = dependency_count; self } - pub fn p_view_offsets(mut self, p_view_offsets: &'a [i32]) -> Self { - self.dependency_count = p_view_offsets.len() as _; - self.p_view_offsets = p_view_offsets.as_ptr(); + pub fn view_offsets(mut self, view_offsets: &'a [i32]) -> Self { + self.dependency_count = view_offsets.len() as _; + self.p_view_offsets = view_offsets.as_ptr(); self } pub fn correlation_mask_count(mut self, correlation_mask_count: u32) -> Self { self.correlation_mask_count = correlation_mask_count; self } - pub fn p_correlation_masks(mut self, p_correlation_masks: &'a [u32]) -> Self { - self.correlation_mask_count = p_correlation_masks.len() as _; - self.p_correlation_masks = p_correlation_masks.as_ptr(); + pub fn correlation_masks(mut self, correlation_masks: &'a [u32]) -> Self { + self.correlation_mask_count = correlation_masks.len() as _; + self.p_correlation_masks = correlation_masks.as_ptr(); self } } @@ -1718,9 +1718,9 @@ pub(crate) mod reexport { self.device_index_count = device_index_count; self } - pub fn p_device_indices(mut self, p_device_indices: &'a [u32]) -> Self { - self.device_index_count = p_device_indices.len() as _; - self.p_device_indices = p_device_indices.as_ptr(); + pub fn device_indices(mut self, device_indices: &'a [u32]) -> Self { + self.device_index_count = device_indices.len() as _; + self.p_device_indices = device_indices.as_ptr(); self } } @@ -1797,9 +1797,9 @@ pub(crate) mod reexport { self.device_index_count = device_index_count; self } - pub fn p_device_indices(mut self, p_device_indices: &'a [u32]) -> Self { - self.device_index_count = p_device_indices.len() as _; - self.p_device_indices = p_device_indices.as_ptr(); + pub fn device_indices(mut self, device_indices: &'a [u32]) -> Self { + self.device_index_count = device_indices.len() as _; + self.p_device_indices = device_indices.as_ptr(); self } pub fn split_instance_bind_region_count( @@ -1809,13 +1809,13 @@ pub(crate) mod reexport { self.split_instance_bind_region_count = split_instance_bind_region_count; self } - pub fn p_split_instance_bind_regions( + pub fn split_instance_bind_regions( mut self, - p_split_instance_bind_regions: &'a [crate::vk::Rect2D], + split_instance_bind_regions: &'a [crate::vk::Rect2D], ) -> Self { - self.split_instance_bind_region_count = p_split_instance_bind_regions.len() + self.split_instance_bind_region_count = split_instance_bind_regions.len() as _; - self.p_split_instance_bind_regions = p_split_instance_bind_regions.as_ptr(); + self.p_split_instance_bind_regions = split_instance_bind_regions.as_ptr(); self } } @@ -1860,12 +1860,12 @@ pub(crate) mod reexport { self.device_render_area_count = device_render_area_count; self } - pub fn p_device_render_areas( + pub fn device_render_areas( mut self, - p_device_render_areas: &'a [crate::vk::Rect2D], + device_render_areas: &'a [crate::vk::Rect2D], ) -> Self { - self.device_render_area_count = p_device_render_areas.len() as _; - self.p_device_render_areas = p_device_render_areas.as_ptr(); + self.device_render_area_count = device_render_areas.len() as _; + self.p_device_render_areas = device_render_areas.as_ptr(); self } } @@ -1937,12 +1937,12 @@ pub(crate) mod reexport { self.wait_semaphore_count = wait_semaphore_count; self } - pub fn p_wait_semaphore_device_indices( + pub fn wait_semaphore_device_indices( mut self, - p_wait_semaphore_device_indices: &'a [u32], + wait_semaphore_device_indices: &'a [u32], ) -> Self { - self.wait_semaphore_count = p_wait_semaphore_device_indices.len() as _; - self.p_wait_semaphore_device_indices = p_wait_semaphore_device_indices + self.wait_semaphore_count = wait_semaphore_device_indices.len() as _; + self.p_wait_semaphore_device_indices = wait_semaphore_device_indices .as_ptr(); self } @@ -1950,24 +1950,24 @@ pub(crate) mod reexport { self.command_buffer_count = command_buffer_count; self } - pub fn p_command_buffer_device_masks( + pub fn command_buffer_device_masks( mut self, - p_command_buffer_device_masks: &'a [u32], + command_buffer_device_masks: &'a [u32], ) -> Self { - self.command_buffer_count = p_command_buffer_device_masks.len() as _; - self.p_command_buffer_device_masks = p_command_buffer_device_masks.as_ptr(); + self.command_buffer_count = command_buffer_device_masks.len() as _; + self.p_command_buffer_device_masks = command_buffer_device_masks.as_ptr(); self } pub fn signal_semaphore_count(mut self, signal_semaphore_count: u32) -> Self { self.signal_semaphore_count = signal_semaphore_count; self } - pub fn p_signal_semaphore_device_indices( + pub fn signal_semaphore_device_indices( mut self, - p_signal_semaphore_device_indices: &'a [u32], + signal_semaphore_device_indices: &'a [u32], ) -> Self { - self.signal_semaphore_count = p_signal_semaphore_device_indices.len() as _; - self.p_signal_semaphore_device_indices = p_signal_semaphore_device_indices + self.signal_semaphore_count = signal_semaphore_device_indices.len() as _; + self.p_signal_semaphore_device_indices = signal_semaphore_device_indices .as_ptr(); self } @@ -2037,12 +2037,12 @@ pub(crate) mod reexport { self.physical_device_count = physical_device_count; self } - pub fn p_physical_devices( + pub fn physical_devices( mut self, - p_physical_devices: &'a [crate::vk::PhysicalDevice], + physical_devices: &'a [crate::vk::PhysicalDevice], ) -> Self { - self.physical_device_count = p_physical_devices.len() as _; - self.p_physical_devices = p_physical_devices.as_ptr(); + self.physical_device_count = physical_devices.len() as _; + self.p_physical_devices = physical_devices.as_ptr(); self } } @@ -2136,12 +2136,12 @@ pub(crate) mod reexport { self.descriptor_update_entry_count = descriptor_update_entry_count; self } - pub fn p_descriptor_update_entries( + pub fn descriptor_update_entries( mut self, - p_descriptor_update_entries: &'a [crate::vk::DescriptorUpdateTemplateEntry], + descriptor_update_entries: &'a [crate::vk::DescriptorUpdateTemplateEntry], ) -> Self { - self.descriptor_update_entry_count = p_descriptor_update_entries.len() as _; - self.p_descriptor_update_entries = p_descriptor_update_entries.as_ptr(); + self.descriptor_update_entry_count = descriptor_update_entries.len() as _; + self.p_descriptor_update_entries = descriptor_update_entries.as_ptr(); self } pub fn template_type( @@ -2229,12 +2229,12 @@ pub(crate) mod reexport { self.aspect_reference_count = aspect_reference_count; self } - pub fn p_aspect_references( + pub fn aspect_references( mut self, - p_aspect_references: &'a [crate::vk::InputAttachmentAspectReference], + aspect_references: &'a [crate::vk::InputAttachmentAspectReference], ) -> Self { - self.aspect_reference_count = p_aspect_references.len() as _; - self.p_aspect_references = p_aspect_references.as_ptr(); + self.aspect_reference_count = aspect_references.len() as _; + self.p_aspect_references = aspect_references.as_ptr(); self } } @@ -2784,7 +2784,7 @@ pub(crate) mod reexport { pub struct BindImagePlaneMemoryInfo<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub plane_aspect: crate::vk::ImageAspectFlagBits, + pub plane_aspect: crate::vk::ImageAspectFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for BindImagePlaneMemoryInfo<'a> { @@ -2805,7 +2805,7 @@ pub(crate) mod reexport { impl<'a> BindImagePlaneMemoryInfo<'a> { pub fn plane_aspect( mut self, - plane_aspect: crate::vk::ImageAspectFlagBits, + plane_aspect: crate::vk::ImageAspectFlags, ) -> Self { self.plane_aspect = plane_aspect; self @@ -2816,7 +2816,7 @@ pub(crate) mod reexport { pub struct ImagePlaneMemoryRequirementsInfo<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub plane_aspect: crate::vk::ImageAspectFlagBits, + pub plane_aspect: crate::vk::ImageAspectFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for ImagePlaneMemoryRequirementsInfo<'a> { @@ -2837,7 +2837,7 @@ pub(crate) mod reexport { impl<'a> ImagePlaneMemoryRequirementsInfo<'a> { pub fn plane_aspect( mut self, - plane_aspect: crate::vk::ImageAspectFlagBits, + plane_aspect: crate::vk::ImageAspectFlags, ) -> Self { self.plane_aspect = plane_aspect; self diff --git a/ash-rewrite/src/generated/vk1_2.rs b/ash-rewrite/src/generated/vk1_2.rs index 65340cce9..ce16cc748 100644 --- a/ash-rewrite/src/generated/vk1_2.rs +++ b/ash-rewrite/src/generated/vk1_2.rs @@ -466,12 +466,9 @@ pub(crate) mod reexport { self.view_format_count = view_format_count; self } - pub fn p_view_formats( - mut self, - p_view_formats: &'a [crate::vk::Format], - ) -> Self { - self.view_format_count = p_view_formats.len() as _; - self.p_view_formats = p_view_formats.as_ptr(); + pub fn view_formats(mut self, view_formats: &'a [crate::vk::Format]) -> Self { + self.view_format_count = view_formats.len() as _; + self.p_view_formats = view_formats.as_ptr(); self } } @@ -1227,12 +1224,12 @@ pub(crate) mod reexport { self.binding_count = binding_count; self } - pub fn p_binding_flags( + pub fn binding_flags( mut self, - p_binding_flags: &'a [crate::vk::DescriptorBindingFlags], + binding_flags: &'a [crate::vk::DescriptorBindingFlags], ) -> Self { - self.binding_count = p_binding_flags.len() as _; - self.p_binding_flags = p_binding_flags.as_ptr(); + self.binding_count = binding_flags.len() as _; + self.p_binding_flags = binding_flags.as_ptr(); self } } @@ -1267,9 +1264,9 @@ pub(crate) mod reexport { self.descriptor_set_count = descriptor_set_count; self } - pub fn p_descriptor_counts(mut self, p_descriptor_counts: &'a [u32]) -> Self { - self.descriptor_set_count = p_descriptor_counts.len() as _; - self.p_descriptor_counts = p_descriptor_counts.as_ptr(); + pub fn descriptor_counts(mut self, descriptor_counts: &'a [u32]) -> Self { + self.descriptor_set_count = descriptor_counts.len() as _; + self.p_descriptor_counts = descriptor_counts.as_ptr(); self } } @@ -1313,7 +1310,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub flags: crate::vk::AttachmentDescriptionFlags, pub format: crate::vk::Format, - pub samples: crate::vk::SampleCountFlagBits, + pub samples: crate::vk::SampleCountFlags, pub load_op: crate::vk::AttachmentLoadOp, pub store_op: crate::vk::AttachmentStoreOp, pub stencil_load_op: crate::vk::AttachmentLoadOp, @@ -1352,7 +1349,7 @@ pub(crate) mod reexport { self.format = format; self } - pub fn samples(mut self, samples: crate::vk::SampleCountFlagBits) -> Self { + pub fn samples(mut self, samples: crate::vk::SampleCountFlags) -> Self { self.samples = samples; self } @@ -1487,39 +1484,39 @@ pub(crate) mod reexport { self.input_attachment_count = input_attachment_count; self } - pub fn p_input_attachments( + pub fn input_attachments( mut self, - p_input_attachments: &'a [crate::vk::AttachmentReference2<'a>], + input_attachments: &'a [crate::vk::AttachmentReference2<'a>], ) -> Self { - self.input_attachment_count = p_input_attachments.len() as _; - self.p_input_attachments = p_input_attachments.as_ptr(); + self.input_attachment_count = input_attachments.len() as _; + self.p_input_attachments = input_attachments.as_ptr(); self } pub fn color_attachment_count(mut self, color_attachment_count: u32) -> Self { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachments( + pub fn color_attachments( mut self, - p_color_attachments: &'a [crate::vk::AttachmentReference2<'a>], + color_attachments: &'a [crate::vk::AttachmentReference2<'a>], ) -> Self { - self.color_attachment_count = p_color_attachments.len() as _; - self.p_color_attachments = p_color_attachments.as_ptr(); + self.color_attachment_count = color_attachments.len() as _; + self.p_color_attachments = color_attachments.as_ptr(); self } - pub fn p_resolve_attachments( + pub fn resolve_attachments( mut self, - p_resolve_attachments: &'a [crate::vk::AttachmentReference2<'a>], + resolve_attachments: &'a [crate::vk::AttachmentReference2<'a>], ) -> Self { - self.color_attachment_count = p_resolve_attachments.len() as _; - self.p_resolve_attachments = p_resolve_attachments.as_ptr(); + self.color_attachment_count = resolve_attachments.len() as _; + self.p_resolve_attachments = resolve_attachments.as_ptr(); self } - pub fn p_depth_stencil_attachment( + pub fn depth_stencil_attachment( mut self, - p_depth_stencil_attachment: &'a crate::vk::AttachmentReference2<'a>, + depth_stencil_attachment: &'a crate::vk::AttachmentReference2<'a>, ) -> Self { - self.p_depth_stencil_attachment = p_depth_stencil_attachment; + self.p_depth_stencil_attachment = depth_stencil_attachment; self } pub fn preserve_attachment_count( @@ -1529,12 +1526,9 @@ pub(crate) mod reexport { self.preserve_attachment_count = preserve_attachment_count; self } - pub fn p_preserve_attachments( - mut self, - p_preserve_attachments: &'a [u32], - ) -> Self { - self.preserve_attachment_count = p_preserve_attachments.len() as _; - self.p_preserve_attachments = p_preserve_attachments.as_ptr(); + pub fn preserve_attachments(mut self, preserve_attachments: &'a [u32]) -> Self { + self.preserve_attachment_count = preserve_attachments.len() as _; + self.p_preserve_attachments = preserve_attachments.as_ptr(); self } } @@ -1668,36 +1662,36 @@ pub(crate) mod reexport { self.attachment_count = attachment_count; self } - pub fn p_attachments( + pub fn attachments( mut self, - p_attachments: &'a [crate::vk::AttachmentDescription2<'a>], + attachments: &'a [crate::vk::AttachmentDescription2<'a>], ) -> Self { - self.attachment_count = p_attachments.len() as _; - self.p_attachments = p_attachments.as_ptr(); + self.attachment_count = attachments.len() as _; + self.p_attachments = attachments.as_ptr(); self } pub fn subpass_count(mut self, subpass_count: u32) -> Self { self.subpass_count = subpass_count; self } - pub fn p_subpasses( + pub fn subpasses( mut self, - p_subpasses: &'a [crate::vk::SubpassDescription2<'a>], + subpasses: &'a [crate::vk::SubpassDescription2<'a>], ) -> Self { - self.subpass_count = p_subpasses.len() as _; - self.p_subpasses = p_subpasses.as_ptr(); + self.subpass_count = subpasses.len() as _; + self.p_subpasses = subpasses.as_ptr(); self } pub fn dependency_count(mut self, dependency_count: u32) -> Self { self.dependency_count = dependency_count; self } - pub fn p_dependencies( + pub fn dependencies( mut self, - p_dependencies: &'a [crate::vk::SubpassDependency2<'a>], + dependencies: &'a [crate::vk::SubpassDependency2<'a>], ) -> Self { - self.dependency_count = p_dependencies.len() as _; - self.p_dependencies = p_dependencies.as_ptr(); + self.dependency_count = dependencies.len() as _; + self.p_dependencies = dependencies.as_ptr(); self } pub fn correlated_view_mask_count( @@ -1707,12 +1701,12 @@ pub(crate) mod reexport { self.correlated_view_mask_count = correlated_view_mask_count; self } - pub fn p_correlated_view_masks( + pub fn correlated_view_masks( mut self, - p_correlated_view_masks: &'a [u32], + correlated_view_masks: &'a [u32], ) -> Self { - self.correlated_view_mask_count = p_correlated_view_masks.len() as _; - self.p_correlated_view_masks = p_correlated_view_masks.as_ptr(); + self.correlated_view_mask_count = correlated_view_masks.len() as _; + self.p_correlated_view_masks = correlated_view_masks.as_ptr(); self } } @@ -1907,12 +1901,12 @@ pub(crate) mod reexport { self.wait_semaphore_value_count = wait_semaphore_value_count; self } - pub fn p_wait_semaphore_values( + pub fn wait_semaphore_values( mut self, - p_wait_semaphore_values: &'a [u64], + wait_semaphore_values: &'a [u64], ) -> Self { - self.wait_semaphore_value_count = p_wait_semaphore_values.len() as _; - self.p_wait_semaphore_values = p_wait_semaphore_values.as_ptr(); + self.wait_semaphore_value_count = wait_semaphore_values.len() as _; + self.p_wait_semaphore_values = wait_semaphore_values.as_ptr(); self } pub fn signal_semaphore_value_count( @@ -1922,12 +1916,12 @@ pub(crate) mod reexport { self.signal_semaphore_value_count = signal_semaphore_value_count; self } - pub fn p_signal_semaphore_values( + pub fn signal_semaphore_values( mut self, - p_signal_semaphore_values: &'a [u64], + signal_semaphore_values: &'a [u64], ) -> Self { - self.signal_semaphore_value_count = p_signal_semaphore_values.len() as _; - self.p_signal_semaphore_values = p_signal_semaphore_values.as_ptr(); + self.signal_semaphore_value_count = signal_semaphore_values.len() as _; + self.p_signal_semaphore_values = signal_semaphore_values.as_ptr(); self } } @@ -1967,14 +1961,14 @@ pub(crate) mod reexport { self.semaphore_count = semaphore_count; self } - pub fn p_semaphores(mut self, p_semaphores: &'a [crate::vk::Semaphore]) -> Self { - self.semaphore_count = p_semaphores.len() as _; - self.p_semaphores = p_semaphores.as_ptr(); + pub fn semaphores(mut self, semaphores: &'a [crate::vk::Semaphore]) -> Self { + self.semaphore_count = semaphores.len() as _; + self.p_semaphores = semaphores.as_ptr(); self } - pub fn p_values(mut self, p_values: &'a [u64]) -> Self { - self.semaphore_count = p_values.len() as _; - self.p_values = p_values.as_ptr(); + pub fn values(mut self, values: &'a [u64]) -> Self { + self.semaphore_count = values.len() as _; + self.p_values = values.as_ptr(); self } } @@ -2220,8 +2214,8 @@ pub(crate) mod reexport { pub struct SubpassDescriptionDepthStencilResolve<'a> { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, - pub depth_resolve_mode: crate::vk::ResolveModeFlagBits, - pub stencil_resolve_mode: crate::vk::ResolveModeFlagBits, + pub depth_resolve_mode: crate::vk::ResolveModeFlags, + pub stencil_resolve_mode: crate::vk::ResolveModeFlags, pub p_depth_stencil_resolve_attachment: *const crate::vk::AttachmentReference2< 'a, >, @@ -2248,23 +2242,23 @@ pub(crate) mod reexport { impl<'a> SubpassDescriptionDepthStencilResolve<'a> { pub fn depth_resolve_mode( mut self, - depth_resolve_mode: crate::vk::ResolveModeFlagBits, + depth_resolve_mode: crate::vk::ResolveModeFlags, ) -> Self { self.depth_resolve_mode = depth_resolve_mode; self } pub fn stencil_resolve_mode( mut self, - stencil_resolve_mode: crate::vk::ResolveModeFlagBits, + stencil_resolve_mode: crate::vk::ResolveModeFlags, ) -> Self { self.stencil_resolve_mode = stencil_resolve_mode; self } - pub fn p_depth_stencil_resolve_attachment( + pub fn depth_stencil_resolve_attachment( mut self, - p_depth_stencil_resolve_attachment: &'a crate::vk::AttachmentReference2<'a>, + depth_stencil_resolve_attachment: &'a crate::vk::AttachmentReference2<'a>, ) -> Self { - self.p_depth_stencil_resolve_attachment = p_depth_stencil_resolve_attachment; + self.p_depth_stencil_resolve_attachment = depth_stencil_resolve_attachment; self } } @@ -2545,12 +2539,12 @@ pub(crate) mod reexport { self.attachment_image_info_count = attachment_image_info_count; self } - pub fn p_attachment_image_infos( + pub fn attachment_image_infos( mut self, - p_attachment_image_infos: &'a [crate::vk::FramebufferAttachmentImageInfo<'a>], + attachment_image_infos: &'a [crate::vk::FramebufferAttachmentImageInfo<'a>], ) -> Self { - self.attachment_image_info_count = p_attachment_image_infos.len() as _; - self.p_attachment_image_infos = p_attachment_image_infos.as_ptr(); + self.attachment_image_info_count = attachment_image_infos.len() as _; + self.p_attachment_image_infos = attachment_image_infos.as_ptr(); self } } @@ -2612,12 +2606,9 @@ pub(crate) mod reexport { self.view_format_count = view_format_count; self } - pub fn p_view_formats( - mut self, - p_view_formats: &'a [crate::vk::Format], - ) -> Self { - self.view_format_count = p_view_formats.len() as _; - self.p_view_formats = p_view_formats.as_ptr(); + pub fn view_formats(mut self, view_formats: &'a [crate::vk::Format]) -> Self { + self.view_format_count = view_formats.len() as _; + self.p_view_formats = view_formats.as_ptr(); self } } @@ -2651,12 +2642,9 @@ pub(crate) mod reexport { self.attachment_count = attachment_count; self } - pub fn p_attachments( - mut self, - p_attachments: &'a [crate::vk::ImageView], - ) -> Self { - self.attachment_count = p_attachments.len() as _; - self.p_attachments = p_attachments.as_ptr(); + pub fn attachments(mut self, attachments: &'a [crate::vk::ImageView]) -> Self { + self.attachment_count = attachments.len() as _; + self.p_attachments = attachments.as_ptr(); self } } diff --git a/ash-rewrite/src/generated/vk1_3.rs b/ash-rewrite/src/generated/vk1_3.rs index 50f6d2fe8..833fc424c 100644 --- a/ash-rewrite/src/generated/vk1_3.rs +++ b/ash-rewrite/src/generated/vk1_3.rs @@ -722,11 +722,11 @@ pub(crate) mod reexport { } } impl<'a> DeviceBufferMemoryRequirements<'a> { - pub fn p_create_info( + pub fn create_info( mut self, - p_create_info: &'a crate::vk::BufferCreateInfo<'a>, + create_info: &'a crate::vk::BufferCreateInfo<'a>, ) -> Self { - self.p_create_info = p_create_info; + self.p_create_info = create_info; self } } @@ -736,7 +736,7 @@ pub(crate) mod reexport { pub s_type: crate::vk::StructureType, pub p_next: *const core::ffi::c_void, pub p_create_info: *const crate::vk::ImageCreateInfo<'a>, - pub plane_aspect: crate::vk::ImageAspectFlagBits, + pub plane_aspect: crate::vk::ImageAspectFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> for DeviceImageMemoryRequirements<'a> { @@ -754,16 +754,16 @@ pub(crate) mod reexport { } } impl<'a> DeviceImageMemoryRequirements<'a> { - pub fn p_create_info( + pub fn create_info( mut self, - p_create_info: &'a crate::vk::ImageCreateInfo<'a>, + create_info: &'a crate::vk::ImageCreateInfo<'a>, ) -> Self { - self.p_create_info = p_create_info; + self.p_create_info = create_info; self } pub fn plane_aspect( mut self, - plane_aspect: crate::vk::ImageAspectFlagBits, + plane_aspect: crate::vk::ImageAspectFlags, ) -> Self { self.plane_aspect = plane_aspect; self @@ -911,9 +911,9 @@ pub(crate) mod reexport { self.data_size = data_size; self } - pub fn p_data(mut self, p_data: &'a [u8]) -> Self { - self.data_size = p_data.len() as _; - self.p_data = p_data.as_ptr().cast(); + pub fn data(mut self, data: &'a [u8]) -> Self { + self.data_size = data.len() as _; + self.p_data = data.as_ptr().cast(); self } } @@ -1105,11 +1105,11 @@ pub(crate) mod reexport { } } impl<'a> PipelineCreationFeedbackCreateInfo<'a> { - pub fn p_pipeline_creation_feedback( + pub fn pipeline_creation_feedback( mut self, - p_pipeline_creation_feedback: &'a mut crate::vk::PipelineCreationFeedback, + pipeline_creation_feedback: &'a mut crate::vk::PipelineCreationFeedback, ) -> Self { - self.p_pipeline_creation_feedback = p_pipeline_creation_feedback; + self.p_pipeline_creation_feedback = pipeline_creation_feedback; self } pub fn pipeline_stage_creation_feedback_count( @@ -1119,13 +1119,13 @@ pub(crate) mod reexport { self.pipeline_stage_creation_feedback_count = pipeline_stage_creation_feedback_count; self } - pub fn p_pipeline_stage_creation_feedbacks( + pub fn pipeline_stage_creation_feedbacks( mut self, - p_pipeline_stage_creation_feedbacks: &'a mut [crate::vk::PipelineCreationFeedback], + pipeline_stage_creation_feedbacks: &'a mut [crate::vk::PipelineCreationFeedback], ) -> Self { - self.pipeline_stage_creation_feedback_count = p_pipeline_stage_creation_feedbacks + self.pipeline_stage_creation_feedback_count = pipeline_stage_creation_feedbacks .len() as _; - self.p_pipeline_stage_creation_feedbacks = p_pipeline_stage_creation_feedbacks + self.p_pipeline_stage_creation_feedbacks = pipeline_stage_creation_feedbacks .as_mut_ptr(); self } @@ -2450,9 +2450,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions(mut self, p_regions: &'a [crate::vk::BufferCopy2<'a>]) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::BufferCopy2<'a>]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -2514,9 +2514,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions(mut self, p_regions: &'a [crate::vk::ImageCopy2<'a>]) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::ImageCopy2<'a>]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -2580,9 +2580,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions(mut self, p_regions: &'a [crate::vk::ImageBlit2<'a>]) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::ImageBlit2<'a>]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } pub fn filter(mut self, filter: crate::vk::Filter) -> Self { @@ -2639,12 +2639,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::BufferImageCopy2<'a>], + regions: &'a [crate::vk::BufferImageCopy2<'a>], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -2697,12 +2697,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::BufferImageCopy2<'a>], + regions: &'a [crate::vk::BufferImageCopy2<'a>], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -2764,12 +2764,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( - mut self, - p_regions: &'a [crate::vk::ImageResolve2<'a>], - ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::ImageResolve2<'a>]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -3095,12 +3092,12 @@ pub(crate) mod reexport { self.memory_barrier_count = memory_barrier_count; self } - pub fn p_memory_barriers( + pub fn memory_barriers( mut self, - p_memory_barriers: &'a [crate::vk::MemoryBarrier2<'a>], + memory_barriers: &'a [crate::vk::MemoryBarrier2<'a>], ) -> Self { - self.memory_barrier_count = p_memory_barriers.len() as _; - self.p_memory_barriers = p_memory_barriers.as_ptr(); + self.memory_barrier_count = memory_barriers.len() as _; + self.p_memory_barriers = memory_barriers.as_ptr(); self } pub fn buffer_memory_barrier_count( @@ -3110,12 +3107,12 @@ pub(crate) mod reexport { self.buffer_memory_barrier_count = buffer_memory_barrier_count; self } - pub fn p_buffer_memory_barriers( + pub fn buffer_memory_barriers( mut self, - p_buffer_memory_barriers: &'a [crate::vk::BufferMemoryBarrier2<'a>], + buffer_memory_barriers: &'a [crate::vk::BufferMemoryBarrier2<'a>], ) -> Self { - self.buffer_memory_barrier_count = p_buffer_memory_barriers.len() as _; - self.p_buffer_memory_barriers = p_buffer_memory_barriers.as_ptr(); + self.buffer_memory_barrier_count = buffer_memory_barriers.len() as _; + self.p_buffer_memory_barriers = buffer_memory_barriers.as_ptr(); self } pub fn image_memory_barrier_count( @@ -3125,12 +3122,12 @@ pub(crate) mod reexport { self.image_memory_barrier_count = image_memory_barrier_count; self } - pub fn p_image_memory_barriers( + pub fn image_memory_barriers( mut self, - p_image_memory_barriers: &'a [crate::vk::ImageMemoryBarrier2<'a>], + image_memory_barriers: &'a [crate::vk::ImageMemoryBarrier2<'a>], ) -> Self { - self.image_memory_barrier_count = p_image_memory_barriers.len() as _; - self.p_image_memory_barriers = p_image_memory_barriers.as_ptr(); + self.image_memory_barrier_count = image_memory_barriers.len() as _; + self.p_image_memory_barriers = image_memory_barriers.as_ptr(); self } } @@ -3260,12 +3257,12 @@ pub(crate) mod reexport { self.wait_semaphore_info_count = wait_semaphore_info_count; self } - pub fn p_wait_semaphore_infos( + pub fn wait_semaphore_infos( mut self, - p_wait_semaphore_infos: &'a [crate::vk::SemaphoreSubmitInfo<'a>], + wait_semaphore_infos: &'a [crate::vk::SemaphoreSubmitInfo<'a>], ) -> Self { - self.wait_semaphore_info_count = p_wait_semaphore_infos.len() as _; - self.p_wait_semaphore_infos = p_wait_semaphore_infos.as_ptr(); + self.wait_semaphore_info_count = wait_semaphore_infos.len() as _; + self.p_wait_semaphore_infos = wait_semaphore_infos.as_ptr(); self } pub fn command_buffer_info_count( @@ -3275,12 +3272,12 @@ pub(crate) mod reexport { self.command_buffer_info_count = command_buffer_info_count; self } - pub fn p_command_buffer_infos( + pub fn command_buffer_infos( mut self, - p_command_buffer_infos: &'a [crate::vk::CommandBufferSubmitInfo<'a>], + command_buffer_infos: &'a [crate::vk::CommandBufferSubmitInfo<'a>], ) -> Self { - self.command_buffer_info_count = p_command_buffer_infos.len() as _; - self.p_command_buffer_infos = p_command_buffer_infos.as_ptr(); + self.command_buffer_info_count = command_buffer_infos.len() as _; + self.p_command_buffer_infos = command_buffer_infos.as_ptr(); self } pub fn signal_semaphore_info_count( @@ -3290,12 +3287,12 @@ pub(crate) mod reexport { self.signal_semaphore_info_count = signal_semaphore_info_count; self } - pub fn p_signal_semaphore_infos( + pub fn signal_semaphore_infos( mut self, - p_signal_semaphore_infos: &'a [crate::vk::SemaphoreSubmitInfo<'a>], + signal_semaphore_infos: &'a [crate::vk::SemaphoreSubmitInfo<'a>], ) -> Self { - self.signal_semaphore_info_count = p_signal_semaphore_infos.len() as _; - self.p_signal_semaphore_infos = p_signal_semaphore_infos.as_ptr(); + self.signal_semaphore_info_count = signal_semaphore_infos.len() as _; + self.p_signal_semaphore_infos = signal_semaphore_infos.as_ptr(); self } } @@ -3790,12 +3787,12 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_formats( + pub fn color_attachment_formats( mut self, - p_color_attachment_formats: &'a [crate::vk::Format], + color_attachment_formats: &'a [crate::vk::Format], ) -> Self { - self.color_attachment_count = p_color_attachment_formats.len() as _; - self.p_color_attachment_formats = p_color_attachment_formats.as_ptr(); + self.color_attachment_count = color_attachment_formats.len() as _; + self.p_color_attachment_formats = color_attachment_formats.as_ptr(); self } pub fn depth_attachment_format( @@ -3869,26 +3866,26 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachments( + pub fn color_attachments( mut self, - p_color_attachments: &'a [crate::vk::RenderingAttachmentInfo<'a>], + color_attachments: &'a [crate::vk::RenderingAttachmentInfo<'a>], ) -> Self { - self.color_attachment_count = p_color_attachments.len() as _; - self.p_color_attachments = p_color_attachments.as_ptr(); + self.color_attachment_count = color_attachments.len() as _; + self.p_color_attachments = color_attachments.as_ptr(); self } - pub fn p_depth_attachment( + pub fn depth_attachment( mut self, - p_depth_attachment: &'a crate::vk::RenderingAttachmentInfo<'a>, + depth_attachment: &'a crate::vk::RenderingAttachmentInfo<'a>, ) -> Self { - self.p_depth_attachment = p_depth_attachment; + self.p_depth_attachment = depth_attachment; self } - pub fn p_stencil_attachment( + pub fn stencil_attachment( mut self, - p_stencil_attachment: &'a crate::vk::RenderingAttachmentInfo<'a>, + stencil_attachment: &'a crate::vk::RenderingAttachmentInfo<'a>, ) -> Self { - self.p_stencil_attachment = p_stencil_attachment; + self.p_stencil_attachment = stencil_attachment; self } } @@ -3899,7 +3896,7 @@ pub(crate) mod reexport { pub p_next: *const core::ffi::c_void, pub image_view: crate::vk::ImageView, pub image_layout: crate::vk::ImageLayout, - pub resolve_mode: crate::vk::ResolveModeFlagBits, + pub resolve_mode: crate::vk::ResolveModeFlags, pub resolve_image_view: crate::vk::ImageView, pub resolve_image_layout: crate::vk::ImageLayout, pub load_op: crate::vk::AttachmentLoadOp, @@ -3938,7 +3935,7 @@ pub(crate) mod reexport { } pub fn resolve_mode( mut self, - resolve_mode: crate::vk::ResolveModeFlagBits, + resolve_mode: crate::vk::ResolveModeFlags, ) -> Self { self.resolve_mode = resolve_mode; self @@ -4013,7 +4010,7 @@ pub(crate) mod reexport { pub p_color_attachment_formats: *const crate::vk::Format, pub depth_attachment_format: crate::vk::Format, pub stencil_attachment_format: crate::vk::Format, - pub rasterization_samples: crate::vk::SampleCountFlagBits, + pub rasterization_samples: crate::vk::SampleCountFlags, pub _marker: ::core::marker::PhantomData<&'a ()>, } unsafe impl<'a> crate::TaggedStructure<'a> @@ -4051,12 +4048,12 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_formats( + pub fn color_attachment_formats( mut self, - p_color_attachment_formats: &'a [crate::vk::Format], + color_attachment_formats: &'a [crate::vk::Format], ) -> Self { - self.color_attachment_count = p_color_attachment_formats.len() as _; - self.p_color_attachment_formats = p_color_attachment_formats.as_ptr(); + self.color_attachment_count = color_attachment_formats.len() as _; + self.p_color_attachment_formats = color_attachment_formats.as_ptr(); self } pub fn depth_attachment_format( @@ -4075,7 +4072,7 @@ pub(crate) mod reexport { } pub fn rasterization_samples( mut self, - rasterization_samples: crate::vk::SampleCountFlagBits, + rasterization_samples: crate::vk::SampleCountFlags, ) -> Self { self.rasterization_samples = rasterization_samples; self diff --git a/ash-rewrite/src/generated/vk1_4.rs b/ash-rewrite/src/generated/vk1_4.rs index 5e05cda00..69331f13c 100644 --- a/ash-rewrite/src/generated/vk1_4.rs +++ b/ash-rewrite/src/generated/vk1_4.rs @@ -649,12 +649,12 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_formats( + pub fn color_attachment_formats( mut self, - p_color_attachment_formats: &'a [crate::vk::Format], + color_attachment_formats: &'a [crate::vk::Format], ) -> Self { - self.color_attachment_count = p_color_attachment_formats.len() as _; - self.p_color_attachment_formats = p_color_attachment_formats.as_ptr(); + self.color_attachment_count = color_attachment_formats.len() as _; + self.p_color_attachment_formats = color_attachment_formats.as_ptr(); self } pub fn depth_attachment_format( @@ -831,12 +831,12 @@ pub(crate) mod reexport { self.vertex_binding_divisor_count = vertex_binding_divisor_count; self } - pub fn p_vertex_binding_divisors( + pub fn vertex_binding_divisors( mut self, - p_vertex_binding_divisors: &'a [crate::vk::VertexInputBindingDivisorDescription], + vertex_binding_divisors: &'a [crate::vk::VertexInputBindingDivisorDescription], ) -> Self { - self.vertex_binding_divisor_count = p_vertex_binding_divisors.len() as _; - self.p_vertex_binding_divisors = p_vertex_binding_divisors.as_ptr(); + self.vertex_binding_divisor_count = vertex_binding_divisors.len() as _; + self.p_vertex_binding_divisors = vertex_binding_divisors.as_ptr(); self } } @@ -1501,24 +1501,24 @@ pub(crate) mod reexport { self.copy_src_layout_count = copy_src_layout_count; self } - pub fn p_copy_src_layouts( + pub fn copy_src_layouts( mut self, - p_copy_src_layouts: &'a mut [crate::vk::ImageLayout], + copy_src_layouts: &'a mut [crate::vk::ImageLayout], ) -> Self { - self.copy_src_layout_count = p_copy_src_layouts.len() as _; - self.p_copy_src_layouts = p_copy_src_layouts.as_mut_ptr(); + self.copy_src_layout_count = copy_src_layouts.len() as _; + self.p_copy_src_layouts = copy_src_layouts.as_mut_ptr(); self } pub fn copy_dst_layout_count(mut self, copy_dst_layout_count: u32) -> Self { self.copy_dst_layout_count = copy_dst_layout_count; self } - pub fn p_copy_dst_layouts( + pub fn copy_dst_layouts( mut self, - p_copy_dst_layouts: &'a mut [crate::vk::ImageLayout], + copy_dst_layouts: &'a mut [crate::vk::ImageLayout], ) -> Self { - self.copy_dst_layout_count = p_copy_dst_layouts.len() as _; - self.p_copy_dst_layouts = p_copy_dst_layouts.as_mut_ptr(); + self.copy_dst_layout_count = copy_dst_layouts.len() as _; + self.p_copy_dst_layouts = copy_dst_layouts.as_mut_ptr(); self } pub fn optimal_tiling_layout_uuid( @@ -1608,24 +1608,24 @@ pub(crate) mod reexport { self.copy_src_layout_count = copy_src_layout_count; self } - pub fn p_copy_src_layouts( + pub fn copy_src_layouts( mut self, - p_copy_src_layouts: &'a mut [crate::vk::ImageLayout], + copy_src_layouts: &'a mut [crate::vk::ImageLayout], ) -> Self { - self.copy_src_layout_count = p_copy_src_layouts.len() as _; - self.p_copy_src_layouts = p_copy_src_layouts.as_mut_ptr(); + self.copy_src_layout_count = copy_src_layouts.len() as _; + self.p_copy_src_layouts = copy_src_layouts.as_mut_ptr(); self } pub fn copy_dst_layout_count(mut self, copy_dst_layout_count: u32) -> Self { self.copy_dst_layout_count = copy_dst_layout_count; self } - pub fn p_copy_dst_layouts( + pub fn copy_dst_layouts( mut self, - p_copy_dst_layouts: &'a mut [crate::vk::ImageLayout], + copy_dst_layouts: &'a mut [crate::vk::ImageLayout], ) -> Self { - self.copy_dst_layout_count = p_copy_dst_layouts.len() as _; - self.p_copy_dst_layouts = p_copy_dst_layouts.as_mut_ptr(); + self.copy_dst_layout_count = copy_dst_layouts.len() as _; + self.p_copy_dst_layouts = copy_dst_layouts.as_mut_ptr(); self } pub fn optimal_tiling_layout_uuid( @@ -1676,8 +1676,8 @@ pub(crate) mod reexport { } } impl<'a> MemoryToImageCopy<'a> { - pub fn p_host_pointer(mut self, p_host_pointer: &'a core::ffi::c_void) -> Self { - self.p_host_pointer = p_host_pointer; + pub fn host_pointer(mut self, host_pointer: &'a core::ffi::c_void) -> Self { + self.p_host_pointer = host_pointer; self } pub fn memory_row_length(mut self, memory_row_length: u32) -> Self { @@ -1736,11 +1736,8 @@ pub(crate) mod reexport { } } impl<'a> ImageToMemoryCopy<'a> { - pub fn p_host_pointer( - mut self, - p_host_pointer: &'a mut core::ffi::c_void, - ) -> Self { - self.p_host_pointer = p_host_pointer; + pub fn host_pointer(mut self, host_pointer: &'a mut core::ffi::c_void) -> Self { + self.p_host_pointer = host_pointer; self } pub fn memory_row_length(mut self, memory_row_length: u32) -> Self { @@ -1816,12 +1813,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::MemoryToImageCopy<'a>], + regions: &'a [crate::vk::MemoryToImageCopy<'a>], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -1874,12 +1871,12 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions( + pub fn regions( mut self, - p_regions: &'a [crate::vk::ImageToMemoryCopy<'a>], + regions: &'a [crate::vk::ImageToMemoryCopy<'a>], ) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -1947,9 +1944,9 @@ pub(crate) mod reexport { self.region_count = region_count; self } - pub fn p_regions(mut self, p_regions: &'a [crate::vk::ImageCopy2<'a>]) -> Self { - self.region_count = p_regions.len() as _; - self.p_regions = p_regions.as_ptr(); + pub fn regions(mut self, regions: &'a [crate::vk::ImageCopy2<'a>]) -> Self { + self.region_count = regions.len() as _; + self.p_regions = regions.as_ptr(); self } } @@ -2342,18 +2339,18 @@ pub(crate) mod reexport { } } impl<'a> DeviceImageSubresourceInfo<'a> { - pub fn p_create_info( + pub fn create_info( mut self, - p_create_info: &'a crate::vk::ImageCreateInfo<'a>, + create_info: &'a crate::vk::ImageCreateInfo<'a>, ) -> Self { - self.p_create_info = p_create_info; + self.p_create_info = create_info; self } - pub fn p_subresource( + pub fn subresource( mut self, - p_subresource: &'a crate::vk::ImageSubresource2<'a>, + subresource: &'a crate::vk::ImageSubresource2<'a>, ) -> Self { - self.p_subresource = p_subresource; + self.p_subresource = subresource; self } } @@ -2461,8 +2458,8 @@ pub(crate) mod reexport { } } impl<'a> BindMemoryStatus<'a> { - pub fn p_result(mut self, p_result: &'a mut crate::vk::Result) -> Self { - self.p_result = p_result; + pub fn result(mut self, result: &'a mut crate::vk::Result) -> Self { + self.p_result = result; self } } @@ -2516,21 +2513,21 @@ pub(crate) mod reexport { self.descriptor_set_count = descriptor_set_count; self } - pub fn p_descriptor_sets( + pub fn descriptor_sets( mut self, - p_descriptor_sets: &'a [crate::vk::DescriptorSet], + descriptor_sets: &'a [crate::vk::DescriptorSet], ) -> Self { - self.descriptor_set_count = p_descriptor_sets.len() as _; - self.p_descriptor_sets = p_descriptor_sets.as_ptr(); + self.descriptor_set_count = descriptor_sets.len() as _; + self.p_descriptor_sets = descriptor_sets.as_ptr(); self } pub fn dynamic_offset_count(mut self, dynamic_offset_count: u32) -> Self { self.dynamic_offset_count = dynamic_offset_count; self } - pub fn p_dynamic_offsets(mut self, p_dynamic_offsets: &'a [u32]) -> Self { - self.dynamic_offset_count = p_dynamic_offsets.len() as _; - self.p_dynamic_offsets = p_dynamic_offsets.as_ptr(); + pub fn dynamic_offsets(mut self, dynamic_offsets: &'a [u32]) -> Self { + self.dynamic_offset_count = dynamic_offsets.len() as _; + self.p_dynamic_offsets = dynamic_offsets.as_ptr(); self } } @@ -2580,9 +2577,9 @@ pub(crate) mod reexport { self.size = size; self } - pub fn p_values(mut self, p_values: &'a [u8]) -> Self { - self.size = p_values.len() as _; - self.p_values = p_values.as_ptr().cast(); + pub fn values(mut self, values: &'a [u8]) -> Self { + self.size = values.len() as _; + self.p_values = values.as_ptr().cast(); self } } @@ -2632,12 +2629,12 @@ pub(crate) mod reexport { self.descriptor_write_count = descriptor_write_count; self } - pub fn p_descriptor_writes( + pub fn descriptor_writes( mut self, - p_descriptor_writes: &'a [crate::vk::WriteDescriptorSet<'a>], + descriptor_writes: &'a [crate::vk::WriteDescriptorSet<'a>], ) -> Self { - self.descriptor_write_count = p_descriptor_writes.len() as _; - self.p_descriptor_writes = p_descriptor_writes.as_ptr(); + self.descriptor_write_count = descriptor_writes.len() as _; + self.p_descriptor_writes = descriptor_writes.as_ptr(); self } } @@ -2685,8 +2682,8 @@ pub(crate) mod reexport { self.set = set; self } - pub fn p_data(mut self, p_data: &'a core::ffi::c_void) -> Self { - self.p_data = p_data; + pub fn data(mut self, data: &'a core::ffi::c_void) -> Self { + self.p_data = data; self } } @@ -2863,12 +2860,12 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_locations( + pub fn color_attachment_locations( mut self, - p_color_attachment_locations: &'a [u32], + color_attachment_locations: &'a [u32], ) -> Self { - self.color_attachment_count = p_color_attachment_locations.len() as _; - self.p_color_attachment_locations = p_color_attachment_locations.as_ptr(); + self.color_attachment_count = color_attachment_locations.len() as _; + self.p_color_attachment_locations = color_attachment_locations.as_ptr(); self } } @@ -2909,27 +2906,27 @@ pub(crate) mod reexport { self.color_attachment_count = color_attachment_count; self } - pub fn p_color_attachment_input_indices( + pub fn color_attachment_input_indices( mut self, - p_color_attachment_input_indices: &'a [u32], + color_attachment_input_indices: &'a [u32], ) -> Self { - self.color_attachment_count = p_color_attachment_input_indices.len() as _; - self.p_color_attachment_input_indices = p_color_attachment_input_indices + self.color_attachment_count = color_attachment_input_indices.len() as _; + self.p_color_attachment_input_indices = color_attachment_input_indices .as_ptr(); self } - pub fn p_depth_input_attachment_index( + pub fn depth_input_attachment_index( mut self, - p_depth_input_attachment_index: &'a u32, + depth_input_attachment_index: &'a u32, ) -> Self { - self.p_depth_input_attachment_index = p_depth_input_attachment_index; + self.p_depth_input_attachment_index = depth_input_attachment_index; self } - pub fn p_stencil_input_attachment_index( + pub fn stencil_input_attachment_index( mut self, - p_stencil_input_attachment_index: &'a u32, + stencil_input_attachment_index: &'a u32, ) -> Self { - self.p_stencil_input_attachment_index = p_stencil_input_attachment_index; + self.p_stencil_input_attachment_index = stencil_input_attachment_index; self } } diff --git a/ash-rewrite/src/instance.rs b/ash-rewrite/src/instance.rs index 7daccfd69..10fe53063 100644 --- a/ash-rewrite/src/instance.rs +++ b/ash-rewrite/src/instance.rs @@ -1,557 +1,557 @@ -#![allow(clippy::missing_safety_doc)] -use super::Device; -#[cfg(doc)] -use super::Entry; -use crate::read_into_uninitialized_vector; -use crate::vk; -use crate::RawPtr; -use crate::VkResult; -use alloc::vec::Vec; -use core::ffi; -use core::mem; -use core::ptr; - -/// -#[derive(Clone)] -pub struct Instance { - pub(crate) handle: vk::Instance, - - pub(crate) instance_fn_1_0: crate::InstanceFnV1_0, - pub(crate) instance_fn_1_1: crate::InstanceFnV1_1, - pub(crate) instance_fn_1_3: crate::InstanceFnV1_3, -} - -impl Instance { - pub unsafe fn load(static_fn: &crate::StaticFn, instance: vk::Instance) -> Self { - Self::load_with( - |name| mem::transmute((static_fn.get_instance_proc_addr)(instance, name.as_ptr())), - instance, - ) - } - - pub unsafe fn load_with( - mut load_fn: impl FnMut(&ffi::CStr) -> *const ffi::c_void, - instance: vk::Instance, - ) -> Self { - Self::from_parts_1_3( - instance, - crate::InstanceFnV1_0::load(&mut load_fn), - crate::InstanceFnV1_1::load(&mut load_fn), - crate::InstanceFnV1_3::load(&mut load_fn), - ) - } - - #[inline] - pub fn from_parts_1_3( - handle: vk::Instance, - instance_fn_1_0: crate::InstanceFnV1_0, - instance_fn_1_1: crate::InstanceFnV1_1, - instance_fn_1_3: crate::InstanceFnV1_3, - ) -> Self { - Self { - handle, - - instance_fn_1_0, - instance_fn_1_1, - instance_fn_1_3, - } - } - - #[inline] - pub fn handle(&self) -> vk::Instance { - self.handle - } -} - -/// Vulkan core 1.3 -impl Instance { - #[inline] - pub fn fp_v1_3(&self) -> &crate::InstanceFnV1_3 { - &self.instance_fn_1_3 - } - - /// Retrieve the number of elements to pass to [`get_physical_device_tool_properties()`][Self::get_physical_device_tool_properties()] - #[inline] - pub unsafe fn get_physical_device_tool_properties_len( - &self, - physical_device: vk::PhysicalDevice, - ) -> VkResult { - let mut count = mem::MaybeUninit::uninit(); - (self.instance_fn_1_3.get_physical_device_tool_properties)( - physical_device, - count.as_mut_ptr(), - ptr::null_mut(), - ) - .assume_init_on_success(count) - .map(|c| c as usize) - } - - /// - /// - /// Call [`get_physical_device_tool_properties_len()`][Self::get_physical_device_tool_properties_len()] to query the number of elements to pass to `out`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. - #[inline] - pub unsafe fn get_physical_device_tool_properties( - &self, - physical_device: vk::PhysicalDevice, - out: &mut [vk::PhysicalDeviceToolProperties<'_>], - ) -> VkResult<()> { - let mut count = out.len() as u32; - (self.instance_fn_1_3.get_physical_device_tool_properties)( - physical_device, - &mut count, - out.as_mut_ptr(), - ) - .result()?; - assert_eq!(count as usize, out.len()); - Ok(()) - } -} - -/// Vulkan core 1.1 -impl Instance { - #[inline] - pub fn fp_v1_1(&self) -> &crate::InstanceFnV1_1 { - &self.instance_fn_1_1 - } - - /// Retrieve the number of elements to pass to [`enumerate_physical_device_groups()`][Self::enumerate_physical_device_groups()] - #[inline] - pub unsafe fn enumerate_physical_device_groups_len(&self) -> VkResult { - let mut group_count = mem::MaybeUninit::uninit(); - (self.instance_fn_1_1.enumerate_physical_device_groups)( - self.handle, - group_count.as_mut_ptr(), - ptr::null_mut(), - ) - .assume_init_on_success(group_count) - .map(|c| c as usize) - } - - /// - /// - /// Call [`enumerate_physical_device_groups_len()`][Self::enumerate_physical_device_groups_len()] to query the number of elements to pass to `out`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. - #[inline] - pub unsafe fn enumerate_physical_device_groups( - &self, - out: &mut [vk::PhysicalDeviceGroupProperties<'_>], - ) -> VkResult<()> { - let mut count = out.len() as u32; - (self.instance_fn_1_1.enumerate_physical_device_groups)( - self.handle, - &mut count, - out.as_mut_ptr(), - ) - .result()?; - assert_eq!(count as usize, out.len()); - Ok(()) - } - - /// - #[inline] - pub unsafe fn get_physical_device_features2( - &self, - physical_device: vk::PhysicalDevice, - features: &mut vk::PhysicalDeviceFeatures2<'_>, - ) { - (self.instance_fn_1_1.get_physical_device_features2)(physical_device, features) - } - - /// - #[inline] - pub unsafe fn get_physical_device_properties2( - &self, - physical_device: vk::PhysicalDevice, - prop: &mut vk::PhysicalDeviceProperties2<'_>, - ) { - (self.instance_fn_1_1.get_physical_device_properties2)(physical_device, prop) - } - - /// - #[inline] - pub unsafe fn get_physical_device_format_properties2( - &self, - physical_device: vk::PhysicalDevice, - format: vk::Format, - out: &mut vk::FormatProperties2<'_>, - ) { - (self.instance_fn_1_1.get_physical_device_format_properties2)(physical_device, format, out) - } - - /// - #[inline] - pub unsafe fn get_physical_device_image_format_properties2( - &self, - physical_device: vk::PhysicalDevice, - format_info: &vk::PhysicalDeviceImageFormatInfo2<'_>, - image_format_prop: &mut vk::ImageFormatProperties2<'_>, - ) -> VkResult<()> { - (self - .instance_fn_1_1 - .get_physical_device_image_format_properties2)( - physical_device, - format_info, - image_format_prop, - ) - .result() - } - - /// Retrieve the number of elements to pass to [`get_physical_device_queue_family_properties2()`][Self::get_physical_device_queue_family_properties2()] - #[inline] - pub unsafe fn get_physical_device_queue_family_properties2_len( - &self, - physical_device: vk::PhysicalDevice, - ) -> usize { - let mut queue_count = mem::MaybeUninit::uninit(); - (self - .instance_fn_1_1 - .get_physical_device_queue_family_properties2)( - physical_device, - queue_count.as_mut_ptr(), - ptr::null_mut(), - ); - queue_count.assume_init() as usize - } - - /// - /// - /// Call [`get_physical_device_queue_family_properties2_len()`][Self::get_physical_device_queue_family_properties2_len()] to query the number of elements to pass to `out`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. - #[inline] - pub unsafe fn get_physical_device_queue_family_properties2( - &self, - physical_device: vk::PhysicalDevice, - out: &mut [vk::QueueFamilyProperties2<'_>], - ) { - let mut count = out.len() as u32; - (self - .instance_fn_1_1 - .get_physical_device_queue_family_properties2)( - physical_device, - &mut count, - out.as_mut_ptr(), - ); - assert_eq!(count as usize, out.len()); - } - - /// - #[inline] - pub unsafe fn get_physical_device_memory_properties2( - &self, - physical_device: vk::PhysicalDevice, - out: &mut vk::PhysicalDeviceMemoryProperties2<'_>, - ) { - (self.instance_fn_1_1.get_physical_device_memory_properties2)(physical_device, out) - } - - /// Retrieve the number of elements to pass to [`get_physical_device_sparse_image_format_properties2()`][Self::get_physical_device_sparse_image_format_properties2()] - #[inline] - pub unsafe fn get_physical_device_sparse_image_format_properties2_len( - &self, - physical_device: vk::PhysicalDevice, - format_info: &vk::PhysicalDeviceSparseImageFormatInfo2<'_>, - ) -> usize { - let mut format_count = mem::MaybeUninit::uninit(); - (self - .instance_fn_1_1 - .get_physical_device_sparse_image_format_properties2)( - physical_device, - format_info, - format_count.as_mut_ptr(), - ptr::null_mut(), - ); - format_count.assume_init() as usize - } - - /// - /// - /// Call [`get_physical_device_sparse_image_format_properties2_len()`][Self::get_physical_device_sparse_image_format_properties2_len()] to query the number of elements to pass to `out`. - /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. - #[inline] - pub unsafe fn get_physical_device_sparse_image_format_properties2( - &self, - physical_device: vk::PhysicalDevice, - format_info: &vk::PhysicalDeviceSparseImageFormatInfo2<'_>, - out: &mut [vk::SparseImageFormatProperties2<'_>], - ) { - let mut count = out.len() as u32; - (self - .instance_fn_1_1 - .get_physical_device_sparse_image_format_properties2)( - physical_device, - format_info, - &mut count, - out.as_mut_ptr(), - ); - assert_eq!(count as usize, out.len()); - } - - /// - #[inline] - pub unsafe fn get_physical_device_external_buffer_properties( - &self, - physical_device: vk::PhysicalDevice, - external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo<'_>, - out: &mut vk::ExternalBufferProperties<'_>, - ) { - (self - .instance_fn_1_1 - .get_physical_device_external_buffer_properties)( - physical_device, - external_buffer_info, - out, - ) - } - - /// - #[inline] - pub unsafe fn get_physical_device_external_fence_properties( - &self, - physical_device: vk::PhysicalDevice, - external_fence_info: &vk::PhysicalDeviceExternalFenceInfo<'_>, - out: &mut vk::ExternalFenceProperties<'_>, - ) { - (self - .instance_fn_1_1 - .get_physical_device_external_fence_properties)( - physical_device, - external_fence_info, - out, - ) - } - - /// - #[inline] - pub unsafe fn get_physical_device_external_semaphore_properties( - &self, - physical_device: vk::PhysicalDevice, - external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo<'_>, - out: &mut vk::ExternalSemaphoreProperties<'_>, - ) { - (self - .instance_fn_1_1 - .get_physical_device_external_semaphore_properties)( - physical_device, - external_semaphore_info, - out, - ) - } -} - -/// Vulkan core 1.0 -impl Instance { - #[inline] - pub fn fp_v1_0(&self) -> &crate::InstanceFnV1_0 { - &self.instance_fn_1_0 - } - - /// - /// - /// # Safety - /// - /// There is a [parent/child relation] between [`Instance`] and the resulting [`Device`]. The - /// application must not [destroy][Instance::destroy_instance()] the parent [`Instance`] object - /// before first [destroying][Device::destroy_device()] the returned [`Device`] child object. - /// [`Device`] does _not_ implement [drop][drop()] semantics and can only be destroyed via - /// [`destroy_device()`][Device::destroy_device()]. - /// - /// See the [`Entry::create_instance()`] documentation for more destruction ordering rules on - /// [`Instance`]. - /// - /// [parent/child relation]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fundamentals-objectmodel-lifetime - #[inline] - pub unsafe fn create_device( - &self, - physical_device: vk::PhysicalDevice, - create_info: &vk::DeviceCreateInfo<'_>, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut device = mem::MaybeUninit::uninit(); - let device = (self.instance_fn_1_0.create_device)( - physical_device, - create_info, - allocation_callbacks.to_raw_ptr(), - device.as_mut_ptr(), - ) - .assume_init_on_success(device)?; - Ok(Device::load(&self.instance_fn_1_0, device)) - } - - /// - #[inline] - pub unsafe fn get_device_proc_addr( - &self, - device: vk::Device, - p_name: *const ffi::c_char, - ) -> vk::PFN_vkVoidFunction { - (self.instance_fn_1_0.get_device_proc_addr)(device, p_name) - } - - /// - #[inline] - pub unsafe fn destroy_instance(&self, allocation_callbacks: Option<&vk::AllocationCallbacks>) { - (self.instance_fn_1_0.destroy_instance)(self.handle, allocation_callbacks.to_raw_ptr()) - } - - /// - #[inline] - pub unsafe fn get_physical_device_format_properties( - &self, - physical_device: vk::PhysicalDevice, - format: vk::Format, - ) -> vk::FormatProperties { - let mut format_prop = mem::MaybeUninit::uninit(); - (self.instance_fn_1_0.get_physical_device_format_properties)( - physical_device, - format, - format_prop.as_mut_ptr(), - ); - format_prop.assume_init() - } - - /// - #[inline] - pub unsafe fn get_physical_device_image_format_properties( - &self, - physical_device: vk::PhysicalDevice, - format: vk::Format, - typ: vk::ImageType, - tiling: vk::ImageTiling, - usage: vk::ImageUsageFlags, - flags: vk::ImageCreateFlags, - ) -> VkResult { - let mut image_format_prop = mem::MaybeUninit::uninit(); - (self - .instance_fn_1_0 - .get_physical_device_image_format_properties)( - physical_device, - format, - typ, - tiling, - usage, - flags, - image_format_prop.as_mut_ptr(), - ) - .assume_init_on_success(image_format_prop) - } - - /// - #[inline] - pub unsafe fn get_physical_device_memory_properties( - &self, - physical_device: vk::PhysicalDevice, - ) -> vk::PhysicalDeviceMemoryProperties { - let mut memory_prop = mem::MaybeUninit::uninit(); - (self.instance_fn_1_0.get_physical_device_memory_properties)( - physical_device, - memory_prop.as_mut_ptr(), - ); - memory_prop.assume_init() - } - - /// - #[inline] - pub unsafe fn get_physical_device_properties( - &self, - physical_device: vk::PhysicalDevice, - ) -> vk::PhysicalDeviceProperties { - let mut prop = mem::MaybeUninit::uninit(); - (self.instance_fn_1_0.get_physical_device_properties)(physical_device, prop.as_mut_ptr()); - prop.assume_init() - } - - /// - #[inline] - pub unsafe fn get_physical_device_queue_family_properties( - &self, - physical_device: vk::PhysicalDevice, - ) -> Vec { - read_into_uninitialized_vector(|count, data| { - (self - .instance_fn_1_0 - .get_physical_device_queue_family_properties)( - physical_device, count, data - ); - vk::Result::SUCCESS - }) - // The closure always returns SUCCESS - .unwrap() - } - - /// - #[inline] - pub unsafe fn get_physical_device_features( - &self, - physical_device: vk::PhysicalDevice, - ) -> vk::PhysicalDeviceFeatures { - let mut prop = mem::MaybeUninit::uninit(); - (self.instance_fn_1_0.get_physical_device_features)(physical_device, prop.as_mut_ptr()); - prop.assume_init() - } - - /// - #[inline] - pub unsafe fn enumerate_physical_devices(&self) -> VkResult> { - read_into_uninitialized_vector(|count, data| { - (self.instance_fn_1_0.enumerate_physical_devices)(self.handle, count, data) - }) - } - - /// - #[inline] - pub unsafe fn enumerate_device_extension_properties( - &self, - device: vk::PhysicalDevice, - ) -> VkResult> { - read_into_uninitialized_vector(|count, data| { - (self.instance_fn_1_0.enumerate_device_extension_properties)( - device, - ptr::null(), - count, - data, - ) - }) - } - - /// - #[inline] - pub unsafe fn enumerate_device_layer_properties( - &self, - device: vk::PhysicalDevice, - ) -> VkResult> { - read_into_uninitialized_vector(|count, data| { - (self.instance_fn_1_0.enumerate_device_layer_properties)(device, count, data) - }) - } - - /// - #[inline] - pub unsafe fn get_physical_device_sparse_image_format_properties( - &self, - physical_device: vk::PhysicalDevice, - format: vk::Format, - typ: vk::ImageType, - samples: vk::SampleCountFlagBits, - usage: vk::ImageUsageFlags, - tiling: vk::ImageTiling, - ) -> Vec { - read_into_uninitialized_vector(|count, data| { - (self - .instance_fn_1_0 - .get_physical_device_sparse_image_format_properties)( - physical_device, - format, - typ, - samples, - usage, - tiling, - count, - data, - ); - vk::Result::SUCCESS - }) - // The closure always returns SUCCESS - .unwrap() - } -} +#![allow(clippy::missing_safety_doc)] +use super::Device; +#[cfg(doc)] +use super::Entry; +use crate::read_into_uninitialized_vector; +use crate::vk; +use crate::RawPtr; +use crate::VkResult; +use alloc::vec::Vec; +use core::ffi; +use core::mem; +use core::ptr; + +/// +#[derive(Clone)] +pub struct Instance { + pub(crate) handle: vk::Instance, + + pub(crate) instance_fn_1_0: crate::InstanceFnV1_0, + pub(crate) instance_fn_1_1: crate::InstanceFnV1_1, + pub(crate) instance_fn_1_3: crate::InstanceFnV1_3, +} + +impl Instance { + pub unsafe fn load(static_fn: &crate::StaticFn, instance: vk::Instance) -> Self { + Self::load_with( + |name| mem::transmute((static_fn.get_instance_proc_addr)(instance, name.as_ptr())), + instance, + ) + } + + pub unsafe fn load_with( + mut load_fn: impl FnMut(&ffi::CStr) -> *const ffi::c_void, + instance: vk::Instance, + ) -> Self { + Self::from_parts_1_3( + instance, + crate::InstanceFnV1_0::load(&mut load_fn), + crate::InstanceFnV1_1::load(&mut load_fn), + crate::InstanceFnV1_3::load(&mut load_fn), + ) + } + + #[inline] + pub fn from_parts_1_3( + handle: vk::Instance, + instance_fn_1_0: crate::InstanceFnV1_0, + instance_fn_1_1: crate::InstanceFnV1_1, + instance_fn_1_3: crate::InstanceFnV1_3, + ) -> Self { + Self { + handle, + + instance_fn_1_0, + instance_fn_1_1, + instance_fn_1_3, + } + } + + #[inline] + pub fn handle(&self) -> vk::Instance { + self.handle + } +} + +/// Vulkan core 1.3 +impl Instance { + #[inline] + pub fn fp_v1_3(&self) -> &crate::InstanceFnV1_3 { + &self.instance_fn_1_3 + } + + /// Retrieve the number of elements to pass to [`get_physical_device_tool_properties()`][Self::get_physical_device_tool_properties()] + #[inline] + pub unsafe fn get_physical_device_tool_properties_len( + &self, + physical_device: vk::PhysicalDevice, + ) -> VkResult { + let mut count = mem::MaybeUninit::uninit(); + (self.instance_fn_1_3.get_physical_device_tool_properties)( + physical_device, + count.as_mut_ptr(), + ptr::null_mut(), + ) + .assume_init_on_success(count) + .map(|c| c as usize) + } + + /// + /// + /// Call [`get_physical_device_tool_properties_len()`][Self::get_physical_device_tool_properties_len()] to query the number of elements to pass to `out`. + /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. + #[inline] + pub unsafe fn get_physical_device_tool_properties( + &self, + physical_device: vk::PhysicalDevice, + out: &mut [vk::PhysicalDeviceToolProperties<'_>], + ) -> VkResult<()> { + let mut count = out.len() as u32; + (self.instance_fn_1_3.get_physical_device_tool_properties)( + physical_device, + &mut count, + out.as_mut_ptr(), + ) + .result()?; + assert_eq!(count as usize, out.len()); + Ok(()) + } +} + +/// Vulkan core 1.1 +impl Instance { + #[inline] + pub fn fp_v1_1(&self) -> &crate::InstanceFnV1_1 { + &self.instance_fn_1_1 + } + + /// Retrieve the number of elements to pass to [`enumerate_physical_device_groups()`][Self::enumerate_physical_device_groups()] + #[inline] + pub unsafe fn enumerate_physical_device_groups_len(&self) -> VkResult { + let mut group_count = mem::MaybeUninit::uninit(); + (self.instance_fn_1_1.enumerate_physical_device_groups)( + self.handle, + group_count.as_mut_ptr(), + ptr::null_mut(), + ) + .assume_init_on_success(group_count) + .map(|c| c as usize) + } + + /// + /// + /// Call [`enumerate_physical_device_groups_len()`][Self::enumerate_physical_device_groups_len()] to query the number of elements to pass to `out`. + /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. + #[inline] + pub unsafe fn enumerate_physical_device_groups( + &self, + out: &mut [vk::PhysicalDeviceGroupProperties<'_>], + ) -> VkResult<()> { + let mut count = out.len() as u32; + (self.instance_fn_1_1.enumerate_physical_device_groups)( + self.handle, + &mut count, + out.as_mut_ptr(), + ) + .result()?; + assert_eq!(count as usize, out.len()); + Ok(()) + } + + /// + #[inline] + pub unsafe fn get_physical_device_features2( + &self, + physical_device: vk::PhysicalDevice, + features: &mut vk::PhysicalDeviceFeatures2<'_>, + ) { + (self.instance_fn_1_1.get_physical_device_features2)(physical_device, features) + } + + /// + #[inline] + pub unsafe fn get_physical_device_properties2( + &self, + physical_device: vk::PhysicalDevice, + prop: &mut vk::PhysicalDeviceProperties2<'_>, + ) { + (self.instance_fn_1_1.get_physical_device_properties2)(physical_device, prop) + } + + /// + #[inline] + pub unsafe fn get_physical_device_format_properties2( + &self, + physical_device: vk::PhysicalDevice, + format: vk::Format, + out: &mut vk::FormatProperties2<'_>, + ) { + (self.instance_fn_1_1.get_physical_device_format_properties2)(physical_device, format, out) + } + + /// + #[inline] + pub unsafe fn get_physical_device_image_format_properties2( + &self, + physical_device: vk::PhysicalDevice, + format_info: &vk::PhysicalDeviceImageFormatInfo2<'_>, + image_format_prop: &mut vk::ImageFormatProperties2<'_>, + ) -> VkResult<()> { + (self + .instance_fn_1_1 + .get_physical_device_image_format_properties2)( + physical_device, + format_info, + image_format_prop, + ) + .result() + } + + /// Retrieve the number of elements to pass to [`get_physical_device_queue_family_properties2()`][Self::get_physical_device_queue_family_properties2()] + #[inline] + pub unsafe fn get_physical_device_queue_family_properties2_len( + &self, + physical_device: vk::PhysicalDevice, + ) -> usize { + let mut queue_count = mem::MaybeUninit::uninit(); + (self + .instance_fn_1_1 + .get_physical_device_queue_family_properties2)( + physical_device, + queue_count.as_mut_ptr(), + ptr::null_mut(), + ); + queue_count.assume_init() as usize + } + + /// + /// + /// Call [`get_physical_device_queue_family_properties2_len()`][Self::get_physical_device_queue_family_properties2_len()] to query the number of elements to pass to `out`. + /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. + #[inline] + pub unsafe fn get_physical_device_queue_family_properties2( + &self, + physical_device: vk::PhysicalDevice, + out: &mut [vk::QueueFamilyProperties2<'_>], + ) { + let mut count = out.len() as u32; + (self + .instance_fn_1_1 + .get_physical_device_queue_family_properties2)( + physical_device, + &mut count, + out.as_mut_ptr(), + ); + assert_eq!(count as usize, out.len()); + } + + /// + #[inline] + pub unsafe fn get_physical_device_memory_properties2( + &self, + physical_device: vk::PhysicalDevice, + out: &mut vk::PhysicalDeviceMemoryProperties2<'_>, + ) { + (self.instance_fn_1_1.get_physical_device_memory_properties2)(physical_device, out) + } + + /// Retrieve the number of elements to pass to [`get_physical_device_sparse_image_format_properties2()`][Self::get_physical_device_sparse_image_format_properties2()] + #[inline] + pub unsafe fn get_physical_device_sparse_image_format_properties2_len( + &self, + physical_device: vk::PhysicalDevice, + format_info: &vk::PhysicalDeviceSparseImageFormatInfo2<'_>, + ) -> usize { + let mut format_count = mem::MaybeUninit::uninit(); + (self + .instance_fn_1_1 + .get_physical_device_sparse_image_format_properties2)( + physical_device, + format_info, + format_count.as_mut_ptr(), + ptr::null_mut(), + ); + format_count.assume_init() as usize + } + + /// + /// + /// Call [`get_physical_device_sparse_image_format_properties2_len()`][Self::get_physical_device_sparse_image_format_properties2_len()] to query the number of elements to pass to `out`. + /// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer. + #[inline] + pub unsafe fn get_physical_device_sparse_image_format_properties2( + &self, + physical_device: vk::PhysicalDevice, + format_info: &vk::PhysicalDeviceSparseImageFormatInfo2<'_>, + out: &mut [vk::SparseImageFormatProperties2<'_>], + ) { + let mut count = out.len() as u32; + (self + .instance_fn_1_1 + .get_physical_device_sparse_image_format_properties2)( + physical_device, + format_info, + &mut count, + out.as_mut_ptr(), + ); + assert_eq!(count as usize, out.len()); + } + + /// + #[inline] + pub unsafe fn get_physical_device_external_buffer_properties( + &self, + physical_device: vk::PhysicalDevice, + external_buffer_info: &vk::PhysicalDeviceExternalBufferInfo<'_>, + out: &mut vk::ExternalBufferProperties<'_>, + ) { + (self + .instance_fn_1_1 + .get_physical_device_external_buffer_properties)( + physical_device, + external_buffer_info, + out, + ) + } + + /// + #[inline] + pub unsafe fn get_physical_device_external_fence_properties( + &self, + physical_device: vk::PhysicalDevice, + external_fence_info: &vk::PhysicalDeviceExternalFenceInfo<'_>, + out: &mut vk::ExternalFenceProperties<'_>, + ) { + (self + .instance_fn_1_1 + .get_physical_device_external_fence_properties)( + physical_device, + external_fence_info, + out, + ) + } + + /// + #[inline] + pub unsafe fn get_physical_device_external_semaphore_properties( + &self, + physical_device: vk::PhysicalDevice, + external_semaphore_info: &vk::PhysicalDeviceExternalSemaphoreInfo<'_>, + out: &mut vk::ExternalSemaphoreProperties<'_>, + ) { + (self + .instance_fn_1_1 + .get_physical_device_external_semaphore_properties)( + physical_device, + external_semaphore_info, + out, + ) + } +} + +/// Vulkan core 1.0 +impl Instance { + #[inline] + pub fn fp_v1_0(&self) -> &crate::InstanceFnV1_0 { + &self.instance_fn_1_0 + } + + /// + /// + /// # Safety + /// + /// There is a [parent/child relation] between [`Instance`] and the resulting [`Device`]. The + /// application must not [destroy][Instance::destroy_instance()] the parent [`Instance`] object + /// before first [destroying][Device::destroy_device()] the returned [`Device`] child object. + /// [`Device`] does _not_ implement [drop][drop()] semantics and can only be destroyed via + /// [`destroy_device()`][Device::destroy_device()]. + /// + /// See the [`Entry::create_instance()`] documentation for more destruction ordering rules on + /// [`Instance`]. + /// + /// [parent/child relation]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fundamentals-objectmodel-lifetime + #[inline] + pub unsafe fn create_device( + &self, + physical_device: vk::PhysicalDevice, + create_info: &vk::DeviceCreateInfo<'_>, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut device = mem::MaybeUninit::uninit(); + let device = (self.instance_fn_1_0.create_device)( + physical_device, + create_info, + allocation_callbacks.to_raw_ptr(), + device.as_mut_ptr(), + ) + .assume_init_on_success(device)?; + Ok(Device::load(&self.instance_fn_1_0, device)) + } + + /// + #[inline] + pub unsafe fn get_device_proc_addr( + &self, + device: vk::Device, + p_name: *const ffi::c_char, + ) -> vk::PFN_vkVoidFunction { + (self.instance_fn_1_0.get_device_proc_addr)(device, p_name) + } + + /// + #[inline] + pub unsafe fn destroy_instance(&self, allocation_callbacks: Option<&vk::AllocationCallbacks>) { + (self.instance_fn_1_0.destroy_instance)(self.handle, allocation_callbacks.to_raw_ptr()) + } + + /// + #[inline] + pub unsafe fn get_physical_device_format_properties( + &self, + physical_device: vk::PhysicalDevice, + format: vk::Format, + ) -> vk::FormatProperties { + let mut format_prop = mem::MaybeUninit::uninit(); + (self.instance_fn_1_0.get_physical_device_format_properties)( + physical_device, + format, + format_prop.as_mut_ptr(), + ); + format_prop.assume_init() + } + + /// + #[inline] + pub unsafe fn get_physical_device_image_format_properties( + &self, + physical_device: vk::PhysicalDevice, + format: vk::Format, + typ: vk::ImageType, + tiling: vk::ImageTiling, + usage: vk::ImageUsageFlags, + flags: vk::ImageCreateFlags, + ) -> VkResult { + let mut image_format_prop = mem::MaybeUninit::uninit(); + (self + .instance_fn_1_0 + .get_physical_device_image_format_properties)( + physical_device, + format, + typ, + tiling, + usage, + flags, + image_format_prop.as_mut_ptr(), + ) + .assume_init_on_success(image_format_prop) + } + + /// + #[inline] + pub unsafe fn get_physical_device_memory_properties( + &self, + physical_device: vk::PhysicalDevice, + ) -> vk::PhysicalDeviceMemoryProperties { + let mut memory_prop = mem::MaybeUninit::uninit(); + (self.instance_fn_1_0.get_physical_device_memory_properties)( + physical_device, + memory_prop.as_mut_ptr(), + ); + memory_prop.assume_init() + } + + /// + #[inline] + pub unsafe fn get_physical_device_properties( + &self, + physical_device: vk::PhysicalDevice, + ) -> vk::PhysicalDeviceProperties { + let mut prop = mem::MaybeUninit::uninit(); + (self.instance_fn_1_0.get_physical_device_properties)(physical_device, prop.as_mut_ptr()); + prop.assume_init() + } + + /// + #[inline] + pub unsafe fn get_physical_device_queue_family_properties( + &self, + physical_device: vk::PhysicalDevice, + ) -> Vec { + read_into_uninitialized_vector(|count, data| { + (self + .instance_fn_1_0 + .get_physical_device_queue_family_properties)( + physical_device, count, data + ); + vk::Result::SUCCESS + }) + // The closure always returns SUCCESS + .unwrap() + } + + /// + #[inline] + pub unsafe fn get_physical_device_features( + &self, + physical_device: vk::PhysicalDevice, + ) -> vk::PhysicalDeviceFeatures { + let mut prop = mem::MaybeUninit::uninit(); + (self.instance_fn_1_0.get_physical_device_features)(physical_device, prop.as_mut_ptr()); + prop.assume_init() + } + + /// + #[inline] + pub unsafe fn enumerate_physical_devices(&self) -> VkResult> { + read_into_uninitialized_vector(|count, data| { + (self.instance_fn_1_0.enumerate_physical_devices)(self.handle, count, data) + }) + } + + /// + #[inline] + pub unsafe fn enumerate_device_extension_properties( + &self, + device: vk::PhysicalDevice, + ) -> VkResult> { + read_into_uninitialized_vector(|count, data| { + (self.instance_fn_1_0.enumerate_device_extension_properties)( + device, + ptr::null(), + count, + data, + ) + }) + } + + /// + #[inline] + pub unsafe fn enumerate_device_layer_properties( + &self, + device: vk::PhysicalDevice, + ) -> VkResult> { + read_into_uninitialized_vector(|count, data| { + (self.instance_fn_1_0.enumerate_device_layer_properties)(device, count, data) + }) + } + + /// + #[inline] + pub unsafe fn get_physical_device_sparse_image_format_properties( + &self, + physical_device: vk::PhysicalDevice, + format: vk::Format, + typ: vk::ImageType, + samples: vk::SampleCountFlags, // what again? + usage: vk::ImageUsageFlags, + tiling: vk::ImageTiling, + ) -> Vec { + read_into_uninitialized_vector(|count, data| { + (self + .instance_fn_1_0 + .get_physical_device_sparse_image_format_properties)( + physical_device, + format, + typ, + samples, + usage, + tiling, + count, + data, + ); + vk::Result::SUCCESS + }) + // The closure always returns SUCCESS + .unwrap() + } +} diff --git a/ash-rewrite/src/lib.rs b/ash-rewrite/src/lib.rs index 3ffa7907e..6c4301b72 100644 --- a/ash-rewrite/src/lib.rs +++ b/ash-rewrite/src/lib.rs @@ -16,6 +16,7 @@ mod instance; mod generated; /// Type definitions for platform-specific external types pub mod platform_types; +pub use platform_types::*; use alloc::vec::Vec; use core::{mem, ptr}; diff --git a/generator-rewrite/src/item/alias.rs b/generator-rewrite/src/item/alias.rs index c5537d0b2..49b91f8d0 100644 --- a/generator-rewrite/src/item/alias.rs +++ b/generator-rewrite/src/item/alias.rs @@ -1,42 +1,42 @@ -use super::{Code, Context}; -use crate::{CodeMap, output::Destination}; -use analysis::{ - item::{ - Named, - alias::{CommandAlias, TypeAlias}, - }, - lifetime::Lifetime, - to_rust::RustTranslator, -}; -use quote::{format_ident, quote}; -use tracing::{instrument, trace}; - -impl Code for TypeAlias { - #[instrument(skip(ctx))] - fn code(&self, ctx: &Context) -> CodeMap { - trace!("generating"); - let lifetime = Lifetime(format_ident!("a")); - let name = ctx.type_to_rust(self.name(), false, &lifetime); - let alias = ctx.type_to_rust(self.alias, true, &lifetime); - - let code = quote! { - pub type #name = #alias; - }; - - CodeMap::new(Destination::new(self.required_by), code) - } -} - -impl Code for CommandAlias { - #[instrument(skip(ctx))] - fn code(&self, ctx: &Context) -> CodeMap { - trace!("generating"); - let name = ctx.command_to_rust(self.name(), false); - let alias = ctx.command_to_rust(self.alias, true); - let code = quote! { - pub type #name = #alias; - }; - - CodeMap::new(Destination::new(self.required_by), code) - } -} +use super::{Code, Context}; +use crate::{CodeMap, output::Destination}; +use analysis::{ + item::{ + Named, + alias::{CommandAlias, TypeAlias}, + }, + lifetime::Lifetime, + to_rust::RustTranslator, +}; +use quote::{format_ident, quote}; +use tracing::{instrument, trace}; + +impl Code for TypeAlias { + #[instrument(skip(ctx))] + fn code(&self, ctx: &Context) -> CodeMap { + trace!("generating"); + let lifetime = Lifetime(format_ident!("a")); + let name = ctx.type_to_rust_without_bit_flags_replacement(self.name(), false, &lifetime); + let alias = ctx.type_to_rust_without_bit_flags_replacement(self.alias, true, &lifetime); + + let code = quote! { + pub type #name = #alias; + }; + + CodeMap::new(Destination::new(self.required_by), code) + } +} + +impl Code for CommandAlias { + #[instrument(skip(ctx))] + fn code(&self, ctx: &Context) -> CodeMap { + trace!("generating"); + let name = ctx.command_to_rust(self.name(), false); + let alias = ctx.command_to_rust(self.alias, true); + let code = quote! { + pub type #name = #alias; + }; + + CodeMap::new(Destination::new(self.required_by), code) + } +} diff --git a/generator-rewrite/src/item/bitmask.rs b/generator-rewrite/src/item/bitmask.rs index 897e0cbce..4a0ee2d8d 100644 --- a/generator-rewrite/src/item/bitmask.rs +++ b/generator-rewrite/src/item/bitmask.rs @@ -1,185 +1,185 @@ -use super::{Code, Context}; -use crate::output::{CodeMap, Destination}; -use analysis::{ - item::{ - Named, - bitmask::{BitMask, BitWidth, Item, Value}, - }, - lifetime::Lifetime, - to_rust::RustTranslator, - xml::cexpr::CExprItem, -}; -use proc_macro2::{Literal, TokenStream}; -use quote::quote; -use tracing::{instrument, trace}; - -impl Code for BitMask { - #[instrument(skip(ctx))] - fn code(&self, ctx: &Context) -> CodeMap { - trace!("generating"); - let name = ctx.type_to_rust(self.name(), false, &Lifetime::placeholder()); - let base_ty = match self.bitwidth { - BitWidth::Bits32 => quote! { u32 }, - BitWidth::Bits64 => quote! { u64 }, - }; - - let mut bits_code = TokenStream::default(); - let mut values = TokenStream::default(); - if let Some(bits_name) = self.bits_name { - let bits_name_tokens = ctx.type_to_rust(bits_name, false, &Lifetime::placeholder()); - - bits_code = quote! { - #[repr(transparent)] - #[derive(Clone, Copy, Default)] - pub struct #bits_name_tokens(pub(crate) #base_ty); - }; - - values = (self.items.iter()) - .map(|(&name, _item)| { - let name = ctx.enumerator_to_rust(name, bits_name, false); - quote! { pub const #name: Self = Self(#bits_name_tokens::#name.0); } - }) - .collect::(); - } - - let code = quote! { - #[repr(transparent)] - #[derive(Clone, Copy)] - pub struct #name(#base_ty); - - impl #name { - #values - - pub const fn empty() -> Self { - Self(0) - } - - pub const fn from_raw(x: #base_ty) -> Self { - Self(x) - } - - pub const fn as_raw(self) -> #base_ty { - self.0 - } - - pub const fn is_empty(self) -> bool { - self.0 == Self::empty().0 - } - - pub const fn intersects(self, other: Self) -> bool { - !Self(self.0 & other.0).is_empty() - } - - pub const fn contains(self, other: Self) -> bool { - self.0 & other.0 == other.0 - } - } - - impl Default for #name { - fn default() -> Self { - Self::empty() - } - } - - impl core::ops::BitOr for #name { - type Output = Self; - - fn bitor(self, rhs: Self) -> Self { - Self(self.0 | rhs.0) - } - } - - impl core::ops::BitOrAssign for #name { - fn bitor_assign(&mut self, rhs: Self) { - *self = *self | rhs; - } - } - - impl core::ops::BitAnd for #name { - type Output = Self; - - fn bitand(self, rhs: Self) -> Self { - Self(self.0 & rhs.0) - } - } - - impl core::ops::BitAndAssign for #name { - fn bitand_assign(&mut self, rhs: Self) { - *self = *self & rhs; - } - } - - impl core::ops::BitXor for #name { - type Output = Self; - - fn bitxor(self, rhs: Self) -> Self { - Self(self.0 ^ rhs.0) - } - } - - impl core::ops::BitXorAssign for #name { - fn bitxor_assign(&mut self, rhs: Self) { - *self = *self ^ rhs; - } - } - - impl core::ops::Not for #name { - type Output = Self; - - fn not(self) -> Self { - Self(!self.0) - } - } - - #bits_code - }; - - let mut codemap = CodeMap::new(Destination::new(self.required_by), code); - - if let Some(bits_name) = self.bits_name { - let mut impl_map = CodeMap::default(); - - for (&name, Item { required_by, value }) in &self.items { - let name = ctx.enumerator_to_rust(name, bits_name, false); - let value = match &value { - Value::BitPos(bitpos) => { - let literal = Literal::u8_unsuffixed(*bitpos); - quote! { Self(1 << #literal) } - } - Value::Expr(cexpr_items) => { - let expr = CExprItem::to_rust(cexpr_items.iter(), ctx); - quote! { Self(#expr) } - } - Value::Alias(enumerator_name) => { - let en = ctx.enumerator_to_rust(*enumerator_name, bits_name, false); - quote! { Self::#en } - } - }; - - impl_map.extend(CodeMap::new( - Destination::new(*required_by), - quote! { pub const #name: Self = #value; }, - )); - } - - for (&dest, impl_tokens) in impl_map.iter() { - let name = ctx.type_to_rust( - bits_name, - dest != Destination::new(self.required_by), - &Lifetime::placeholder(), - ); - - let doc = dest.doc_link(); - codemap.extend(CodeMap::new( - dest, - quote! { - #[doc = #doc] - impl #name { #impl_tokens } - }, - )); - } - } - - codemap - } -} +use super::{Code, Context}; +use crate::output::{CodeMap, Destination}; +use analysis::{ + item::{ + Named, + bitmask::{BitMask, BitWidth, Item, Value}, + }, + lifetime::Lifetime, + to_rust::RustTranslator, + xml::cexpr::CExprItem, +}; +use proc_macro2::{Literal, TokenStream}; +use quote::quote; +use tracing::{instrument, trace}; + +impl Code for BitMask { + #[instrument(skip(ctx))] + fn code(&self, ctx: &Context) -> CodeMap { + trace!("generating"); + let name = ctx.type_to_rust_without_bit_flags_replacement(self.name(), false, &Lifetime::placeholder()); + let base_ty = match self.bitwidth { + BitWidth::Bits32 => quote! { u32 }, + BitWidth::Bits64 => quote! { u64 }, + }; + + let mut bits_code = TokenStream::default(); + let mut values = TokenStream::default(); + if let Some(bits_name) = self.bits_name { + let bits_name_tokens = ctx.type_to_rust_without_bit_flags_replacement(bits_name, false, &Lifetime::placeholder()); + + bits_code = quote! { + #[repr(transparent)] + #[derive(Clone, Copy, Default)] + pub struct #bits_name_tokens(pub(crate) #base_ty); + }; + + values = (self.items.iter()) + .map(|(&name, _item)| { + let name = ctx.enumerator_to_rust(name, bits_name, false); + quote! { pub const #name: Self = Self(#bits_name_tokens::#name.0); } + }) + .collect::(); + } + + let code = quote! { + #[repr(transparent)] + #[derive(Clone, Copy)] + pub struct #name(#base_ty); + + impl #name { + #values + + pub const fn empty() -> Self { + Self(0) + } + + pub const fn from_raw(x: #base_ty) -> Self { + Self(x) + } + + pub const fn as_raw(self) -> #base_ty { + self.0 + } + + pub const fn is_empty(self) -> bool { + self.0 == Self::empty().0 + } + + pub const fn intersects(self, other: Self) -> bool { + !Self(self.0 & other.0).is_empty() + } + + pub const fn contains(self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + + impl Default for #name { + fn default() -> Self { + Self::empty() + } + } + + impl core::ops::BitOr for #name { + type Output = Self; + + fn bitor(self, rhs: Self) -> Self { + Self(self.0 | rhs.0) + } + } + + impl core::ops::BitOrAssign for #name { + fn bitor_assign(&mut self, rhs: Self) { + *self = *self | rhs; + } + } + + impl core::ops::BitAnd for #name { + type Output = Self; + + fn bitand(self, rhs: Self) -> Self { + Self(self.0 & rhs.0) + } + } + + impl core::ops::BitAndAssign for #name { + fn bitand_assign(&mut self, rhs: Self) { + *self = *self & rhs; + } + } + + impl core::ops::BitXor for #name { + type Output = Self; + + fn bitxor(self, rhs: Self) -> Self { + Self(self.0 ^ rhs.0) + } + } + + impl core::ops::BitXorAssign for #name { + fn bitxor_assign(&mut self, rhs: Self) { + *self = *self ^ rhs; + } + } + + impl core::ops::Not for #name { + type Output = Self; + + fn not(self) -> Self { + Self(!self.0) + } + } + + #bits_code + }; + + let mut codemap = CodeMap::new(Destination::new(self.required_by), code); + + if let Some(bits_name) = self.bits_name { + let mut impl_map = CodeMap::default(); + + for (&name, Item { required_by, value }) in &self.items { + let name = ctx.enumerator_to_rust(name, bits_name, false); + let value = match &value { + Value::BitPos(bitpos) => { + let literal = Literal::u8_unsuffixed(*bitpos); + quote! { Self(1 << #literal) } + } + Value::Expr(cexpr_items) => { + let expr = CExprItem::to_rust(cexpr_items.iter(), ctx); + quote! { Self(#expr) } + } + Value::Alias(enumerator_name) => { + let en = ctx.enumerator_to_rust(*enumerator_name, bits_name, false); + quote! { Self::#en } + } + }; + + impl_map.extend(CodeMap::new( + Destination::new(*required_by), + quote! { pub const #name: Self = #value; }, + )); + } + + for (&dest, impl_tokens) in impl_map.iter() { + let name = ctx.type_to_rust_without_bit_flags_replacement( + bits_name, + dest != Destination::new(self.required_by), + &Lifetime::placeholder(), + ); + + let doc = dest.doc_link(); + codemap.extend(CodeMap::new( + dest, + quote! { + #[doc = #doc] + impl #name { #impl_tokens } + }, + )); + } + } + + codemap + } +} diff --git a/generator-rewrite/src/item/structure.rs b/generator-rewrite/src/item/structure.rs index 9707cd19c..c0d35fe27 100644 --- a/generator-rewrite/src/item/structure.rs +++ b/generator-rewrite/src/item/structure.rs @@ -204,6 +204,7 @@ fn decl_setter_and_getter( lifetime: &Lifetime, ) -> TokenStream { let field_name = ctx.var_name_to_rust(decl.name); + let trimmed_field_name = ctx.trimmed_var_name_to_rust(decl.name); match decl.ty { Ty::SpecType(TypeName::VK_BOOL32) => { @@ -218,14 +219,15 @@ fn decl_setter_and_getter( if len.first().is_some_and(|l| l == &Length::NullTerminated) => { let ty = Ty::Ref(&Ty::RustType(RustType::CStr), mutability).to_rust(ctx, lifetime); - let field_name_as_cstr = format_ident!("{field_name}_as_c_str"); + let trimmed_field_name_as_cstr = format_ident!("{trimmed_field_name}_as_c_str"); + quote! { - pub fn #field_name(mut self, #field_name: #ty) -> Self { - self.#field_name = #field_name.as_ptr(); + pub fn #trimmed_field_name(mut self, #trimmed_field_name: #ty) -> Self { + self.#field_name = #trimmed_field_name.as_ptr(); self } - pub unsafe fn #field_name_as_cstr(&self) -> Option<&core::ffi::CStr> { + pub unsafe fn #trimmed_field_name_as_cstr(&self) -> Option<&core::ffi::CStr> { if self.#field_name.is_null() { None } else { @@ -237,29 +239,29 @@ fn decl_setter_and_getter( Ty::Array(Ty::CPrimary(CPrimaryType::Char), _) if len.first().is_some_and(|l| l == &Length::NullTerminated) => { - let field_name_as_cstr = format_ident!("{field_name}_as_c_str"); + let trimmed_field_name_as_cstr = format_ident!("{trimmed_field_name}_as_c_str"); quote! { - pub fn #field_name(mut self, #field_name: &core::ffi::CStr) -> core::result::Result { - crate::write_c_str_slice_with_nul(&mut self.#field_name, #field_name).map(|_| self) + pub fn #trimmed_field_name(mut self, #trimmed_field_name: &core::ffi::CStr) -> core::result::Result { + crate::write_c_str_slice_with_nul(&mut self.#field_name, #trimmed_field_name).map(|_| self) } - pub fn #field_name_as_cstr(&self) -> core::result::Result<&core::ffi::CStr, core::ffi::FromBytesUntilNulError> { + pub fn #trimmed_field_name_as_cstr(&self) -> core::result::Result<&core::ffi::CStr, core::ffi::FromBytesUntilNulError> { crate::wrap_c_str_slice_until_nul(&self.#field_name) } } } Ty::Array(base, _) if let Some(Length::Member(len_var)) = len.first() => { let len_var = ctx.var_name_to_rust(*len_var); - let field_name_as_slice = format_ident!("{field_name}_as_slice"); + let trimmed_field_name_as_slice = format_ident!("{trimmed_field_name}_as_slice"); let base_ty = array_base_ty(base, ctx, lifetime, len); quote! { - pub fn #field_name(mut self, #field_name: &[#base_ty]) -> Self { - self.#len_var = #field_name.len() as _; - self.#field_name[..#field_name.len()].copy_from_slice(#field_name); + pub fn #trimmed_field_name(mut self, #trimmed_field_name: &[#base_ty]) -> Self { + self.#len_var = #trimmed_field_name.len() as _; + self.#field_name[..#trimmed_field_name.len()].copy_from_slice(#trimmed_field_name); self } - pub fn #field_name_as_slice(&self) -> &[#base_ty] { + pub fn #trimmed_field_name_as_slice(&self) -> &[#base_ty] { &self.#field_name[..self.#len_var as _] } } @@ -289,9 +291,9 @@ fn decl_setter_and_getter( Mutability::Mut => quote! {mut}, }; quote! { - pub fn #field_name(mut self, #field_name: &#lifetime #mutability #base_ty) -> Self { - self.#len_var = #field_name.len() as _; - self.#field_name = #field_name #ptr; + pub fn #trimmed_field_name(mut self, #trimmed_field_name: &#lifetime #mutability #base_ty) -> Self { + self.#len_var = #trimmed_field_name.len() as _; + self.#field_name = #trimmed_field_name #ptr; self } } @@ -299,8 +301,8 @@ fn decl_setter_and_getter( Ty::Ptr(base, mutability) if len.first().is_none_or(|l| l == &Length::Pointer) => { let ty = Ty::Ref(base, mutability).to_rust(ctx, lifetime); quote! { - pub fn #field_name(mut self, #field_name: #ty) -> Self { - self.#field_name = #field_name; + pub fn #trimmed_field_name(mut self, #trimmed_field_name: #ty) -> Self { + self.#field_name = #trimmed_field_name; self } } @@ -311,8 +313,8 @@ fn decl_setter_and_getter( tracing::warn!(?custom, "unhandled custom length"); let ty = decl.ty.to_rust(ctx, lifetime); quote! { - pub fn #field_name(mut self, #field_name: #ty) -> Self { - self.#field_name = #field_name; + pub fn #trimmed_field_name(mut self, #trimmed_field_name: #ty) -> Self { + self.#field_name = #trimmed_field_name; self } } @@ -322,8 +324,8 @@ fn decl_setter_and_getter( _ => { let ty = decl.ty.to_rust(ctx, lifetime); quote! { - pub fn #field_name(mut self, #field_name: #ty) -> Self { - self.#field_name = #field_name; + pub fn #trimmed_field_name(mut self, #trimmed_field_name: #ty) -> Self { + self.#field_name = #trimmed_field_name; self } } diff --git a/generator-rewrite/src/lib.rs b/generator-rewrite/src/lib.rs index c37cd146e..1b21977be 100644 --- a/generator-rewrite/src/lib.rs +++ b/generator-rewrite/src/lib.rs @@ -51,6 +51,16 @@ pub(crate) fn escape_ident(name: &str) -> Ident { syn::parse_str(name).unwrap_or_else(|_| format_ident!("_{name}")) } +pub(crate) fn trim_p_pps(name: &str) -> String { + let trimmed = name.trim_start_matches("p_").trim_start_matches("pp_"); + + if name == "pp_usage_counts" || name == "pp_geometries" { + format!("{}_ptrs", trimmed) + } else { + trimmed.to_string() + } +} + #[derive(Debug)] pub struct Context<'a>(&'a AnalysisResult); @@ -67,7 +77,22 @@ impl<'a> RustTranslator for Context<'a> { crate::escape_ident(&name.original().to_snek_case()) } + fn trimmed_var_name_to_rust(&self, name: VariableName) -> Ident { + crate::escape_ident(&crate::trim_p_pps(&name.original().to_snek_case())) + } + fn type_to_rust(&self, name: TypeName, qualified: bool, lifetime: &Lifetime) -> TokenStream { + let type_item = &self.items.types[&name]; + let required_by = type_item.required_by(&self.items); + let ident: Ident = syn::parse_str(&name.prefix_trimmed(required_by.library).to_string().replace("FlagBits", "Flags")).unwrap(); + let path = qualified.then(|| quote! { crate::vk:: }); + let lifetime = self.type_has_lifetime(name).then(|| quote! { <#lifetime> }); + quote! { #path #ident #lifetime } + } + + // duplicate of type_to_rust but does not have the FlagsBits -> Flags replacement + // that could have been passed as argument but that would require changing fn signature everywhere + fn type_to_rust_without_bit_flags_replacement(&self, name: TypeName, qualified: bool, lifetime: &Lifetime) -> TokenStream { let type_item = &self.items.types[&name]; let required_by = type_item.required_by(&self.items); let ident: Ident = syn::parse_str(name.prefix_trimmed(required_by.library)).unwrap();