[Mesa-dev] [PATCH 02/15] gallium: add new fields to pipe_driver_query_info v2

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 11 11:22:59 PDT 2014


According to the spec of GL_AMD_performance_monitor, valid type values
returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT.
This also introduces the new field group_id in order to categorize
queries into groups.

V2:
 - add pipe_driver_query_type enum

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/include/pipe/p_defines.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 8f20974..f0a1dda 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -727,12 +727,22 @@ union pipe_color_union
    unsigned int ui[4];
 };
 
+enum pipe_driver_query_type
+{
+   PIPE_DRIVER_QUERY_TYPE_UINT64     = 0,
+   PIPE_DRIVER_QUERY_TYPE_UINT       = 1,
+   PIPE_DRIVER_QUERY_TYPE_FLOAT      = 2,
+   PIPE_DRIVER_QUERY_TYPE_PERCENTAGE = 3,
+};
+
 struct pipe_driver_query_info
 {
    const char *name;
    unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
    uint64_t max_value; /* max value that can be returned */
    boolean uses_byte_units; /* whether the result is in bytes */
+   enum pipe_driver_query_type type;
+   unsigned group_id;
 };
 
 struct pipe_driver_query_group_info
-- 
2.0.0



More information about the mesa-dev mailing list