mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 16:30:29 +01:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue