diff options
author | Brian Paul <[email protected]> | 2015-08-07 14:54:24 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-09-02 09:05:23 -0600 |
commit | 133a47107cc03a69b4b88c1fef331d507f521fa7 (patch) | |
tree | a17683b5d558052c8ffe134a97f6c5b3aa6cfbcb /src/gallium | |
parent | e2a1d21cb665b7e7bc2c9684cf533003cdc817b3 (diff) |
gallium/st: add pipe_context::get_timestamp()
The VMware svga driver doesn't directly support pipe_screen::get_timestamp()
but we can do a work-around. However, we need a gallium context to do so.
This patch adds a new pipe_context::get_timestamp() function that will only
be called if the pipe_screen::get_timestamp() function is NULL.
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 9d8f5bdc8d2..6f9fe767404 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -592,6 +592,13 @@ struct pipe_context { float *out_value); /** + * Query a timestamp in nanoseconds. This is completely equivalent to + * pipe_screen::get_timestamp() but takes a context handle for drivers + * that require a context. + */ + uint64_t (*get_timestamp)(struct pipe_context *); + + /** * Flush the resource cache, so that the resource can be used * by an external client. Possible usage: * - flushing a resource before presenting it on the screen |