summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-10-31 15:50:19 -0700
committerKenneth Graunke <[email protected]>2013-11-21 15:01:13 -0800
commit7bf3cd4315343c3f1e0c36cc5ca1f790857e072a (patch)
tree8e057f438355fa3f78284a9238a433405f81d666 /src
parent63b8ce612fa11c9aee5db101d3446c9783bf4111 (diff)
i965: Add macros for creating performance monitor counters and groups.
The Observability Architecture counters are 32-bit unsigned values, and the Pipeline Statistics Register counters are 64-bit unsigned values. These convenience macros make it easy to create those types of counters. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_monitor.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_monitor.c b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
index c9673c55565..a7a79ff8e3c 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_monitor.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
@@ -61,6 +61,32 @@ brw_perf_monitor(struct gl_perf_monitor_object *m)
/******************************************************************************/
+#define COUNTER(name) \
+ { \
+ .Name = name, \
+ .Type = GL_UNSIGNED_INT, \
+ .Minimum = { .u32 = 0 }, \
+ .Maximum = { .u32 = ~0 }, \
+ }
+
+#define COUNTER64(name) \
+ { \
+ .Name = name, \
+ .Type = GL_UNSIGNED_INT64_AMD, \
+ .Minimum = { .u64 = 0 }, \
+ .Maximum = { .u64 = ~0 }, \
+ }
+
+#define GROUP(name, max_active, counter_list) \
+ { \
+ .Name = name, \
+ .MaxActiveCounters = max_active, \
+ .Counters = counter_list, \
+ .NumCounters = ARRAY_SIZE(counter_list), \
+ }
+
+/******************************************************************************/
+
static GLboolean brw_is_perf_monitor_result_available(struct gl_context *, struct gl_perf_monitor_object *);
static void