ac: add ifdef __cplusplus guard to header
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 11 Jan 2021 19:37:25 +0000 (20:37 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 14 Jan 2021 09:33:10 +0000 (10:33 +0100)
ac_shadowed_regs.h can be included from si_state_draw.cpp so this commit
adds the needed guards.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8433>

src/amd/common/ac_shadowed_regs.h

index df2a7b7..8a18392 100644 (file)
@@ -47,6 +47,10 @@ enum ac_reg_range_type
    SI_NUM_ALL_REG_RANGES,
 };
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void (*set_context_reg_seq_array_fn)(struct radeon_cmdbuf *cs, unsigned reg, unsigned num,
                                              const uint32_t *values);
 
@@ -59,4 +63,9 @@ void ac_check_shadowed_regs(enum chip_class chip_class, enum radeon_family famil
                             unsigned reg_offset, unsigned count);
 void ac_print_shadowed_regs(const struct radeon_info *info);
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif