For some reason I thought it did it in 10 KHz. Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>
On Fri, Apr 14, 2017 at 7:17 PM, Grazvydas Ignotas <nota...@gmail.com> wrote: > 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. > > Signed-off-by: Grazvydas Ignotas <nota...@gmail.com> > Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" > --- > 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 7857e8f..796cc70 100644 > --- a/src/amd/vulkan/radv_device.c > +++ b/src/amd/vulkan/radv_device.c > @@ -637,11 +637,11 @@ void radv_GetPhysicalDeviceProperties( > .sampledImageDepthSampleCounts = sample_counts, > .sampledImageStencilSampleCounts = sample_counts, > .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, > .discreteQueuePriorities = 1, > .pointSizeRange = { 0.125, 255.875 > }, > diff --git a/src/amd/vulkan/radv_radeon_winsys.h > b/src/amd/vulkan/radv_radeon_winsys.h > index 9f2430f..f6bab74 100644 > --- a/src/amd/vulkan/radv_radeon_winsys.h > +++ b/src/amd/vulkan/radv_radeon_winsys.h > @@ -93,11 +93,11 @@ struct radeon_info { > bool has_uvd; > uint32_t sdma_rings; > 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 */ > uint32_t drm_minor; > uint32_t drm_patchlevel; > -- > 2.7.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev