[Mesa-dev] [PATCH 01/15] gallium: add pipe_screen::get_driver_query_group_info v2
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Jul 9 07:34:35 PDT 2014
Driver queries are organized as a single hierarchy where queries
are categorized into groups. Each goup has a list of queries and
a maximum number of queries that can be sampled.
This will be used by GL_AMD_performance monitor.
V2:
- add doc to src/gallium/docs/source/screen.rst
- s/pipe_context/pipe_screen in the commit msg
- rewrite commit message
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/gallium/docs/source/screen.rst | 10 ++++++++++
src/gallium/include/pipe/p_defines.h | 7 +++++++
src/gallium/include/pipe/p_screen.h | 11 +++++++++++
3 files changed, 28 insertions(+)
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index ba583fe..9d94890 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -532,3 +532,13 @@ query at the specified **index** is returned in **info**.
The function returns non-zero on success.
The driver-specific query is described with the pipe_driver_query_info
structure.
+
+get_driver_query_group_info
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Return a driver-specific query group. If the **info** parameter is NULL,
+the number of available groups is returned. Otherwise, the driver
+query group at the specified **index** is returned in **info**.
+The function returns non-zero on success.
+The driver-specific query group is described with the
+pipe_driver_query_group_info structure.
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index d9b6e5a..8f20974 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -735,6 +735,13 @@ struct pipe_driver_query_info
boolean uses_byte_units; /* whether the result is in bytes */
};
+struct pipe_driver_query_group_info
+{
+ const char *name;
+ unsigned max_active_queries;
+ unsigned num_queries;
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index cf958d2..8fc110e 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -220,6 +220,17 @@ struct pipe_screen {
unsigned index,
struct pipe_driver_query_info *info);
+ /**
+ * Returns a driver-specific query group.
+ *
+ * If \p info is NULL, the number of available groups is returned.
+ * Otherwise, the driver query group at the specified \p index is returned
+ * in \p info. The function returns non-zero on success.
+ */
+ int (*get_driver_query_group_info)(struct pipe_screen *screen,
+ unsigned index,
+ struct pipe_driver_query_group_info *info);
+
};
--
2.0.0
More information about the mesa-dev
mailing list