From 8bfa146b8056d5dded6fdd2c4d8524aa0c438058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 29 Oct 2021 07:33:18 -0400 Subject: [PATCH] radeonsi: print the border color error message only once Cc: 21.2 21.3 Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 1b46fe0885e..1ad6988a58e 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -4509,9 +4509,13 @@ static uint32_t si_translate_border_color(struct si_context *sctx, if (i >= SI_MAX_BORDER_COLORS) { /* Getting 4096 unique border colors is very unlikely. */ - fprintf(stderr, "radeonsi: The border color table is full. " - "Any new border colors will be just black. " - "Please file a bug.\n"); + static bool printed; + if (!printed) { + fprintf(stderr, "radeonsi: The border color table is full. " + "Any new border colors will be just black. " + "This is a hardware limitation.\n"); + printed = true; + } return S_008F3C_BORDER_COLOR_TYPE(V_008F3C_SQ_TEX_BORDER_COLOR_TRANS_BLACK); }