[Mesa-dev] [PATCH 2/2] clover: Use 1 as default value for CL_DEVICE_PROFILING_TIMER_RESOLUTION
Francisco Jerez
currojerez at riseup.net
Thu Jul 17 05:18:55 PDT 2014
Tom Stellard <thomas.stellard at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140717/e732caae/attachment.sig>
More information about the mesa-dev
mailing list