[Mesa-dev] [PATCH] anv: fix reported timestampPeriod value

Jason Ekstrand jason at jlekstrand.net
Sun Jul 2 02:49:47 UTC 2017


Rb


On July 1, 2017 4:43:45 PM Lionel Landwerlin 
<lionel.g.landwerlin at intel.com> wrote:

> 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>
> ---
>  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 29064f073d0..38db1268825 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -888,7 +888,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,
> --
> 2.13.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list