gallium: include u_format.h for util_format_is_supported
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Sat, 16 Apr 2011 20:15:52 +0000 (22:15 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 16 Apr 2011 23:15:52 +0000 (01:15 +0200)
Without it gcc complains:
nv50_screen.c: In function ‘nv50_screen_is_format_supported’:
nv50_screen.c:48: warning: implicit declaration of function ‘util_format_is_supported’

and handles it wrongly - util_format_is_supported returns boolean, which is typedef'ed
to uchar, but function without prototype is assumed to return int.

For me nv50_screen_is_format_supported was returning true for float formats without
--enable-texture-float...

src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i965/brw_screen.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nvc0/nvc0_screen.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/r600/r600_pipe.c

index 6f6a342791a893c9039c2e8a31706dcc9ed9fd52..0f4327fdc810e994e7fe8e0948c8bccf562eb88d 100644 (file)
@@ -27,6 +27,7 @@
 
 
 #include "draw/draw_context.h"
+#include "util/u_format.h"
 #include "util/u_inlines.h"
 #include "util/u_memory.h"
 #include "util/u_string.h"
index 5353ae23250462837694311d5e35eb7401d0b0a7..9178dfa8f69c0daca3472dcbf7dc3c580614892b 100644 (file)
@@ -26,6 +26,7 @@
  **************************************************************************/
 
 
+#include "util/u_format.h"
 #include "util/u_inlines.h"
 #include "util/u_memory.h"
 #include "util/u_string.h"
index e0eea3ed750d073dd1995c980bc835cbd999a32a..641ad7e2780e41d0476010a8aeee3df2a1bc6f3b 100644 (file)
@@ -20,6 +20,7 @@
  * SOFTWARE.
  */
 
+#include "util/u_format.h"
 #include "util/u_format_s3tc.h"
 #include "pipe/p_screen.h"
 
index de62fd68b28dc7c3a7cc811bbfb0a47f4178d44d..ca0691d2aee3833af39b504def8f3cd1da0745e5 100644 (file)
@@ -20,6 +20,7 @@
  * SOFTWARE.
  */
 
+#include "util/u_format.h"
 #include "util/u_format_s3tc.h"
 #include "pipe/p_screen.h"
 
index abbed9651eea18a1deb6adb987fbb191d990a5a0..ab063d6fe4e90e39efb8505aab785ee5cc0d5f33 100644 (file)
@@ -1,5 +1,6 @@
 #include "pipe/p_screen.h"
 #include "pipe/p_state.h"
+#include "util/u_format.h"
 #include "util/u_format_s3tc.h"
 #include "util/u_simple_screen.h"
 
index 066768f9c380bc21835eb2715982ca377f10bf18..1a581c791a36631f055568548467116ba9171d30 100644 (file)
@@ -30,6 +30,7 @@
 #include <tgsi/tgsi_util.h>
 #include <util/u_blitter.h>
 #include <util/u_double_list.h>
+#include "util/u_format.h"
 #include <util/u_format_s3tc.h>
 #include <util/u_transfer.h>
 #include <util/u_surface.h>