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:
parent
cf1715e391
commit
0feedec9e6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue