[Mesa-dev] [PATCH 1/2] clover: Call end_query before getting timestamp result

Tom Stellard thomas.stellard at amd.com
Wed Jul 16 13:49:08 PDT 2014


Also change the wait parameter from false to true.
---

I'm really not sure what is correct here, but this patch fixes event profiling on SI.

 src/gallium/state_trackers/clover/core/timestamp.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/clover/core/timestamp.cpp b/src/gallium/state_trackers/clover/core/timestamp.cpp
index 481c4f9..a6edaf6 100644
--- a/src/gallium/state_trackers/clover/core/timestamp.cpp
+++ b/src/gallium/state_trackers/clover/core/timestamp.cpp
@@ -47,7 +47,8 @@ cl_ulong
 timestamp::query::operator()() const {
    pipe_query_result result;
 
-   if (!q().pipe->get_query_result(q().pipe, _query, false, &result))
+   q().pipe->end_query(q().pipe, _query);
+   if (!q().pipe->get_query_result(q().pipe, _query, true, &result))
       throw error(CL_PROFILING_INFO_NOT_AVAILABLE);
 
    return result.u64;
-- 
1.8.1.5



More information about the mesa-dev mailing list