diff options
author | José Fonseca <[email protected]> | 2012-12-09 10:08:13 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-12-20 16:33:49 +0000 |
commit | 3160b0b9fc2b49b0e9fe684b955eebf3691024ff (patch) | |
tree | 8125293ed921fa635998dbaefe99d639af7cb609 /src/mesa/state_tracker/st_cb_queryobj.h | |
parent | 9976216bf699be092e14b66ba3a3ecfa3859e87f (diff) |
mesa/st: Implement GL_TIME_ELAPSED w/ PIPE_QUERY_TIMESTAMP.
ARB/EXT_timer_query's definition of GL_TIME_ELAPSED match precisely the
subtraction of two GL_TIMESTAMP queries.
And for a lot of drivers, that's precisely how they have to implement
internally -- by emitting two hardware timestamp queries.
So, to simplify driver implementation, simply allow doing so in the state
tracker.
Eventually if no driver implements PIPE_QUERY_TIME_ELAPSED then we could
retire it.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_queryobj.h')
-rw-r--r-- | src/mesa/state_tracker/st_cb_queryobj.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_queryobj.h b/src/mesa/state_tracker/st_cb_queryobj.h index 03487b15317..d5b10753245 100644 --- a/src/mesa/state_tracker/st_cb_queryobj.h +++ b/src/mesa/state_tracker/st_cb_queryobj.h @@ -39,6 +39,10 @@ struct st_query_object { struct gl_query_object base; struct pipe_query *pq; + + /* Begin TIMESTAMP query for GL_TIME_ELAPSED_EXT queries */ + struct pipe_query *pq_begin; + unsigned type; /**< PIPE_QUERY_x */ }; |