generator: Use lifetime borrows instead of raw pointers in pp_geometries (#420)
Fixes #301
This commit is contained in:
parent
46ed5158ab
commit
6a522c878a
|
@ -41669,10 +41669,10 @@ impl<'a> AccelerationStructureBuildGeometryInfoKHRBuilder<'a> {
|
|||
}
|
||||
pub fn geometries_ptrs(
|
||||
mut self,
|
||||
geometries: &'a [*const AccelerationStructureGeometryKHR],
|
||||
geometries: &'a [&'a AccelerationStructureGeometryKHR],
|
||||
) -> Self {
|
||||
self.inner.geometry_count = geometries.len() as _;
|
||||
self.inner.pp_geometries = geometries.as_ptr();
|
||||
self.inner.pp_geometries = geometries.as_ptr() as *const *const _;
|
||||
self
|
||||
}
|
||||
pub fn scratch_data(mut self, scratch_data: DeviceOrHostAddressKHR) -> Self {
|
||||
|
|
|
@ -1797,9 +1797,9 @@ pub fn derive_setters(
|
|||
|
||||
if name == "ppGeometries" {
|
||||
return Some(quote!{
|
||||
pub fn geometries_ptrs(mut self, geometries: &'a [*const AccelerationStructureGeometryKHR]) -> Self {
|
||||
pub fn geometries_ptrs(mut self, geometries: &'a [&'a AccelerationStructureGeometryKHR]) -> Self {
|
||||
self.inner.geometry_count = geometries.len() as _;
|
||||
self.inner.pp_geometries = geometries.as_ptr();
|
||||
self.inner.pp_geometries = geometries.as_ptr() as *const *const _;
|
||||
self
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue