[Mesa-dev] [PATCH] gallium/util: fix debug_get_flags_option on 32-bit harder

Marek Olšák maraeo at gmail.com
Thu Oct 15 11:05:04 PDT 2015


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

Marek

On Thu, Oct 15, 2015 at 7:32 PM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> I noticed the FD_MESA_DEBUG=help numeric flags output was looking kinda
> funny.
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
>  src/gallium/auxiliary/util/u_debug.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
> index 5fe9e33..7388a49 100644
> --- a/src/gallium/auxiliary/util/u_debug.c
> +++ b/src/gallium/auxiliary/util/u_debug.c
> @@ -276,7 +276,7 @@ debug_get_flags_option(const char *name,
>        for (; flags->name; ++flags)
>           namealign = MAX2(namealign, strlen(flags->name));
>        for (flags = orig; flags->name; ++flags)
> -         _debug_printf("| %*s [0x%0*"PRIu64"]%s%s\n", namealign, flags->name,
> +         _debug_printf("| %*s [0x%0*"PRIx64"]%s%s\n", namealign, flags->name,
>                        (int)sizeof(uint64_t)*CHAR_BIT/4, flags->value,
>                        flags->desc ? " " : "", flags->desc ? flags->desc : "");
>     }
> @@ -291,9 +291,9 @@ debug_get_flags_option(const char *name,
>
>     if (debug_get_option_should_print()) {
>        if (str) {
> -         debug_printf("%s: %s = 0x%"PRIu64" (%s)\n", __FUNCTION__, name, result, str);
> +         debug_printf("%s: %s = 0x%"PRIx64" (%s)\n", __FUNCTION__, name, result, str);
>        } else {
> -         debug_printf("%s: %s = 0x%"PRIu64"\n", __FUNCTION__, name, result);
> +         debug_printf("%s: %s = 0x%"PRIx64"\n", __FUNCTION__, name, result);
>        }
>     }
>
> --
> 2.5.0
>
> _______________________________________________
> 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