gallium/hud: display percentages with % suffix
authorBrian Paul <brianp@vmware.com>
Tue, 7 Jul 2015 19:17:01 +0000 (13:17 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 7 Jul 2015 19:21:20 +0000 (13:21 -0600)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/hud/hud_context.c

index cb552208d187dbcdf68069e2341c7b362d6fe88a..bd571907f2f9c9dbb5d7e93ffcd9939c21df6d6d 100644 (file)
@@ -255,6 +255,9 @@ number_to_human_readable(uint64_t num, enum pipe_driver_query_type type,
       assert(unit < ARRAY_SIZE(time_units));
       suffix = time_units[unit];
       break;
+   case PIPE_DRIVER_QUERY_TYPE_PERCENTAGE:
+      suffix = "%";
+      break;
    case PIPE_DRIVER_QUERY_TYPE_BYTES:
       assert(unit < ARRAY_SIZE(byte_units));
       suffix = byte_units[unit];