Mesa (staging/19.0): gallium/swr: Param defaults for unhandled PIPE_CAPs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 4 21:49:26 UTC 2019


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

Author: Alok Hota <alok.hota at intel.com>
Date:   Wed Jan 30 10:43:40 2019 -0600

gallium/swr: Param defaults for unhandled PIPE_CAPs

Without using this function, we fail the -Wswitch flag when compiling
the default debugoptimized mode in Meson

Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

---

 src/gallium/drivers/swr/swr_screen.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index bee011e4abf..ea63368f750 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -36,6 +36,7 @@
 #include "util/u_cpu_detect.h"
 #include "util/u_format_s3tc.h"
 #include "util/u_string.h"
+#include "util/u_screen.h"
 
 #include "state_tracker/sw_winsys.h"
 
@@ -387,11 +388,9 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
 
       return (int)(system_memory >> 20);
    }
+   default:
+      return u_pipe_screen_get_param_defaults(screen, param);
    }
-
-   /* should only get here on unhandled cases */
-   debug_printf("Unexpected PIPE_CAP %d query\n", param);
-   return 0;
 }
 
 static int




More information about the mesa-commit mailing list