Mesa (staging/21.3): radeonsi: print the border color error message only once

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 1 19:36:40 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: f91e84778b5280e885679e4f628a79b98dc5ad24
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f91e84778b5280e885679e4f628a79b98dc5ad24

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Oct 29 07:33:18 2021 -0400

radeonsi: print the border color error message only once

Cc: 21.2 21.3 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13590>
(cherry picked from commit 8bfa146b8056d5dded6fdd2c4d8524aa0c438058)

---

 .pick_status.json                       |  2 +-
 src/gallium/drivers/radeonsi/si_state.c | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 6e0475530fc..2e75e5fb31e 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -292,7 +292,7 @@
         "description": "radeonsi: print the border color error message only once",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 9ed07e6262b..450ee8348dd 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4492,9 +4492,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);
    }
 



More information about the mesa-commit mailing list