amd/common: Add extern "C" to some headers that were missing it.
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 27 Sep 2019 07:26:14 +0000 (09:26 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Thu, 10 Oct 2019 07:57:52 +0000 (09:57 +0200)
We'd like to include some of these in C++ code later.
Specifically, ACO is written in C++ and we would like to use
some of this code in ACO in order to avoid code duplication.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/common/ac_debug.h
src/amd/common/ac_rtld.h
src/amd/common/ac_shader_util.h

index 0d5c1dd9eac0f5a055f09fc5c45dfdf6ab06ff2b..ffcba8755364f23efca7fe026b774934af8ac91f 100644 (file)
 
 #define AC_MAX_WAVES_PER_CHIP (64 * 40)
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ac_wave_info {
        unsigned se; /* shader engine */
        unsigned sh; /* shader array */
@@ -67,4 +71,8 @@ bool ac_vm_fault_occured(enum chip_class chip_class,
 unsigned ac_get_wave_info(enum chip_class chip_class,
                          struct ac_wave_info waves[AC_MAX_WAVES_PER_CHIP]);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 2246cf1208a0d14c91446fb6d64ce569127d5dc3..a4343d9b3ef50a95d23a06f92efef204a149030a 100644 (file)
 #include "util/u_dynarray.h"
 #include "compiler/shader_enums.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ac_rtld_part;
 struct ac_shader_config;
 struct radeon_info;
@@ -134,4 +138,8 @@ struct ac_rtld_upload_info {
 
 bool ac_rtld_upload(struct ac_rtld_upload_info *u);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* AC_RTLD_H */
index b522aaa90febdf14c49745f2f787c348ef50bf57..20b291256eb808a38eb09de471e8227b9a4747fb 100644 (file)
 #include "ac_binary.h"
 #include "compiler/nir/nir.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum ac_image_dim {
        ac_image_1d,
        ac_image_2d,
@@ -69,4 +73,8 @@ ac_get_fs_input_vgpr_cnt(const struct ac_shader_config *config,
                         signed char *face_vgpr_index,
                         signed char *ancillary_vgpr_index);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif