[Mesa-dev] [PATCH] anv: fix GetPhysicalDeviceProperties to return timestampPeriod in ns

Kenneth Graunke kenneth at whitecape.org
Thu Oct 6 09:08:39 UTC 2016


On Thursday, October 6, 2016 1:48:04 AM PDT Philipp Zabel wrote:
> According to chapters 16.5. (Timestamp Queries) and 30.2 (Limits) of the
> Vulkan Specification 1.0.29, the .limits.timestampPeriod field returned
> by vkGetPhysicalDeviceProperties is measured in nanoseconds, not in
> seconds.
> 
> Signed-off-by: Philipp Zabel <philipp.zabel at gmail.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 f786ebe..c7b9979 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -572,7 +572,7 @@ void anv_GetPhysicalDeviceProperties(
>        .storageImageSampleCounts                 = VK_SAMPLE_COUNT_1_BIT,
>        .maxSampleMaskWords                       = 1,
>        .timestampComputeAndGraphics              = false,
> -      .timestampPeriod                          = time_stamp_base / (1000 * 1000 * 1000),
> +      .timestampPeriod                          = time_stamp_base,
>        .maxClipDistances                         = 0 /* FIXME */,
>        .maxCullDistances                         = 0 /* FIXME */,
>        .maxCombinedClipAndCullDistances          = 0 /* FIXME */,
> 

Yep, definitely supposed to be nanoseconds.  Thanks for the fix!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

and pushed:

To ssh://git.freedesktop.org/git/mesa/mesa
   88428fb..0408d50  master -> master

(hope you don't mind, Jason!)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161006/623c4fe5/attachment.sig>


More information about the mesa-dev mailing list