From: Robert Bragg Date: Fri, 17 Mar 2017 15:54:07 +0000 (+0000) Subject: anv/device: init timestampPeriod from devinfo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a27b62e794779229210092635e7afccc2fd074c7;p=mesa.git 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 Reviewed-by: Jason Ekstrand --- 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,