summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-07-05 20:04:02 +0200
committerMarek Olšák <[email protected]>2012-07-10 19:04:12 +0200
commitbcc735aaca3b305d05c28e4076996d91b19d80fd (patch)
tree72237a219750ee94b0e6b4f5295dce22ca25a3a0 /src/gallium/include/pipe
parentd5a7866902af2a60a2d350c0d4970b30aed0b97a (diff)
gallium: add QUERY_TIMESTAMP cap and get_timestamp screen function
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_defines.h3
-rw-r--r--src/gallium/include/pipe/p_screen.h7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 479b26e1517..8d787ec79e2 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -485,7 +485,8 @@ enum pipe_cap {
PIPE_CAP_USER_INDEX_BUFFERS = 69,
PIPE_CAP_USER_CONSTANT_BUFFERS = 70,
PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT = 71,
- PIPE_CAP_START_INSTANCE = 72
+ PIPE_CAP_START_INSTANCE = 72,
+ PIPE_CAP_QUERY_TIMESTAMP = 73
};
/**
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 164e54d3205..fdf6fa2d3f9 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -108,6 +108,13 @@ struct pipe_screen {
enum pipe_compute_cap param,
void *ret);
+ /**
+ * Query a timestamp in nanoseconds. The returned value should match
+ * PIPE_QUERY_TIMESTAMP. This function returns immediately and doesn't
+ * wait for rendering to complete (which cannot be achieved with queries).
+ */
+ uint64_t (*get_timestamp)(struct pipe_screen *);
+
struct pipe_context * (*context_create)( struct pipe_screen *,
void *priv );