nvc0: all queries use an unsigned 64-bits integer by default
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 8 Jul 2014 12:23:01 +0000 (14:23 +0200)
committerMartin Peres <martin.peres@linux.intel.com>
Tue, 5 May 2015 21:03:36 +0000 (00:03 +0300)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Martin Peres <martin.peres@free.fr>
src/gallium/drivers/nouveau/nvc0/nvc0_query.c

index 8d9cd8b3df77a5fc4d1b167dfed8cc68a70bb05f..52032eb6f83471a75c4debbd8f7985091c3417c0 100644 (file)
@@ -1418,6 +1418,13 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen,
    if (!info)
       return count;
 
+   /* Init default values. */
+   info->name = "this_is_not_the_query_you_are_looking_for";
+   info->query_type = 0xdeadd01d;
+   info->max_value.u64 = 0;
+   info->type = PIPE_DRIVER_QUERY_TYPE_UINT64;
+   info->group_id = -1;
+
 #ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
    if (id < NVC0_QUERY_DRV_STAT_COUNT) {
       info->name = nvc0_drv_stat_names[id];
@@ -1441,16 +1448,11 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen,
       if (screen->compute) {
          info->name = nvc0_pm_query_names[id - NVC0_QUERY_DRV_STAT_COUNT];
          info->query_type = NVC0_PM_QUERY(id - NVC0_QUERY_DRV_STAT_COUNT);
-         info->max_value.u64 = 0;
          info->group_id = NVC0_QUERY_MP_COUNTER_GROUP;
          return 1;
       }
    }
    /* user asked for info about non-existing query */
-   info->name = "this_is_not_the_query_you_are_looking_for";
-   info->query_type = 0xdeadd01d;
-   info->group_id = -1;
-   info->max_value.u64 = 0;
    return 0;
 }