summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nvc0
diff options
context:
space:
mode:
authorKarol Herbst <kherbst@redhat.com>2021-02-02 16:27:43 +0100
committerMarge Bot <eric+marge@anholt.net>2021-02-08 10:52:32 +0000
commit263bd5e6fdac63ef9d4ab9d7867bbe4fa70845ee (patch)
treec86411ff6ad09f381fad1cc8b56d6cdf0997fe99 /src/gallium/drivers/nouveau/nvc0
parent0e00c4ea338e7f1f40aee03bd1ba34e1d461fd98 (diff)
nouveau: print warning about unhandled cap only once
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8831>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_screen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 265cc7ecee3..95d8a29d31b 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -109,6 +109,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
const uint16_t class_3d = nouveau_screen(pscreen)->class_3d;
const struct nouveau_screen *screen = nouveau_screen(pscreen);
struct nouveau_device *dev = screen->device;
+ static bool debug_cap_printed[PIPE_CAP_LAST] = {};
switch (param) {
/* non-boolean caps */
@@ -431,7 +432,10 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 0;
default:
- debug_printf("%s: unhandled cap %d\n", __func__, param);
+ if (!debug_cap_printed[param]) {
+ debug_printf("%s: unhandled cap %d\n", __func__, param);
+ debug_cap_printed[param] = true;
+ }
/* fallthrough */
/* caps where we want the default value */
case PIPE_CAP_DMABUF: