gallium/swr: Param defaults for unhandled PIPE_CAPs
authorAlok Hota <alok.hota@intel.com>
Wed, 30 Jan 2019 16:43:40 +0000 (10:43 -0600)
committerAlok Hota <alok.hota@intel.com>
Tue, 12 Feb 2019 18:55:14 +0000 (18:55 +0000)
Without using this function, we fail the -Wswitch flag when compiling
the default debugoptimized mode in Meson

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_screen.cpp

index de9008ddf6afa3e82584c56f34908b004e17e9c1..2b4a37a35b1d01c0c0f0e8d0ca68bc46c3b8126f 100644 (file)
@@ -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"
 
@@ -385,11 +386,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