tgsi: include struct definitions for tgsi_build declarations
authorRob Herring <robh@kernel.org>
Mon, 8 Jan 2018 21:17:48 +0000 (15:17 -0600)
committerRob Herring <robh@kernel.org>
Wed, 10 Jan 2018 20:56:09 +0000 (14:56 -0600)
Many of the functions declared in tgsi_build.h return structs (not struct
pointers). Therefore the full struct definitions are needed to avoid
warnings or errors:

In file included from src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:23:
external/mesa3d/src/gallium/auxiliary/tgsi/tgsi_build.h:47:1: error: 'tgsi_build_header' has C-linkage specified, but returns incomplete type 'struct tgsi_header' which could be incompatible with C [-Werror,-Wreturn-type-c-linkage]

This error shows up on Android builds using clang and -Werror.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Rob Herring <robh@kernel.org>
src/gallium/auxiliary/tgsi/tgsi_build.h

index 53f31932c021e1649bdf146871fc38005b270b1b..31de76fe5327c31d16add474e51db6ffa6c65028 100644 (file)
 #ifndef TGSI_BUILD_H
 #define TGSI_BUILD_H
 
-
-struct tgsi_token;
-struct tgsi_full_dst_register;
-struct tgsi_full_src_register;
-
+#include "tgsi/tgsi_parse.h"
 
 #if defined __cplusplus
 extern "C" {