mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
chore: qualify std::mem::size_of
with use
(again)
This commit is contained in:
parent
693eaaf7f8
commit
3767a62339
@ -13,7 +13,7 @@ use crate::{
|
|||||||
id::{BlasId, BufferId, TlasId},
|
id::{BlasId, BufferId, TlasId},
|
||||||
resource::CreateBufferError,
|
resource::CreateBufferError,
|
||||||
};
|
};
|
||||||
use std::sync::Arc;
|
use std::{mem::size_of, sync::Arc};
|
||||||
use std::{num::NonZeroU64, slice};
|
use std::{num::NonZeroU64, slice};
|
||||||
|
|
||||||
use crate::resource::{Blas, ResourceErrorIdent, Tlas};
|
use crate::resource::{Blas, ResourceErrorIdent, Tlas};
|
||||||
@ -325,11 +325,8 @@ pub(crate) fn tlas_instance_into_bytes(
|
|||||||
};
|
};
|
||||||
let temp: *const _ = &temp;
|
let temp: *const _ = &temp;
|
||||||
unsafe {
|
unsafe {
|
||||||
slice::from_raw_parts::<u8>(
|
slice::from_raw_parts::<u8>(temp.cast::<u8>(), size_of::<RawTlasInstance>())
|
||||||
temp.cast::<u8>(),
|
.to_vec()
|
||||||
std::mem::size_of::<RawTlasInstance>(),
|
|
||||||
)
|
|
||||||
.to_vec()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
|
Loading…
Reference in New Issue
Block a user