extensions/ext: Make get_calibrated_timestamps() return single value for max_deviation (#738)

Per spec `max_deviation` is a single value, not an array.
This commit is contained in:
Kanashimia 2023-05-06 22:25:05 +03:00 committed by GitHub
parent aa8f600aa8
commit ad70ad7c60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bumped MSRV from 1.59 to 1.60 (#709)
- Replaced `const fn name()` with associated `NAME` constants (#715)
- Generic builders now automatically set `objecttype` to `<T as Handle>::ObjectType` (#724)
- `get_calibrated_timestamps()` now returns a single value for `max_deviation` (#738)
- extensions/khr: Take the remaining `p_next`-containing structs as `&mut` to allow chains (#744)
- `AccelerationStructure::get_acceleration_structure_build_sizes()`
- `ExternalMemoryFd::get_memory_fd_properties()`

View file

@ -42,15 +42,15 @@ impl CalibratedTimestamps {
&self,
device: vk::Device,
info: &[vk::CalibratedTimestampInfoEXT],
) -> VkResult<(Vec<u64>, Vec<u64>)> {
) -> VkResult<(Vec<u64>, u64)> {
let mut timestamps = vec![0u64; info.len()];
let mut max_deviation = vec![0u64; info.len()];
let mut max_deviation = 0u64;
(self.fp.get_calibrated_timestamps_ext)(
device,
info.len() as u32,
info.as_ptr(),
timestamps.as_mut_ptr(),
max_deviation.as_mut_ptr(),
&mut max_deviation,
)
.result_with_success((timestamps, max_deviation))
}