[Mesa-dev] [PATCH] anv/device: init timestampPeriod from devinfo

Jason Ekstrand jason at jlekstrand.net
Fri Mar 17 16:08:16 UTC 2017


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Fri, Mar 17, 2017 at 9:03 AM, Robert Bragg <robert at sixbynine.org> wrote:

> I've just pushed an old patch (was already reviewed, but I never followed
> up on
> it) that added a timebase_scale to gen_device_info so we can use that
> instead
> here instead.
>
> --- >8 ---
>
> 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 <robert at sixbynine.org>
> ---
>  src/intel/vulkan/anv_device.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index fcfbd5fd6b..748d70327e 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,
> --
> 2.12.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170317/c52ba5b9/attachment.html>


More information about the mesa-dev mailing list