diff options
author | Timur Kristóf <[email protected]> | 2019-09-27 09:26:14 +0200 |
---|---|---|
committer | Timur Kristóf <[email protected]> | 2019-10-10 09:57:52 +0200 |
commit | c57503b93286ad3e8715f6d42a05b6de5fd7fdac (patch) | |
tree | c9f2603b6dd5bff3473c112d3f8f4427dc326e72 /src/amd | |
parent | 9e27816252b9090868dbff1f1e640a7e99c13a97 (diff) |
amd/common: Add extern "C" to some headers that were missing it.
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 <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_debug.h | 8 | ||||
-rw-r--r-- | src/amd/common/ac_rtld.h | 8 | ||||
-rw-r--r-- | src/amd/common/ac_shader_util.h | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/amd/common/ac_debug.h b/src/amd/common/ac_debug.h index 0d5c1dd9eac..ffcba875536 100644 --- a/src/amd/common/ac_debug.h +++ b/src/amd/common/ac_debug.h @@ -36,6 +36,10 @@ #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 diff --git a/src/amd/common/ac_rtld.h b/src/amd/common/ac_rtld.h index 2246cf1208a..a4343d9b3ef 100644 --- a/src/amd/common/ac_rtld.h +++ b/src/amd/common/ac_rtld.h @@ -31,6 +31,10 @@ #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 */ diff --git a/src/amd/common/ac_shader_util.h b/src/amd/common/ac_shader_util.h index b522aaa90fe..20b291256eb 100644 --- a/src/amd/common/ac_shader_util.h +++ b/src/amd/common/ac_shader_util.h @@ -31,6 +31,10 @@ #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 |