summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-03-20 11:35:34 -0700
committerPaul Berry <[email protected]>2013-08-23 11:02:31 -0700
commit61a5bd8336aaf44b455407e0eb10caa1d031b358 (patch)
treea20c43ba526b83aff0bab50b7e5d6f8faaa29108 /src/mesa
parentad65825098f2029c3853e0f1dbedd045acc05870 (diff)
i965: Make brw_{program,vs}.h safe to include from C++.
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.h8
3 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.h b/src/mesa/drivers/dri/i965/brw_program.h
index a2997e77036..e2ddaa8d70a 100644
--- a/src/mesa/drivers/dri/i965/brw_program.h
+++ b/src/mesa/drivers/dri/i965/brw_program.h
@@ -42,6 +42,10 @@ struct brw_sampler_prog_key_data {
uint16_t yuvtex_swap_mask; /**< UV swaped */
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void brw_populate_sampler_prog_key_data(struct gl_context *ctx,
const struct gl_program *prog,
unsigned sampler_count,
@@ -51,4 +55,8 @@ bool brw_debug_recompile_sampler_key(struct brw_context *brw,
const struct brw_sampler_prog_key_data *key);
void brw_add_texrect_params(struct gl_program *prog);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 6c7e827e895..afa14c5d77e 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -24,8 +24,8 @@
extern "C" {
#include "main/macros.h"
#include "brw_context.h"
-#include "brw_vs.h"
}
+#include "brw_vs.h"
#include "brw_fs.h"
#include "glsl/ir_optimization.h"
#include "glsl/glsl_parser_extras.h"
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index 3d0b8521579..d51d7b69d34 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -111,6 +111,10 @@ struct brw_vs_compile {
struct brw_vertex_program *vp;
};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const unsigned *brw_vs_emit(struct brw_context *brw,
struct gl_shader_program *prog,
struct brw_vs_compile *c,
@@ -128,4 +132,8 @@ bool brw_vs_prog_data_compare(const void *a, const void *b,
void brw_vec4_prog_data_free(const struct brw_vec4_prog_data *prog_data);
void brw_vs_prog_data_free(const void *in_prog_data);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif