[Mesa-dev] [PATCH 12/24] ac: add missing extern "C" guards
Marek Olšák
maraeo at gmail.com
Mon May 15 13:54:43 UTC 2017
For patches 1-12:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Sun, May 14, 2017 at 11:46 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> ---
> src/amd/common/ac_gpu_info.h | 8 ++++++++
> src/amd/common/ac_surface.h | 8 ++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h
> index 9bf2b84..d8029ef 100644
> --- a/src/amd/common/ac_gpu_info.h
> +++ b/src/amd/common/ac_gpu_info.h
> @@ -23,20 +23,24 @@
> * of the Software.
> */
>
> #ifndef AC_GPU_INFO_H
> #define AC_GPU_INFO_H
>
> #include "amd_family.h"
>
> #include <amdgpu.h>
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> struct radeon_info {
> /* PCI info: domain:bus:dev:func */
> uint32_t pci_domain;
> uint32_t pci_bus;
> uint32_t pci_dev;
> uint32_t pci_func;
>
> /* Device info. */
> uint32_t pci_id;
> enum radeon_family family;
> @@ -88,11 +92,15 @@ struct radeon_info {
>
> /* Tile modes. */
> uint32_t si_tile_mode_array[32];
> uint32_t cik_macrotile_mode_array[16];
> };
>
> bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
> struct radeon_info *info,
> struct amdgpu_gpu_info *amdinfo);
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
> #endif /* AC_GPU_INFO_H */
> diff --git a/src/amd/common/ac_surface.h b/src/amd/common/ac_surface.h
> index bfd2a95..db01e74 100644
> --- a/src/amd/common/ac_surface.h
> +++ b/src/amd/common/ac_surface.h
> @@ -23,20 +23,24 @@
> * of the Software.
> */
>
> #ifndef AC_SURFACE_H
> #define AC_SURFACE_H
>
> #include <stdint.h>
>
> #include "amd_family.h"
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> /* Forward declarations. */
> typedef void* ADDR_HANDLE;
>
> struct amdgpu_gpu_info;
> struct radeon_info;
>
> #define RADEON_SURF_MAX_LEVELS 15
>
> enum radeon_surf_mode {
> RADEON_SURF_MODE_LINEAR_ALIGNED = 1,
> @@ -201,11 +205,15 @@ struct ac_surf_config {
> };
>
> ADDR_HANDLE amdgpu_addr_create(const struct radeon_info *info,
> const struct amdgpu_gpu_info *amdinfo);
>
> int ac_compute_surface(ADDR_HANDLE addrlib, const struct radeon_info *info,
> const struct ac_surf_config * config,
> enum radeon_surf_mode mode,
> struct radeon_surf *surf);
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
> #endif /* AC_SURFACE_H */
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list