[Mesa-dev] [PATCH 04/11] i965: perf: reuse timescale base function from query

Kenneth Graunke kenneth at whitecape.org
Thu Mar 8 21:17:18 UTC 2018


On Thursday, March 8, 2018 7:42:49 AM PST Lionel Landwerlin wrote:
> We already have the same function in brw_queryobj.c
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_performance_query.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
> index a084b30fe7c..d0faf4a2cb2 100644
> --- a/src/mesa/drivers/dri/i965/brw_performance_query.c
> +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
> @@ -613,15 +613,6 @@ drop_from_unaccumulated_query_list(struct brw_context *brw,
>     reap_old_sample_buffers(brw);
>  }
>  
> -static uint64_t
> -timebase_scale(struct brw_context *brw, uint32_t u32_time_delta)
> -{
> -   const struct gen_device_info *devinfo = &brw->screen->devinfo;
> -   uint64_t tmp = ((uint64_t)u32_time_delta) * 1000000000ull;
> -
> -   return tmp ? tmp / devinfo->timestamp_frequency : 0;
> -}

This function isn't quite the same...the one in brw_queryobj.c doesn't
have the ternary.  But, the ternary is checking the /numerator/ for
zero, which seems kinda pointless... 0 / timestamp_frequency == 0...

Patches 1-6 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180308/bf6060ee/attachment.sig>


More information about the mesa-dev mailing list