Skip to content

Commit

Permalink
generator: Omit lifetime on vk::AllocationCallbacks for opaque pointer
Browse files Browse the repository at this point in the history
When a struct only contains pointers to opaque types (only
`vk::AllocationCallbacks` was found to match this predicate), which
we don't track in the builder, the lifetime parameter is completely
unnecessary and useless as we don't have anything useful to key this off
of.  The builder shouldn't force the incoming pointer to be any specific
Rust thing to track the lifetime through, especially since its lifetime
protrudes the lifetime of the `vk::AllocationCallbacks` structure
and is passed into the callbacks whenever Vulkan wishes to call them,
which could happen after an API command completes and a (stack-local)
`vk::AllocationCallbacks` instance is destroyed again.
  • Loading branch information
MarijnS95 committed Dec 3, 2024
1 parent cecfa47 commit ee01296
Show file tree
Hide file tree
Showing 37 changed files with 351 additions and 351 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `VK_EXT_metal_objects` device extension (#942)
- Added `VK_AMD_anti_lag` device extension (#943)

### Removed

- Removed unused lifetime from `vk::AllocationCallbacks` structure (#968)

## [0.38.0] - 2024-04-01

With over two years of collecting breaking changes (since the `0.37.0` release in March 2022), April 2024 marks the next breaking release of `ash`. This release introduces an overhaul of all Vulkan structures, restructures modules around extensions, and separates extension wrappers between `Instance` and `Device` functions. The crate contains all bindings defined by the latest `1.3.281` Vulkan specification, and many old and new extensions have received a hand-written extension wrapper. For a full overview of all individual changes, see the list at the end of this post.
Expand Down
2 changes: 1 addition & 1 deletion ash-window/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub unsafe fn create_surface(
instance: &Instance,
display_handle: RawDisplayHandle,
window_handle: RawWindowHandle,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
match (display_handle, window_handle) {
(RawDisplayHandle::Windows(_), RawWindowHandle::Win32(window)) => {
Expand Down
97 changes: 47 additions & 50 deletions ash/src/device.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ash/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl Entry {
pub unsafe fn create_instance(
&self,
create_info: &vk::InstanceCreateInfo<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<Instance> {
let mut instance = mem::MaybeUninit::uninit();
let instance = (self.entry_fn_1_0.create_instance)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/amdx/shader_enqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl crate::amdx::shader_enqueue::Device {
&self,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::ExecutionGraphPipelineCreateInfoAMDX<'_>],
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> Result<Vec<vk::Pipeline>, (Vec<vk::Pipeline>, vk::Result)> {
let mut pipelines = Vec::with_capacity(create_infos.len());
let err_code = (self.fp.create_execution_graph_pipelines_amdx)(
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/ext/debug_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::ext::debug_report::Instance {
pub unsafe fn destroy_debug_report_callback(
&self,
debug: vk::DebugReportCallbackEXT,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_debug_report_callback_ext)(
self.handle,
Expand All @@ -25,7 +25,7 @@ impl crate::ext::debug_report::Instance {
pub unsafe fn create_debug_report_callback(
&self,
create_info: &vk::DebugReportCallbackCreateInfoEXT<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::DebugReportCallbackEXT> {
let mut debug_cb = mem::MaybeUninit::uninit();
(self.fp.create_debug_report_callback_ext)(
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/ext/debug_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl crate::ext::debug_utils::Instance {
pub unsafe fn create_debug_utils_messenger(
&self,
create_info: &vk::DebugUtilsMessengerCreateInfoEXT<'_>,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::DebugUtilsMessengerEXT> {
let mut messenger = mem::MaybeUninit::uninit();
(self.fp.create_debug_utils_messenger_ext)(
Expand All @@ -100,7 +100,7 @@ impl crate::ext::debug_utils::Instance {
pub unsafe fn destroy_debug_utils_messenger(
&self,
messenger: vk::DebugUtilsMessengerEXT,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_debug_utils_messenger_ext)(self.handle, messenger, allocator.as_raw_ptr());
}
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/ext/headless_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::ext::headless_surface::Instance {
pub unsafe fn create_headless_surface(
&self,
create_info: &vk::HeadlessSurfaceCreateInfoEXT<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_headless_surface_ext)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/ext/metal_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::ext::metal_surface::Instance {
pub unsafe fn create_metal_surface(
&self,
create_info: &vk::MetalSurfaceCreateInfoEXT<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_metal_surface_ext)(
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/ext/private_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::ext::private_data::Device {
pub unsafe fn create_private_data_slot(
&self,
create_info: &vk::PrivateDataSlotCreateInfoEXT<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::PrivateDataSlotEXT> {
let mut private_data_slot = mem::MaybeUninit::uninit();
(self.fp.create_private_data_slot_ext)(
Expand All @@ -28,7 +28,7 @@ impl crate::ext::private_data::Device {
pub unsafe fn destroy_private_data_slot(
&self,
private_data_slot: vk::PrivateDataSlotEXT,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_private_data_slot_ext)(
self.handle,
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/ext/shader_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl crate::ext::shader_object::Device {
pub unsafe fn create_shaders(
&self,
create_infos: &[vk::ShaderCreateInfoEXT<'_>],
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) -> Result<Vec<vk::ShaderEXT>, (Vec<vk::ShaderEXT>, vk::Result)> {
let mut shaders = Vec::with_capacity(create_infos.len());
let err_code = (self.fp.create_shaders_ext)(
Expand All @@ -43,7 +43,7 @@ impl crate::ext::shader_object::Device {
pub unsafe fn destroy_shader(
&self,
shader: vk::ShaderEXT,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_shader_ext)(self.handle, shader, allocator.as_raw_ptr())
}
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/khr/acceleration_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl crate::khr::acceleration_structure::Device {
pub unsafe fn create_acceleration_structure(
&self,
create_info: &vk::AccelerationStructureCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::AccelerationStructureKHR> {
let mut accel_struct = mem::MaybeUninit::uninit();
(self.fp.create_acceleration_structure_khr)(
Expand All @@ -29,7 +29,7 @@ impl crate::khr::acceleration_structure::Device {
pub unsafe fn destroy_acceleration_structure(
&self,
accel_struct: vk::AccelerationStructureKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_acceleration_structure_khr)(
self.handle,
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/android_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::android_surface::Instance {
pub unsafe fn create_android_surface(
&self,
create_info: &vk::AndroidSurfaceCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_android_surface_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/create_renderpass2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::create_renderpass2::Device {
pub unsafe fn create_render_pass2(
&self,
create_info: &vk::RenderPassCreateInfo2<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::RenderPass> {
let mut renderpass = mem::MaybeUninit::uninit();
(self.fp.create_render_pass2_khr)(
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/khr/deferred_host_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl crate::khr::deferred_host_operations::Device {
#[inline]
pub unsafe fn create_deferred_operation(
&self,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::DeferredOperationKHR> {
let mut operation = mem::MaybeUninit::uninit();
(self.fp.create_deferred_operation_khr)(
Expand All @@ -35,7 +35,7 @@ impl crate::khr::deferred_host_operations::Device {
pub unsafe fn destroy_deferred_operation(
&self,
operation: vk::DeferredOperationKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_deferred_operation_khr)(
self.handle,
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/khr/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl crate::khr::display::Instance {
physical_device: vk::PhysicalDevice,
display: vk::DisplayKHR,
create_info: &vk::DisplayModeCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::DisplayModeKHR> {
let mut display_mode = mem::MaybeUninit::uninit();
(self.fp.create_display_mode_khr)(
Expand Down Expand Up @@ -101,7 +101,7 @@ impl crate::khr::display::Instance {
pub unsafe fn create_display_plane_surface(
&self,
create_info: &vk::DisplaySurfaceCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_display_plane_surface_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/display_swapchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::display_swapchain::Device {
pub unsafe fn create_shared_swapchains(
&self,
create_infos: &[vk::SwapchainCreateInfoKHR<'_>],
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<Vec<vk::SwapchainKHR>> {
let mut swapchains = Vec::with_capacity(create_infos.len());
(self.fp.create_shared_swapchains_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/ray_tracing_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl crate::khr::ray_tracing_pipeline::Device {
deferred_operation: vk::DeferredOperationKHR,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::RayTracingPipelineCreateInfoKHR<'_>],
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> Result<Vec<vk::Pipeline>, (Vec<vk::Pipeline>, vk::Result)> {
let mut pipelines = Vec::with_capacity(create_infos.len());
let err_code = (self.fp.create_ray_tracing_pipelines_khr)(
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/khr/sampler_ycbcr_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::sampler_ycbcr_conversion::Device {
pub unsafe fn create_sampler_ycbcr_conversion(
&self,
create_info: &vk::SamplerYcbcrConversionCreateInfo<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SamplerYcbcrConversion> {
let mut ycbcr_conversion = mem::MaybeUninit::uninit();
(self.fp.create_sampler_ycbcr_conversion_khr)(
Expand All @@ -28,7 +28,7 @@ impl crate::khr::sampler_ycbcr_conversion::Device {
pub unsafe fn destroy_sampler_ycbcr_conversion(
&self,
ycbcr_conversion: vk::SamplerYcbcrConversion,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_sampler_ycbcr_conversion_khr)(
self.handle,
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl crate::khr::surface::Instance {
pub unsafe fn destroy_surface(
&self,
surface: vk::SurfaceKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_surface_khr)(self.handle, surface, allocation_callbacks.as_raw_ptr());
}
Expand Down
4 changes: 2 additions & 2 deletions ash/src/extensions/khr/swapchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl crate::khr::swapchain::Device {
pub unsafe fn create_swapchain(
&self,
create_info: &vk::SwapchainCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SwapchainKHR> {
let mut swapchain = mem::MaybeUninit::uninit();
(self.fp.create_swapchain_khr)(
Expand All @@ -31,7 +31,7 @@ impl crate::khr::swapchain::Device {
pub unsafe fn destroy_swapchain(
&self,
swapchain: vk::SwapchainKHR,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_swapchain_khr)(self.handle, swapchain, allocation_callbacks.as_raw_ptr());
}
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/wayland_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::wayland_surface::Instance {
pub unsafe fn create_wayland_surface(
&self,
create_info: &vk::WaylandSurfaceCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_wayland_surface_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/win32_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::win32_surface::Instance {
pub unsafe fn create_win32_surface(
&self,
create_info: &vk::Win32SurfaceCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_win32_surface_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/xcb_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::xcb_surface::Instance {
pub unsafe fn create_xcb_surface(
&self,
create_info: &vk::XcbSurfaceCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_xcb_surface_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/xlib_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::khr::xlib_surface::Instance {
pub unsafe fn create_xlib_surface(
&self,
create_info: &vk::XlibSurfaceCreateInfoKHR<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_xlib_surface_khr)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/mvk/ios_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::mvk::ios_surface::Instance {
pub unsafe fn create_ios_surface(
&self,
create_info: &vk::IOSSurfaceCreateInfoMVK<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_ios_surface_mvk)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/mvk/macos_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::mvk::macos_surface::Instance {
pub unsafe fn create_mac_os_surface(
&self,
create_info: &vk::MacOSSurfaceCreateInfoMVK<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_mac_os_surface_mvk)(
Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/nn/vi_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl crate::nn::vi_surface::Instance {
pub unsafe fn create_vi_surface(
&self,
create_info: &vk::ViSurfaceCreateInfoNN<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::SurfaceKHR> {
let mut surface = mem::MaybeUninit::uninit();
(self.fp.create_vi_surface_nn)(
Expand Down
8 changes: 4 additions & 4 deletions ash/src/extensions/nv/cuda_kernel_launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl crate::nv::cuda_kernel_launch::Device {
pub unsafe fn create_cuda_module(
&self,
create_info: &vk::CudaModuleCreateInfoNV<'_>,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::CudaModuleNV> {
let mut module = mem::MaybeUninit::uninit();
(self.fp.create_cuda_module_nv)(
Expand All @@ -37,7 +37,7 @@ impl crate::nv::cuda_kernel_launch::Device {
pub unsafe fn create_cuda_function(
&self,
create_info: &vk::CudaFunctionCreateInfoNV<'_>,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::CudaFunctionNV> {
let mut function = mem::MaybeUninit::uninit();
(self.fp.create_cuda_function_nv)(
Expand All @@ -54,7 +54,7 @@ impl crate::nv::cuda_kernel_launch::Device {
pub unsafe fn destroy_cuda_module(
&self,
module: vk::CudaModuleNV,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_cuda_module_nv)(self.handle, module, allocator.as_raw_ptr())
}
Expand All @@ -64,7 +64,7 @@ impl crate::nv::cuda_kernel_launch::Device {
pub unsafe fn destroy_cuda_function(
&self,
function: vk::CudaFunctionNV,
allocator: Option<&vk::AllocationCallbacks<'_>>,
allocator: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_cuda_function_nv)(self.handle, function, allocator.as_raw_ptr())
}
Expand Down
6 changes: 3 additions & 3 deletions ash/src/extensions/nv/ray_tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl crate::nv::ray_tracing::Device {
pub unsafe fn create_acceleration_structure(
&self,
create_info: &vk::AccelerationStructureCreateInfoNV<'_>,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::AccelerationStructureNV> {
let mut accel_struct = mem::MaybeUninit::uninit();
(self.fp.create_acceleration_structure_nv)(
Expand All @@ -30,7 +30,7 @@ impl crate::nv::ray_tracing::Device {
pub unsafe fn destroy_acceleration_structure(
&self,
accel_struct: vk::AccelerationStructureNV,
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) {
(self.fp.destroy_acceleration_structure_nv)(
self.handle,
Expand Down Expand Up @@ -156,7 +156,7 @@ impl crate::nv::ray_tracing::Device {
&self,
pipeline_cache: vk::PipelineCache,
create_infos: &[vk::RayTracingPipelineCreateInfoNV<'_>],
allocation_callbacks: Option<&vk::AllocationCallbacks<'_>>,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> Result<Vec<vk::Pipeline>, (Vec<vk::Pipeline>, vk::Result)> {
let mut pipelines = Vec::with_capacity(create_infos.len());
let err_code = (self.fp.create_ray_tracing_pipelines_nv)(
Expand Down
Loading

0 comments on commit ee01296

Please sign in to comment.