Module: Mesa Branch: master Commit: 1b2fe7ce45a508fa080e6bf93b820e6217beed83 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b2fe7ce45a508fa080e6bf93b820e6217beed83
Author: Grazvydas Ignotas <nota...@gmail.com> Date: Fri Apr 14 20:00:26 2017 +0300 radv: report timestampPeriod correctly The kernel returns frequency in kHz, so to convert to nanosecond interval that Vulkan uses the dividend should be 1000000.0 and not 100000.0. This fixes the GPU graph in DOOM and matches the amdgpu-pro blob. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas <nota...@gmail.com> Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> --- src/amd/vulkan/radv_device.c | 2 +- src/amd/vulkan/radv_radeon_winsys.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 8783ad4e1b..6251498364 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -653,7 +653,7 @@ void radv_GetPhysicalDeviceProperties( .storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT, .maxSampleMaskWords = 1, .timestampComputeAndGraphics = false, - .timestampPeriod = 100000.0 / pdevice->rad_info.clock_crystal_freq, + .timestampPeriod = 1000000.0 / pdevice->rad_info.clock_crystal_freq, .maxClipDistances = 8, .maxCullDistances = 8, .maxCombinedClipAndCullDistances = 8, diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index 9f2430f75d..f6bab7410d 100644 --- a/src/amd/vulkan/radv_radeon_winsys.h +++ b/src/amd/vulkan/radv_radeon_winsys.h @@ -95,7 +95,7 @@ struct radeon_info { uint32_t compute_rings; uint32_t vce_fw_version; uint32_t vce_harvest_config; - uint32_t clock_crystal_freq; + uint32_t clock_crystal_freq; /* in kHz */ /* Kernel info. */ uint32_t drm_major; /* version */ _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit