LIBDRM_INTEL_REQUIRED=2.4.61
LIBDRM_NVVIEUX_REQUIRED=2.4.66
LIBDRM_NOUVEAU_REQUIRED=2.4.66
-LIBDRM_FREEDRENO_REQUIRED=2.4.67
+LIBDRM_FREEDRENO_REQUIRED=2.4.68
LIBDRM_VC4_REQUIRED=2.4.69
DRI2PROTO_REQUIRED=2.6
DRI3PROTO_REQUIRED=1.0
static uint64_t
fd_screen_get_timestamp(struct pipe_screen *pscreen)
{
- int64_t cpu_time = os_time_get() * 1000;
- return cpu_time + fd_screen(pscreen)->cpu_gpu_time_delta;
+ struct fd_screen *screen = fd_screen(pscreen);
+
+ if (screen->has_timestamp) {
+ uint64_t n;
+ fd_pipe_get_param(screen->pipe, FD_TIMESTAMP, &n);
+ debug_assert(screen->max_freq > 0);
+ return n * 1000000000 / screen->max_freq;
+ } else {
+ int64_t cpu_time = os_time_get() * 1000;
+ return cpu_time + screen->cpu_gpu_time_delta;
+ }
+
}
static void
screen->max_freq = 0;
} else {
screen->max_freq = val;
+ if (fd_pipe_get_param(screen->pipe, FD_TIMESTAMP, &val) == 0)
+ screen->has_timestamp = true;
}
if (fd_pipe_get_param(screen->pipe, FD_GPU_ID, &val)) {