X-Git-Url: https://git.cworth.org/git?p=fips;a=blobdiff_plain;f=metrics-info.c;h=b450e39b531d6e2212f249aeb07945375fa5ba89;hp=860e4359a3d7e8907c2b03c8970d48b4d1fbc2b8;hb=ba91fa6199a75aea42e40221489d259f1f723e4e;hpb=c27d7ce0b3ce5a2b9b753a654fdebcc1627aae52 diff --git a/metrics-info.c b/metrics-info.c index 860e435..b450e39 100644 --- a/metrics-info.c +++ b/metrics-info.c @@ -156,11 +156,23 @@ _add_shader_stage (metrics_info_t *info, const char *name, } void -metrics_info_init (metrics_info_t *info) +metrics_info_init (metrics_info_t *info, bool have_perfmon) { unsigned i, j; GLuint *group_ids; + info->have_perfmon = have_perfmon; + + if (! have_perfmon) { + info->groups = NULL; + info->num_groups = 0; + info->num_shader_stages = 0; + info->stages = NULL; + info->initialized = 1; + + return; + } + glGetPerfMonitorGroupsAMD ((int *) &info->num_groups, 0, NULL); group_ids = xmalloc (info->num_groups * sizeof (GLuint));