Tom Stellard <thomas.stell...@amd.com> writes: > We use PIPE_QUERY_TIMESTAMP for profiling events, and gallium specifies > that the timestamp be in nanoseconds. > --- > src/gallium/state_trackers/clover/api/device.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/api/device.cpp > b/src/gallium/state_trackers/clover/api/device.cpp > index 1176668..25d29f5 100644 > --- a/src/gallium/state_trackers/clover/api/device.cpp > +++ b/src/gallium/state_trackers/clover/api/device.cpp > @@ -249,7 +249,9 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param, > break; > > case CL_DEVICE_PROFILING_TIMER_RESOLUTION: > - buf.as_scalar<size_t>() = 0; > + // PIPE_QUERY_TIMESTAMP returns a timestamp in units of nanoseconds, > + // so we default to 1 here. > + buf.as_scalar<size_t>() = 1; > break;
I guess we should use PIPE_QUERY_TIMESTAMP_DISJOINT to calculate the timer resolution? Thanks. > > case CL_DEVICE_ENDIAN_LITTLE: > -- > 1.8.1.5
pgpo4ygcLtAqk.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev