gallium: wire up asahi driver

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
This commit is contained in:
Alyssa Rosenzweig 2025-03-07 09:29:28 -05:00 committed by Marge Bot
parent 1a76310fb7
commit 27d2bd5925
4 changed files with 27 additions and 0 deletions

View file

@ -87,6 +87,7 @@ static const struct drm_driver_descriptor *driver_descriptors[] = {
&vc4_driver_descriptor,
&panfrost_driver_descriptor,
&panthor_driver_descriptor,
&asahi_driver_descriptor,
&etnaviv_driver_descriptor,
&tegra_driver_descriptor,
&lima_driver_descriptor,
@ -330,6 +331,9 @@ pipe_loader_get_compatible_render_capable_device_fds(int kms_only_fd, unsigned i
bool is_platform_device;
struct pipe_loader_device *dev;
const char * const drivers[] = {
#if defined GALLIUM_ASAHI
"asahi",
#endif
#if defined GALLIUM_ETNAVIV
"etnaviv",
#endif

View file

@ -351,6 +351,27 @@ DRM_DRIVER_DESCRIPTOR_STUB(panfrost)
DRM_DRIVER_DESCRIPTOR_STUB(panthor)
#endif
#ifdef GALLIUM_ASAHI
#include "asahi/drm/asahi_drm_public.h"
static struct pipe_screen *
pipe_asahi_create_screen(int fd, const struct pipe_screen_config *config)
{
struct pipe_screen *screen;
screen = asahi_drm_screen_create(fd, config);
return screen ? debug_screen_wrap(screen) : NULL;
}
const driOptionDescription asahi_driconf[] = {
#include "asahi/driinfo_asahi.h"
};
DRM_DRIVER_DESCRIPTOR(asahi, asahi_driconf, ARRAY_SIZE(asahi_driconf))
#else
DRM_DRIVER_DESCRIPTOR_STUB(asahi)
#endif
#ifdef GALLIUM_ETNAVIV
#include "etnaviv/drm/etnaviv_drm_public.h"

View file

@ -19,6 +19,7 @@ extern const struct drm_driver_descriptor v3d_driver_descriptor;
extern const struct drm_driver_descriptor vc4_driver_descriptor;
extern const struct drm_driver_descriptor panfrost_driver_descriptor;
extern const struct drm_driver_descriptor panthor_driver_descriptor;
extern const struct drm_driver_descriptor asahi_driver_descriptor;
extern const struct drm_driver_descriptor etnaviv_driver_descriptor;
extern const struct drm_driver_descriptor tegra_driver_descriptor;
extern const struct drm_driver_descriptor lima_driver_descriptor;

View file

@ -63,6 +63,7 @@ dril_dri = shared_library(
)
foreach d : [[with_gallium_kmsro, [
'apple_dri.so',
'armada-drm_dri.so',
'exynos_dri.so',
'gm12u320_dri.so',