Skip to content

Commit 0154a82

Browse files
authored
Fix pMaxDeviation parameter type in calibrated_timestamps sample (#1450)
* Fix pMaxDeviation parameter type in calibrated_timestamps sample * Apply clang-format * comment revised
1 parent c639575 commit 0154a82

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

samples/extensions/calibrated_timestamps/calibrated_timestamps.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,6 @@ void CalibratedTimestamps::get_time_domains()
802802

803803
// Resize time stamps vector
804804
timestamps.resize(time_domain_count);
805-
// Resize max deviations vector
806-
max_deviations.resize(time_domain_count);
807805
}
808806

809807
is_time_domain_init = ((result == VK_SUCCESS) && (time_domain_count > 0));
@@ -815,7 +813,7 @@ VkResult CalibratedTimestamps::get_timestamps()
815813
if (is_time_domain_init)
816814
{
817815
// Get calibrated timestamps:
818-
return vkGetCalibratedTimestampsEXT(get_device().get_handle(), static_cast<uint32_t>(time_domains.size()), timestamps_info.data(), timestamps.data(), max_deviations.data());
816+
return vkGetCalibratedTimestampsEXT(get_device().get_handle(), static_cast<uint32_t>(time_domains.size()), timestamps_info.data(), timestamps.data(), &max_deviation);
819817
}
820818
return VK_ERROR_UNKNOWN;
821819
}

samples/extensions/calibrated_timestamps/calibrated_timestamps.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CalibratedTimestamps : public ApiVulkanSample
3131
bool is_time_domain_init = false; // this is just to tell if time domain update has a VK_SUCCESS in the end
3232
std::vector<VkTimeDomainEXT> time_domains{}; // this holds all time domains extracted from the current Instance
3333
std::vector<uint64_t> timestamps{}; // timestamps vector
34-
std::vector<uint64_t> max_deviations{}; // max deviations vector
34+
uint64_t max_deviation = 0; // max deviation
3535

3636
struct
3737
{

0 commit comments

Comments
 (0)