i965: Make brw_{program,vs}.h safe to include from C++.
authorPaul Berry <stereotype441@gmail.com>
Wed, 20 Mar 2013 18:35:34 +0000 (11:35 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Aug 2013 18:02:31 +0000 (11:02 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_program.h
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_vs.h

index a2997e77036b13e23f9858f19cabd1087cdecf6a..e2ddaa8d70a9e50b7184b0632991a42a51f091f4 100644 (file)
@@ -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
index 6c7e827e89564bfeabf9cf536a26f73822b8cec5..afa14c5d77ee659ed37374f6fc63ce94c7f14a33 100644 (file)
@@ -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"
index 3d0b8521579ebcdd4bf751b0ff0ef682ce78f548..d51d7b69d34a6d54ada71b47725882dbb6562d14 100644 (file)
@@ -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