[Mesa-dev] [PATCH] gallium: include u_format.h for util_format_is_supported

Marek Olšák maraeo at gmail.com
Sat Apr 16 16:24:08 PDT 2011


Pushed, thanks.

Marek

On Sat, Apr 16, 2011 at 10:15 PM, Marcin Slusarz
<marcin.slusarz at gmail.com>wrote:

> 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 |    1 +
>  src/gallium/drivers/i965/brw_screen.c  |    1 +
>  src/gallium/drivers/nv50/nv50_screen.c |    1 +
>  src/gallium/drivers/nvc0/nvc0_screen.c |    1 +
>  src/gallium/drivers/nvfx/nvfx_screen.c |    1 +
>  src/gallium/drivers/r600/r600_pipe.c   |    1 +
>  6 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/gallium/drivers/i915/i915_screen.c
> b/src/gallium/drivers/i915/i915_screen.c
> index 6f6a342..0f4327f 100644
> --- a/src/gallium/drivers/i915/i915_screen.c
> +++ b/src/gallium/drivers/i915/i915_screen.c
> @@ -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"
> diff --git a/src/gallium/drivers/i965/brw_screen.c
> b/src/gallium/drivers/i965/brw_screen.c
> index 5353ae2..9178dfa 100644
> --- a/src/gallium/drivers/i965/brw_screen.c
> +++ b/src/gallium/drivers/i965/brw_screen.c
> @@ -26,6 +26,7 @@
>
>  **************************************************************************/
>
>
> +#include "util/u_format.h"
>  #include "util/u_inlines.h"
>  #include "util/u_memory.h"
>  #include "util/u_string.h"
> diff --git a/src/gallium/drivers/nv50/nv50_screen.c
> b/src/gallium/drivers/nv50/nv50_screen.c
> index e0eea3e..641ad7e 100644
> --- a/src/gallium/drivers/nv50/nv50_screen.c
> +++ b/src/gallium/drivers/nv50/nv50_screen.c
> @@ -20,6 +20,7 @@
>  * SOFTWARE.
>  */
>
> +#include "util/u_format.h"
>  #include "util/u_format_s3tc.h"
>  #include "pipe/p_screen.h"
>
> diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c
> b/src/gallium/drivers/nvc0/nvc0_screen.c
> index c4cdfac..5325807 100644
> --- a/src/gallium/drivers/nvc0/nvc0_screen.c
> +++ b/src/gallium/drivers/nvc0/nvc0_screen.c
> @@ -20,6 +20,7 @@
>  * SOFTWARE.
>  */
>
> +#include "util/u_format.h"
>  #include "util/u_format_s3tc.h"
>  #include "pipe/p_screen.h"
>
> diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c
> b/src/gallium/drivers/nvfx/nvfx_screen.c
> index abbed96..ab063d6 100644
> --- a/src/gallium/drivers/nvfx/nvfx_screen.c
> +++ b/src/gallium/drivers/nvfx/nvfx_screen.c
> @@ -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"
>
> diff --git a/src/gallium/drivers/r600/r600_pipe.c
> b/src/gallium/drivers/r600/r600_pipe.c
> index 066768f..1a581c7 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -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>
> --
> 1.7.4.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110417/c7c60aa6/attachment.htm>


More information about the mesa-dev mailing list