aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-11-09 10:20:51 +0000
committerJosé Fonseca <[email protected]>2011-11-09 10:24:37 +0000
commit63e7a4c6e5bf51d8090046ebc5adcb4207448565 (patch)
treeb701753960e53fe36889273def9d28e0059445d6 /src/mesa/program
parentf4b42aa5b7a3d11f839d5576b4c42406529131be (diff)
mesa,glsl,mapi: Put extern "C" { ... } where appropriate.
Probably a several places missing, but enough to cover all headers (in)directly included by uniform_query.cpp, and fix the MSVC build.
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/hash_table.h9
-rw-r--r--src/mesa/program/ir_to_mesa.h15
-rw-r--r--src/mesa/program/prog_parameter.h9
-rw-r--r--src/mesa/program/prog_statevars.h11
4 files changed, 33 insertions, 11 deletions
diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h
index 47c37ae40ec..bcf65df7d89 100644
--- a/src/mesa/program/hash_table.h
+++ b/src/mesa/program/hash_table.h
@@ -37,16 +37,17 @@
#include <limits.h>
#include <assert.h>
-struct hash_table;
struct string_to_uint_map;
-typedef unsigned (*hash_func_t)(const void *key);
-typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
-
#ifdef __cplusplus
extern "C" {
#endif
+struct hash_table;
+
+typedef unsigned (*hash_func_t)(const void *key);
+typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
+
/**
* Hash table constructor
*
diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h
index 2891682ba7a..aa053d9c8e3 100644
--- a/src/mesa/program/ir_to_mesa.h
+++ b/src/mesa/program/ir_to_mesa.h
@@ -21,24 +21,23 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include "main/glheader.h"
+#pragma once
-struct gl_context;
-struct gl_shader;
-struct gl_shader_program;
+#include "main/glheader.h"
#ifdef __cplusplus
extern "C" {
#endif
+struct gl_context;
+struct gl_shader;
+struct gl_shader_program;
+
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);
GLboolean _mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader);
GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
-#ifdef __cplusplus
-}
-
void
_mesa_generate_parameters_list_for_uniforms(struct gl_shader_program
*shader_program,
@@ -50,4 +49,6 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
struct gl_shader_program *shader_program,
struct gl_program_parameter_list *params);
+#ifdef __cplusplus
+}
#endif
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index a6793d0d866..3c6dc8cf996 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -35,6 +35,11 @@
#include "prog_statevars.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/**
* Program parameter flags
*/
@@ -178,4 +183,8 @@ _mesa_num_parameters_of_type(const struct gl_program_parameter_list *list,
gl_register_file type);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PROG_PARAMETER_H */
diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h
index 04af3f4cf3a..8b731e12bbe 100644
--- a/src/mesa/program/prog_statevars.h
+++ b/src/mesa/program/prog_statevars.h
@@ -25,8 +25,15 @@
#ifndef PROG_STATEVARS_H
#define PROG_STATEVARS_H
+
#include "main/glheader.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct gl_context;
struct gl_program_parameter_list;
@@ -145,4 +152,8 @@ extern void
_mesa_load_tracked_matrices(struct gl_context *ctx);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PROG_STATEVARS_H */