summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Bragg <[email protected]>2017-03-17 15:54:07 +0000
committerRobert Bragg <[email protected]>2017-03-17 16:10:22 +0000
commita27b62e794779229210092635e7afccc2fd074c7 (patch)
treecb9e579dedc07467ee6190faa19c48650a8a49f9
parent344d1a4015de94d27c20ea6f632be8e4c16b6a63 (diff)
anv/device: init timestampPeriod from devinfo
Now that there's a timebase_scale in gen_device_info which is effectively the 'period' this switches anv_GetPhysicalDeviceProperties to using this common device info to initialize the timestampPeriod device limit. Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/intel/vulkan/anv_device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index fcfbd5fd6b1..748d70327ed 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -535,8 +535,6 @@ void anv_GetPhysicalDeviceProperties(
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
const struct gen_device_info *devinfo = &pdevice->info;
- const float time_stamp_base = devinfo->gen >= 9 ? 83.333 : 80.0;
-
/* See assertions made when programming the buffer surface state. */
const uint32_t max_raw_buffer_sz = devinfo->gen >= 7 ?
(1ul << 30) : (1ul << 27);
@@ -641,7 +639,7 @@ void anv_GetPhysicalDeviceProperties(
.storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT,
.maxSampleMaskWords = 1,
.timestampComputeAndGraphics = false,
- .timestampPeriod = time_stamp_base,
+ .timestampPeriod = devinfo->timebase_scale,
.maxClipDistances = 8,
.maxCullDistances = 8,
.maxCombinedClipAndCullDistances = 8,