[Mesa-dev] [PATCH] gallium/hud: display percentages with % suffix

Brian Paul brianp at vmware.com
Tue Jul 7 12:17:54 PDT 2015


---
 src/gallium/auxiliary/hud/hud_context.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index cb55220..bd57190 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -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];
-- 
1.9.1



More information about the mesa-dev mailing list