mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
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>
This commit is contained in:
parent
0e00c4ea33
commit
263bd5e6fd
4 changed files with 15 additions and 2 deletions
|
|
@ -35,6 +35,8 @@ int
|
|||
u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
|
||||
enum pipe_cap param)
|
||||
{
|
||||
assert(param < PIPE_CAP_LAST);
|
||||
|
||||
/* Let's keep these sorted by position in p_defines.h. */
|
||||
switch (param) {
|
||||
case PIPE_CAP_NPOT_TEXTURES:
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
{
|
||||
const uint16_t class_3d = nouveau_screen(pscreen)->class_3d;
|
||||
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
|
||||
static bool debug_cap_printed[PIPE_CAP_LAST] = {};
|
||||
|
||||
switch (param) {
|
||||
/* non-boolean caps */
|
||||
|
|
@ -389,7 +390,10 @@ nv50_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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -977,6 +977,9 @@ enum pipe_cap
|
|||
PIPE_CAP_SHADER_ATOMIC_INT64,
|
||||
PIPE_CAP_DEVICE_PROTECTED_CONTENT,
|
||||
PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0,
|
||||
|
||||
PIPE_CAP_LAST,
|
||||
/* XXX do not add caps after PIPE_CAP_LAST! */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue