zink: Do the timestamp-to-ns math in a double to have better precision.

Fixes arb_timer_query-timestamp-get on my radv system, where the GPU has
been on for many days and the timestamp would only increment every once in
a while.

Part of fixing #6808

Fixes: 7a40b734ee ("zink: handle timestamp queries")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17477>
This commit is contained in:
Emma Anholt 2022-07-11 15:50:50 -07:00 committed by Marge Bot
parent cf1715e391
commit 0feedec9e6
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ timestamp_to_nanoseconds(struct zink_screen *screen, uint64_t *timestamp)
* can be obtained from VkPhysicalDeviceLimits::timestampPeriod
* - 17.5. Timestamp Queries
*/
*timestamp *= screen->info.props.limits.timestampPeriod;
*timestamp *= (double)screen->info.props.limits.timestampPeriod;
}
static VkQueryType