panfrost: Meson dependency

Declare a meson dependency for libpanfrost and wrap some key functions
within an extern C block allowing proper compilation by C++ compilers.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10462>
This commit is contained in:
Antonio Caggiano 2021-04-09 17:27:12 +02:00 committed by Marge Bot
parent 390722620e
commit 1b87a7d5e0
2 changed files with 14 additions and 0 deletions

View file

@ -80,3 +80,9 @@ libpanfrost_decode = static_library(
gnu_symbol_visibility : 'hidden',
build_by_default : false,
)
libpanfrost_dep = declare_dependency(
link_with: [libpanfrost_lib, libpanfrost_decode, libpanfrost_midgard, libpanfrost_bifrost],
include_directories: [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw, inc_panfrost],
dependencies: [dep_libdrm, idep_nir, idep_midgard_pack],
)

View file

@ -42,6 +42,10 @@
#include <midgard_pack.h>
#if defined(__cplusplus)
extern "C" {
#endif
/* Driver limits */
#define PAN_MAX_CONST_BUFFERS 16
@ -259,4 +263,8 @@ pan_is_bifrost(const struct panfrost_device *dev)
return dev->arch >= 6 && dev->arch <= 7;
}
#if defined(__cplusplus)
} // extern "C"
#endif
#endif