On Mon, Dec 3, 2012 at 7:33 PM, Dave Airlie <airl...@gmail.com> wrote: >> diff --git a/src/gallium/auxiliary/os/os_time.c >> b/src/gallium/auxiliary/os/os_time.c >> index 3e9d50a..4055125 100644 >> --- a/src/gallium/auxiliary/os/os_time.c >> +++ b/src/gallium/auxiliary/os/os_time.c >> @@ -36,6 +36,7 @@ >> #include "pipe/p_config.h" >> >> #if defined(PIPE_OS_UNIX) >> +# include <time.h> /* timeval */ >> # include <sys/time.h> /* timeval */ >> #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) >> # include <windows.h> >> @@ -68,6 +69,20 @@ os_time_get(void) >> } >> >> >> +uint64_t >> +os_time_get_nano(void) >> +{ >> +#if defined(PIPE_OS_UNIX) >> + struct timespec tv; >> + clock_gettime(CLOCK_REALTIME, &tv); >> + return tv.tv_nsec + tv.tv_sec * 1000000000LL; >> + >> +#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) >> + return os_time_get() * 1000; >> +#endif >> +} > > I wonder if we should be using CLOCK_MONOTONIC_RAW (on new Linux) or > CLOCK_MONOTONIC here, but I also wonder if we should do the same for > os_time_get so they are the same clock. > > I ran some piglits on this, and it found it doesn't provide the > screen->get_timestamp callback, but that looks like a trivial > addition, though with that it still fails a test, I'll see if I can > spot the problem. >
Okay the attached patch fixes up the piglit fails I see with this patch. feel free to merge it in. Dave.
0001-llvmpipe-fix-up-piglits-for-timers.patch
Description: Binary data
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev