diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper.h | 22 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper_public.h | 3 |
3 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c index 2b7ab2757a1..99d9da6fd0a 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c @@ -154,6 +154,11 @@ static const struct drm_driver_descriptor driver_descriptors[] = { .create_screen = pipe_vc4_create_screen, .configuration = configuration_query, }, + { + .driver_name = "etnaviv", + .create_screen = pipe_etna_create_screen, + .configuration = configuration_query, + } }; #endif diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index 90820d3fe91..e056c58ba96 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -266,5 +266,27 @@ pipe_vc4_create_screen(int fd) #endif +#ifdef GALLIUM_ETNAVIV +#include "etnaviv/drm/etnaviv_drm_public.h" + +struct pipe_screen * +pipe_etna_create_screen(int fd) +{ + struct pipe_screen *screen; + + screen = etna_drm_screen_create(fd); + return screen ? debug_screen_wrap(screen) : NULL; +} + +#else + +struct pipe_screen * +pipe_etna_create_screen(int fd) +{ + fprintf(stderr, "etnaviv: driver missing\n"); + return NULL; +} + +#endif #endif /* DRM_HELPER_H */ diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index d1f9382a6f9..73cf1da073d 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -34,4 +34,7 @@ pipe_virgl_create_screen(int fd); struct pipe_screen * pipe_vc4_create_screen(int fd); +struct pipe_screen * +pipe_etna_create_screen(int fd); + #endif /* _DRM_HELPER_PUBLIC_H */ |