Mesa (master): anv: fix reported timestampPeriod value
Lionel Landwerlin
llandwerlin at kemper.freedesktop.org
Sun Jul 2 11:13:01 UTC 2017
Module: Mesa
Branch: master
Commit: 038c45a40e4397c3219f1fc6e679473ed8c8beee
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=038c45a40e4397c3219f1fc6e679473ed8c8beee
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Sun Jul 2 00:23:29 2017 +0100
anv: fix reported timestampPeriod value
We lost some precision on a previous change due to switching to
integers. Since we report a float in timestampPeriod, we want the
division to happen in floats.
CID: 1413021
Fixes: c77d98ef32 ("intel: common: express timestamps units in frequency")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/vulkan/anv_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 63f37308c1..cbdcc4d6d6 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -869,7 +869,7 @@ void anv_GetPhysicalDeviceProperties(
.storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT,
.maxSampleMaskWords = 1,
.timestampComputeAndGraphics = false,
- .timestampPeriod = 1000000000ull / devinfo->timestamp_frequency,
+ .timestampPeriod = 1000000000.0 / devinfo->timestamp_frequency,
.maxClipDistances = 8,
.maxCullDistances = 8,
.maxCombinedClipAndCullDistances = 8,
More information about the mesa-commit
mailing list