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

Marek Olšák maraeo at gmail.com
Tue Jul 7 12:18:51 PDT 2015


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Jul 7, 2015 at 9:17 PM, Brian Paul <brianp at vmware.com> wrote:
> ---
>  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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list