Skip to content

Commit

Permalink
change d3d11_shared_handle type to *mut c_void
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 committed Aug 23, 2024
1 parent 19bfa53 commit 0762e40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,11 @@ impl super::Device {
}

/// # Safety
///
/// The `d3d11_shared_handle` must be valid and respecting `desc`.
#[cfg(windows)]
pub unsafe fn texture_from_d3d11_shared_handle(
&self,
d3d11_shared_handle: vk::HANDLE,
d3d11_shared_handle: *mut std::ffi::c_void,
desc: &crate::TextureDescriptor,
) -> ash::prelude::VkResult<super::Texture> {
let copy_size = desc.copy_extent();
Expand Down Expand Up @@ -776,7 +776,7 @@ impl super::Device {

let mut import_memory_info = vk::ImportMemoryWin32HandleInfoKHR::default()
.handle_type(vk::ExternalMemoryHandleTypeFlags::D3D11_TEXTURE_KMT)
.handle(d3d11_shared_handle);
.handle(d3d11_shared_handle as _);

let Some(mem_type_index) = self
.find_memory_type_index(req.memory_type_bits, vk::MemoryPropertyFlags::DEVICE_LOCAL)
Expand Down

0 comments on commit 0762e40

Please sign in to comment.