#endif
DRM_DRIVER_DESCRIPTOR_ALIAS(msm, kgsl, NULL, 0)
-#ifdef GALLIUM_VIRGL
+#if defined(GALLIUM_VIRGL) || (defined(GALLIUM_FREEDRENO) && !defined(PIPE_LOADER_DYNAMIC))
#include "virgl/drm/virgl_drm_public.h"
#include "virgl/virgl_public.h"
static struct pipe_screen *
pipe_virtio_gpu_create_screen(int fd, const struct pipe_screen_config *config)
{
- struct pipe_screen *screen;
+ struct pipe_screen *screen = NULL;
- screen = virgl_drm_screen_create(fd, config);
+ /* Try native guest driver(s) first, and then fallback to virgl: */
+#ifdef GALLIUM_FREEDRENO
+ if (!screen)
+ screen = fd_drm_screen_create(fd, NULL, config);
+#endif
+#ifdef GALLIUM_VIRGL
+ if (!screen)
+ screen = virgl_drm_screen_create(fd, config);
+#endif
return screen ? debug_screen_wrap(screen) : NULL;
}
const driOptionDescription virgl_driconf[] = {
+#ifdef GALLIUM_VIRGL
#include "virgl/virgl_driinfo.h.in"
+#endif
};
DRM_DRIVER_DESCRIPTOR(virtio_gpu, virgl_driconf, ARRAY_SIZE(virgl_driconf))
[with_gallium_r300, 'r300_dri.so'],
[with_gallium_r600, 'r600_dri.so'],
[with_gallium_svga, 'vmwgfx_dri.so'],
- [with_gallium_virgl, 'virtio_gpu_dri.so'],
+ [with_gallium_virgl or
+ (with_gallium_freedreno and with_freedreno_virtio),
+ 'virtio_gpu_dri.so'],
[with_gallium_lima, 'lima_dri.so'],
[with_gallium_zink, 'zink_dri.so'],
[with_gallium_d3d12, 'd3d12_dri.so'],
DEFINE_LOADER_DRM_ENTRYPOINT(kgsl)
#endif
-#if defined(GALLIUM_VIRGL)
+#if defined(GALLIUM_VIRGL) || (defined(GALLIUM_FREEDRENO) && !defined(PIPE_LOADER_DYNAMIC))
DEFINE_LOADER_DRM_ENTRYPOINT(virtio_gpu)
#endif