ir_to_mesa: Move some things outside the 'extern "C"' blocks
Having a few of these includes or forward declarations inside the 'extern "C"' block can cause problems later. Specifically, it prevents C++ linkage functions from being added to ir_to_mesa.h and makes G++ angry if 'struct foo' is seen both inside and outside an 'extern "C"'. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -25,9 +25,7 @@
|
|||||||
#include "main/compiler.h"
|
#include "main/compiler.h"
|
||||||
#include "ir.h"
|
#include "ir.h"
|
||||||
#include "glsl_types.h"
|
#include "glsl_types.h"
|
||||||
extern "C" {
|
|
||||||
#include "program/hash_table.h"
|
#include "program/hash_table.h"
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Duplicate an IR variable
|
* Duplicate an IR variable
|
||||||
|
@@ -24,10 +24,7 @@
|
|||||||
#include "ir_print_visitor.h"
|
#include "ir_print_visitor.h"
|
||||||
#include "glsl_types.h"
|
#include "glsl_types.h"
|
||||||
#include "glsl_parser_extras.h"
|
#include "glsl_parser_extras.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "program/hash_table.h"
|
#include "program/hash_table.h"
|
||||||
}
|
|
||||||
|
|
||||||
static void print_type(const glsl_type *t);
|
static void print_type(const glsl_type *t);
|
||||||
|
|
||||||
|
@@ -34,10 +34,8 @@
|
|||||||
* from the GLSL IR.
|
* from the GLSL IR.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "main/core.h" /* for struct gl_program */
|
#include "main/core.h" /* for struct gl_program */
|
||||||
#include "program/hash_table.h"
|
#include "program/hash_table.h"
|
||||||
}
|
|
||||||
#include "ir.h"
|
#include "ir.h"
|
||||||
#include "ir_visitor.h"
|
#include "ir_visitor.h"
|
||||||
#include "glsl_types.h"
|
#include "glsl_types.h"
|
||||||
|
@@ -41,12 +41,13 @@
|
|||||||
#include "ir_optimization.h"
|
#include "ir_optimization.h"
|
||||||
#include "ast.h"
|
#include "ast.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "main/mtypes.h"
|
#include "main/mtypes.h"
|
||||||
#include "main/shaderapi.h"
|
|
||||||
#include "main/shaderobj.h"
|
#include "main/shaderobj.h"
|
||||||
#include "main/uniforms.h"
|
|
||||||
#include "program/hash_table.h"
|
#include "program/hash_table.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "main/shaderapi.h"
|
||||||
|
#include "main/uniforms.h"
|
||||||
#include "program/prog_instruction.h"
|
#include "program/prog_instruction.h"
|
||||||
#include "program/prog_optimize.h"
|
#include "program/prog_optimize.h"
|
||||||
#include "program/prog_print.h"
|
#include "program/prog_print.h"
|
||||||
|
@@ -21,16 +21,16 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "main/glheader.h"
|
#include "main/glheader.h"
|
||||||
|
|
||||||
struct gl_context;
|
struct gl_context;
|
||||||
struct gl_shader;
|
struct gl_shader;
|
||||||
struct gl_shader_program;
|
struct gl_shader_program;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *sh);
|
void _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *sh);
|
||||||
void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
|
void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
|
||||||
GLboolean _mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader);
|
GLboolean _mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader);
|
||||||
|
@@ -42,12 +42,13 @@
|
|||||||
#include "ir_optimization.h"
|
#include "ir_optimization.h"
|
||||||
#include "ast.h"
|
#include "ast.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "main/mtypes.h"
|
#include "main/mtypes.h"
|
||||||
#include "main/shaderapi.h"
|
|
||||||
#include "main/shaderobj.h"
|
#include "main/shaderobj.h"
|
||||||
#include "main/uniforms.h"
|
|
||||||
#include "program/hash_table.h"
|
#include "program/hash_table.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "main/shaderapi.h"
|
||||||
|
#include "main/uniforms.h"
|
||||||
#include "program/prog_instruction.h"
|
#include "program/prog_instruction.h"
|
||||||
#include "program/prog_optimize.h"
|
#include "program/prog_optimize.h"
|
||||||
#include "program/prog_print.h"
|
#include "program/prog_print.h"
|
||||||
|
Reference in New Issue
Block a user