summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-10-31 16:00:23 -0700
committerKenneth Graunke <kenneth@whitecape.org>2013-11-21 15:01:13 -0800
commit569adb40d7f3fa5084c20dd4b774fb1482d00c9c (patch)
treed954ef2a4f04640db15b227f23e28dd5fc84feec /src/mesa
parent7bf3cd4315343c3f1e0c36cc5ca1f790857e072a (diff)
i965: Initialize performance monitor Groups/NumGroups.
Since we don't support any counters, there are zero groups. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_monitor.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_monitor.c b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
index a7a79ff8e3c..34f2aa3e65f 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_monitor.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
@@ -85,6 +85,31 @@ brw_perf_monitor(struct gl_perf_monitor_object *m)
.NumCounters = ARRAY_SIZE(counter_list), \
}
+/**
+ * Ironlake:
+ * @{
+ */
+const static struct gl_perf_monitor_group gen5_groups[] = {
+ /* Our pipeline statistics counter handling requires hardware contexts. */
+};
+/** @} */
+
+/**
+ * Sandybridge:
+ * @{
+ */
+const static struct gl_perf_monitor_group gen6_groups[] = {
+};
+/** @} */
+
+/**
+ * Ivybridge/Baytrail/Haswell:
+ * @{
+ */
+const static struct gl_perf_monitor_group gen7_groups[] = {
+};
+/** @} */
+
/******************************************************************************/
static GLboolean brw_is_perf_monitor_result_available(struct gl_context *, struct gl_perf_monitor_object *);
@@ -241,5 +266,14 @@ brw_init_performance_monitors(struct brw_context *brw)
ctx->Driver.IsPerfMonitorResultAvailable = brw_is_perf_monitor_result_available;
ctx->Driver.GetPerfMonitorResult = brw_get_perf_monitor_result;
- /* ...need to set ctx->PerfMonitor.Groups and ctx->PerfMonitor.NumGroups */
+ if (brw->gen == 5) {
+ ctx->PerfMonitor.Groups = gen5_groups;
+ ctx->PerfMonitor.NumGroups = ARRAY_SIZE(gen5_groups);
+ } else if (brw->gen == 6) {
+ ctx->PerfMonitor.Groups = gen6_groups;
+ ctx->PerfMonitor.NumGroups = ARRAY_SIZE(gen6_groups);
+ } else if (brw->gen == 7) {
+ ctx->PerfMonitor.Groups = gen7_groups;
+ ctx->PerfMonitor.NumGroups = ARRAY_SIZE(gen7_groups);
+ }
}