[Mesa-dev] [PATCH 1/2] gallium: add PIPE_DRIVER_QUERY_FLAG_DONT_LIST
Marek Olšák
maraeo at gmail.com
Wed Nov 25 09:21:22 PST 2015
The series is:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Tue, Nov 24, 2015 at 5:05 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> This allows the driver to give a hint to the HUD so that GALLIUM_HUD=help is
> less spammy.
> ---
> src/gallium/auxiliary/hud/hud_context.c | 10 +++++++++-
> src/gallium/include/pipe/p_defines.h | 3 +++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
> index efceb85..c5c3332 100644
> --- a/src/gallium/auxiliary/hud/hud_context.c
> +++ b/src/gallium/auxiliary/hud/hud_context.c
> @@ -1127,12 +1127,20 @@ print_help(struct pipe_screen *screen)
> }
>
> if (screen->get_driver_query_info){
> + boolean skipping = false;
> struct pipe_driver_query_info info;
> num_queries = screen->get_driver_query_info(screen, 0, NULL);
>
> for (i = 0; i < num_queries; i++){
> screen->get_driver_query_info(screen, i, &info);
> - printf(" %s\n", info.name);
> + if (info.flags & PIPE_DRIVER_QUERY_FLAG_DONT_LIST) {
> + if (!skipping)
> + puts(" ...");
> + skipping = true;
> + } else {
> + printf(" %s\n", info.name);
> + skipping = false;
> + }
> }
> }
>
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index b3c8b9f..b18eedd 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -861,6 +861,9 @@ enum pipe_driver_query_result_type
> */
> #define PIPE_DRIVER_QUERY_FLAG_BATCH (1 << 0)
>
> +/* Do not list this query in the HUD. */
> +#define PIPE_DRIVER_QUERY_FLAG_DONT_LIST (1 << 1)
> +
> struct pipe_driver_query_info
> {
> const char *name;
> --
> 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