diff options
Diffstat (limited to 'src/gallium/state_trackers/nine/query9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/query9.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/query9.c b/src/gallium/state_trackers/nine/query9.c index 466b4ba3f7c..df49340b2cf 100644 --- a/src/gallium/state_trackers/nine/query9.c +++ b/src/gallium/state_trackers/nine/query9.c @@ -254,7 +254,15 @@ NineQuery9_GetData( struct NineQuery9 *This, nresult.b = presult.timestamp_disjoint.disjoint; break; case D3DQUERYTYPE_TIMESTAMPFREQ: - nresult.u64 = presult.timestamp_disjoint.frequency; + /* Applications use it to convert the TIMESTAMP value to time. + AMD drivers on win seem to return the actual hardware clock + resolution and corresponding values in TIMESTAMP. + However, this behaviour is not easy to replicate here. + So instead we do what wine and opengl do, and use + nanoseconds TIMESTAMPs. + (Which is also the unit used by PIPE_QUERY_TIMESTAMP.) + */ + nresult.u64 = 1000000000; break; case D3DQUERYTYPE_VERTEXSTATS: nresult.vertexstats.NumRenderedTriangles = |