mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Replace std::llround() with (int64_t) cast in optic_gpu for linux compatibility (no C++23)
This commit is contained in:
parent
be6088eee4
commit
cf7883f688
2 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ namespace Optick
|
|||
int64_t GetCPUTimestamp(int64_t gpuTimestamp)
|
||||
{
|
||||
// SRS - Improve accuracy of GPU to CPU timestamp conversion by using floating point doubles
|
||||
return timestampCPU + std::llround(double(gpuTimestamp - timestampGPU) * (double)frequencyCPU / (double)frequencyGPU);
|
||||
return timestampCPU + (int64_t)(double(gpuTimestamp - timestampGPU) * (double)frequencyCPU / (double)frequencyGPU);
|
||||
}
|
||||
|
||||
ClockSynchronization() : frequencyCPU(0), frequencyGPU(0), timestampCPU(0), timestampGPU(0) {}
|
||||
|
|
|
@ -452,7 +452,7 @@ namespace Optick
|
|||
clock.frequencyCPU = GetHighPrecisionFrequency();
|
||||
VkPhysicalDeviceProperties Properties;
|
||||
(*vulkanFunctions.vkGetPhysicalDeviceProperties)(nodePayloads[nodeIndex]->physicalDevice, &Properties);
|
||||
clock.frequencyGPU = std::llround(1000000000.0 / (double)Properties.limits.timestampPeriod);
|
||||
clock.frequencyGPU = (int64_t)(1000000000.0 / (double)Properties.limits.timestampPeriod);
|
||||
|
||||
// SRS - Reset entire query pool to clear clock sync query + any leftover queries from previous run
|
||||
(*vulkanFunctions.vkBeginCommandBuffer)(CB, &commandBufferBeginInfo);
|
||||
|
|
Loading…
Reference in a new issue