summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-04-27 07:40:34 -0700
committerPaul Berry <[email protected]>2012-05-10 10:30:00 -0700
commit434fc8bde41f07687ad8941ceba03c4b3e0e75bb (patch)
tree4ef8732c92f158d0a9f4f2fe0955e01f95ab31d7 /src/mesa
parentb0bb125736fd29dbad6cfa8d4de0c44eaf5e28ad (diff)
intel: Add extern "C" declarations to headers
These declarations are necessary to allow C++ code to call C code without causing unresolved symbols (which would make the driver fail to load). Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h7
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h8
-rw-r--r--src/mesa/drivers/dri/i965/gen6_hiz.h8
-rw-r--r--src/mesa/drivers/dri/i965/gen7_hiz.h8
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h8
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h5
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h8
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h8
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.h8
-rw-r--r--src/mesa/main/teximage.h7
11 files changed, 82 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 47f56e21f5d..141fb658d71 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -37,6 +37,9 @@
#include "brw_structs.h"
#include "main/imports.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/* Glossary:
*
@@ -1188,4 +1191,8 @@ brw_program_reloc(struct brw_context *brw, uint32_t state_offset,
bool brw_do_cubemap_normalize(struct exec_list *instructions);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index c4c62b2bf4a..675b50a1456 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -38,6 +38,10 @@
#include "brw_defines.h"
#include "program/prog_instruction.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define BRW_SWIZZLE4(a,b,c,d) (((a)<<0) | ((b)<<2) | ((c)<<4) | ((d)<<6))
#define BRW_GET_SWZ(swz, idx) (((swz) >> ((idx)*2)) & 0x3)
@@ -1107,4 +1111,8 @@ void brw_optimize(struct brw_compile *p);
void brw_remove_duplicate_mrf_moves(struct brw_compile *p);
void brw_remove_grf_to_mrf_moves(struct brw_compile *p);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 8a0e92fab08..659cb0a2898 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -35,6 +35,10 @@
#include "brw_context.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const struct brw_tracked_state brw_blend_constant_color;
extern const struct brw_tracked_state brw_cc_vp;
extern const struct brw_tracked_state brw_cc_unit;
@@ -208,4 +212,8 @@ uint32_t
get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
int fs_attr, bool two_side_color);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/i965/gen6_hiz.h b/src/mesa/drivers/dri/i965/gen6_hiz.h
index 0a13ba076ac..5d6eefc2d64 100644
--- a/src/mesa/drivers/dri/i965/gen6_hiz.h
+++ b/src/mesa/drivers/dri/i965/gen6_hiz.h
@@ -25,6 +25,10 @@
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct intel_context;
struct intel_mipmap_tree;
@@ -77,3 +81,7 @@ gen6_resolve_depth_slice(struct intel_context *intel,
struct intel_mipmap_tree *mt,
uint32_t level,
uint32_t layer);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/mesa/drivers/dri/i965/gen7_hiz.h b/src/mesa/drivers/dri/i965/gen7_hiz.h
index b89ffb00711..6c0fc84eca1 100644
--- a/src/mesa/drivers/dri/i965/gen7_hiz.h
+++ b/src/mesa/drivers/dri/i965/gen7_hiz.h
@@ -25,6 +25,10 @@
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct intel_context;
struct intel_mipmap_tree;
@@ -41,3 +45,7 @@ gen7_resolve_depth_slice(struct intel_context *intel,
struct intel_mipmap_tree *mt,
uint32_t level,
uint32_t layer);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index 751ec992c97..50d0d28f7a8 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -7,6 +7,10 @@
#include "intel_bufmgr.h"
#include "intel_reg.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define BATCH_RESERVED 16
void intel_batchbuffer_init(struct intel_context *intel);
@@ -152,4 +156,8 @@ void intel_batchbuffer_cached_advance(struct intel_context *intel);
#define ADVANCE_BATCH() intel_batchbuffer_advance(intel);
#define CACHED_BATCH() intel_batchbuffer_cached_advance(intel);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 8ba727030fc..63dba897f79 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -49,7 +49,6 @@ extern "C" {
#ifdef __cplusplus
#undef virtual
-}
#endif
#include "tnl/t_vertex.h"
@@ -607,4 +606,8 @@ is_power_of_two(uint32_t value)
return (value & (value - 1)) == 0;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index 947944ac8e1..758b4a0ec32 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -34,6 +34,10 @@
#include "intel_context.h"
#include "intel_screen.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct intel_context;
struct intel_mipmap_tree;
struct intel_texture_image;
@@ -197,4 +201,8 @@ bool
intel_renderbuffer_resolve_depth(struct intel_context *intel,
struct intel_renderbuffer *irb);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* INTEL_FBO_H */
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index 90828642019..0886c95f234 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -33,6 +33,10 @@
#include "intel_regions.h"
#include "intel_resolve_map.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A layer on top of the intel_regions code which adds:
*
* - Code to size and layout a region to hold a set of mipmaps.
@@ -413,4 +417,8 @@ intel_miptree_unmap(struct intel_context *intel,
unsigned int level,
unsigned int slice);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h
index 0a05d79882a..2fb30eb48f1 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/src/mesa/drivers/dri/intel/intel_regions.h
@@ -41,6 +41,10 @@
#include "main/mtypes.h"
#include "intel_bufmgr.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct intel_context;
struct intel_buffer_object;
@@ -147,4 +151,8 @@ struct __DRIimageRec {
void *data;
};
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index e2bdaca0150..66a0c88950b 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -35,6 +35,9 @@
#include "mtypes.h"
#include "formats.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/** Is the given value one of the 6 cube faces? */
static inline GLboolean
@@ -287,4 +290,8 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer);
/*@}*/
+#ifdef __cplusplus
+}
+#endif
+
#endif