101e04c3fSmrg#include "target-helpers/drm_helper.h"
201e04c3fSmrg#include "target-helpers/sw_helper.h"
301e04c3fSmrg
401e04c3fSmrg#include "dri_screen.h"
501e04c3fSmrg
601e04c3fSmrg#define DEFINE_LOADER_DRM_ENTRYPOINT(drivername)                          \
701e04c3fSmrgconst __DRIextension **__driDriverGetExtensions_##drivername(void);       \
801e04c3fSmrgPUBLIC const __DRIextension **__driDriverGetExtensions_##drivername(void) \
901e04c3fSmrg{                                                                         \
1001e04c3fSmrg   globalDriverAPI = &galliumdrm_driver_api;                              \
1101e04c3fSmrg   return galliumdrm_driver_extensions;                                   \
1201e04c3fSmrg}
1301e04c3fSmrg
1401e04c3fSmrg#if defined(GALLIUM_SOFTPIPE)
1501e04c3fSmrg
1601e04c3fSmrgconst __DRIextension **__driDriverGetExtensions_swrast(void);
1701e04c3fSmrg
1801e04c3fSmrgPUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
1901e04c3fSmrg{
2001e04c3fSmrg   globalDriverAPI = &galliumsw_driver_api;
2101e04c3fSmrg   return galliumsw_driver_extensions;
2201e04c3fSmrg}
2301e04c3fSmrg
2401e04c3fSmrg#if defined(HAVE_LIBDRM)
2501e04c3fSmrg
2601e04c3fSmrgconst __DRIextension **__driDriverGetExtensions_kms_swrast(void);
2701e04c3fSmrg
2801e04c3fSmrgPUBLIC const __DRIextension **__driDriverGetExtensions_kms_swrast(void)
2901e04c3fSmrg{
3001e04c3fSmrg   globalDriverAPI = &dri_kms_driver_api;
3101e04c3fSmrg   return galliumdrm_driver_extensions;
3201e04c3fSmrg}
3301e04c3fSmrg
3401e04c3fSmrg#endif
3501e04c3fSmrg#endif
3601e04c3fSmrg
3701e04c3fSmrg#if defined(GALLIUM_I915)
3801e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(i915)
3901e04c3fSmrg#endif
4001e04c3fSmrg
419f464c52Smaya#if defined(GALLIUM_IRIS)
429f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(iris)
4301e04c3fSmrg#endif
4401e04c3fSmrg
457ec681f3Smrg#if defined(GALLIUM_CROCUS)
467ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(crocus)
477ec681f3Smrg#endif
487ec681f3Smrg
4901e04c3fSmrg#if defined(GALLIUM_NOUVEAU)
5001e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(nouveau)
5101e04c3fSmrg#endif
5201e04c3fSmrg
5301e04c3fSmrg#if defined(GALLIUM_R300)
5401e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(r300)
5501e04c3fSmrg#endif
5601e04c3fSmrg
5701e04c3fSmrg#if defined(GALLIUM_R600)
5801e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(r600)
5901e04c3fSmrg#endif
6001e04c3fSmrg
6101e04c3fSmrg#if defined(GALLIUM_RADEONSI)
6201e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(radeonsi)
6301e04c3fSmrg#endif
6401e04c3fSmrg
6501e04c3fSmrg#if defined(GALLIUM_VMWGFX)
6601e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(vmwgfx)
6701e04c3fSmrg#endif
6801e04c3fSmrg
6901e04c3fSmrg#if defined(GALLIUM_FREEDRENO)
7001e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(msm)
7101e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(kgsl)
7201e04c3fSmrg#endif
7301e04c3fSmrg
7401e04c3fSmrg#if defined(GALLIUM_VIRGL)
7501e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(virtio_gpu)
7601e04c3fSmrg#endif
7701e04c3fSmrg
7801e04c3fSmrg#if defined(GALLIUM_V3D)
7901e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(v3d)
8001e04c3fSmrg#endif
8101e04c3fSmrg
8201e04c3fSmrg#if defined(GALLIUM_VC4)
8301e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(vc4)
8401e04c3fSmrg#endif
859f464c52Smaya
869f464c52Smaya#if defined(GALLIUM_PANFROST)
879f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(panfrost)
8801e04c3fSmrg#endif
8901e04c3fSmrg
9001e04c3fSmrg#if defined(GALLIUM_ETNAVIV)
9101e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(etnaviv)
9201e04c3fSmrg#endif
9301e04c3fSmrg
9401e04c3fSmrg#if defined(GALLIUM_TEGRA)
9501e04c3fSmrgDEFINE_LOADER_DRM_ENTRYPOINT(tegra);
9601e04c3fSmrg#endif
979f464c52Smaya
989f464c52Smaya#if defined(GALLIUM_KMSRO)
997ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(armada_drm)
1009f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(exynos)
1019f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(hx8357d)
1029f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(ili9225)
1039f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(ili9341)
1047ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(imx_drm)
1057ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(imx_dcss)
1067ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(ingenic_drm)
1077ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(kirin)
1087ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(mali_dp)
1097ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(mcde)
1107ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(mediatek)
1119f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(meson)
1129f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(mi0283qt)
1137ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(mxsfb_drm)
1149f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(pl111)
1159f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(repaper)
1169f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(rockchip)
1179f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(st7586)
1189f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(st7735r)
1197ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(stm)
1209f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(sun4i_drm)
1219f464c52Smaya#endif
1229f464c52Smaya
1239f464c52Smaya#if defined(GALLIUM_LIMA)
1249f464c52SmayaDEFINE_LOADER_DRM_ENTRYPOINT(lima)
1259f464c52Smaya#endif
1267ec681f3Smrg
1277ec681f3Smrg#if defined(GALLIUM_ZINK) && !defined(__APPLE__)
1287ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(zink);
1297ec681f3Smrg#endif
1307ec681f3Smrg
1317ec681f3Smrg#if defined(GALLIUM_D3D12)
1327ec681f3SmrgDEFINE_LOADER_DRM_ENTRYPOINT(d3d12);
1337ec681f3Smrg#endif
134